enterprise architecture for a personal banking use case on Azure Cloud,
- Anand Nerurkar
- Apr 21
- 6 min read
✅ 1. Business Overview – Personal Banking Platform
A scalable digital banking platform offering savings/current accounts, fund transfers, personal loans, credit cards, account statements, and personalized financial insights.
⚠️ 2. Risk Categories and Mitigation Plans
Risk Category | Risk Example | Mitigation Strategy |
Business | Product-market mismatch, new competitor | Continuous market analysis, customer feedback loop, agile roadmap |
Operations | Downtime of transaction systems | Active-active setup with failover, disaster recovery, SLAs, runbooks |
Environmental | Azure regional failure | Multi-AZ & Multi-region deployment, Azure Traffic Manager |
Technology | Kafka/topic overload, API versioning issues | Rate limiting, topic partitioning, API Gateway with lifecycle mgmt. |
Security | Unauthorized access, data breaches | Azure AD, SSO, firewall, NSGs, Istio mTLS, SSL termination, encryption |
Compliance | GDPR, RBI regulations non-compliance | Audit trails, data masking, DLP, logging, periodic compliance reviews |
People | Key resource attrition, access misuse | RBAC, regular training, cross-functional documentation, principle of least privilege |
📘 3. Capabilities and Capability → Application Mapping
Capability | Service/Application |
Customer Onboarding | KYC Service, Document Verification, Identity Check |
Account Management | Account Service, Ledger Service |
Funds Transfer | Payment Service, UPI Service, IMPS/NEFT Integration |
Personal Loans | Loan Origination Service, Credit Scoring Engine |
Fraud Detection | Risk Analysis Engine, Fraud Monitor Service |
Notifications | Email/SMS Notification Service |
Account Insights | Analytics Engine, Spending Pattern Service |
Audit and Reporting | Audit Trail Service, Reporting Service |
Authentication & Access | Auth Service (Azure AD + SSO), RBAC Service |
🧱 4. High-Level Technology Stack
Layer | Technology / Service |
Frontend | React / Angular |
Backend | Spring Boot microservices |
Containerization | Docker, stored in Azure Container Registry (ACR) |
Orchestration | Azure Kubernetes Service (AKS) |
Messaging/Eventing | Kafka (internal), Azure Event Hub (external systems) |
API Gateway | Azure API Management (rate limiting, versioning, monitoring) |
Data Storage | Azure SQL (relational), Cosmos DB (NoSQL), Azure Blob (file/KYC uploads) |
CI/CD | Azure DevOps (code to deployment pipeline) |
Monitoring & Logging | Azure Monitor, Application Insights, Log Analytics |
Identity & Security | Azure Active Directory, SSO, RBAC, Istio (mTLS, policies), SSL on Load Balancer |
Networking & Security | VPC, Subnet (App, DB, Kafka), Firewall, NSG, Load Balancer, DNS, Traffic Manager |
Observability | App Insights, Prometheus/Grafana (if custom), Alert Rules, Dashboards |
🔗 5. Integration & Connectivity
VNet: Central virtual network with address space broken into subnets:
App Subnet (AKS)
Data Subnet (Azure SQL, Cosmos DB)
Kafka/Event Hub Subnet
NSGs: Applied to subnets for traffic filtering
Firewall: Securing external traffic before hitting Load Balancer
SSL: Terminated at Load Balancer with TLS 1.2+
API Gateway: External traffic flows through Azure API Management
AKS + Istio:
Istio for traffic routing, retries, timeouts, mTLS, observability
DNS Mapping: Domain routes (e.g., api.bank.com) to Load Balancer via Azure DNS
Traffic Manager: Multi-region AKS clusters managed by Traffic Manager
Kafka:
Internal event bus across services (transaction events, fraud signals)
Azure Event Hub for external ingest (e.g., third-party KYC, payment gateway)
DevOps:
Azure DevOps pipeline triggers from code check-in → build → containerization → deploy to AKS
Helm charts for AKS deployments
🧩 6. Spring Boot Microservices Components
Service Name | Description |
auth-service | AuthN/Z integrated with Azure AD |
customer-service | Customer profiles, preferences |
account-service | Account operations, balance, transactions |
kyc-service | KYC doc collection, OCR, validation |
loan-service | Loan applications, eligibility, EMI computation |
payment-service | UPI/NEFT/RTGS integration |
fraud-service | Detect anomalies using AI/ML models |
analytics-service | Spending insights, dashboards |
notification-service | Email/SMS alerts |
reporting-service | User/downloadable statements, MIS reports |
🛡 7. Security and Governance
Azure AD: Handles user identities + role-based access
SSO: Integrated for both customer and internal users
Istio: Enforces zero-trust with mTLS and fine-grained policies
Key Vault: Secrets, certificates, keys for services
Audit Logging: Application logs + Azure logs aggregated in Log Analytics
Encryption: Data at rest (Azure SQL TDE), in transit (TLS), config secrets via Key Vault
📊 8. High Availability, Scalability, Observability
Multi-AZ AKS deployments
Traffic Manager handles global traffic failover
Kafka with partitions and replication factor for durability
Azure Monitor: App metrics, logs, custom alerts
ACR: Used in CI/CD to version containers
Auto-scaling: HPA in AKS pods, based on CPU/memory thresholds
Here’s a mock walkthrough of the “Customer Onboarding” user flow in a personal banking platform, covering end-to-end flow from UI to backend services, with components deployed on Azure Cloud using Spring Boot microservices architecture.
✅ Use Case: Customer Onboarding – “Open a New Bank Account”
🧍♂️ Actor: End Customer (via Web/Mobile App)
🗺️ 1. Frontend Flow
User Action: Fills onboarding form (name, email, PAN, Aadhaar, address, mobile, etc.) on web/mobile UI.
Frontend: React app sends form data via HTTPS to api.bank.com/onboarding.
DNS Routing: api.bank.com resolves via Azure DNS to Azure Load Balancer.
SSL: TLS terminated at Load Balancer.
Traffic Flow: Routed to Azure API Management → internal service route.
⚙️ 2. API Gateway Layer (Azure API Management)
Applies rate limiting (e.g., 100 requests/sec).
Enforces authentication via Azure AD B2C.
Routes to backend path: /onboarding-service/onboard-customer.
🛠️ 3. Microservices Orchestration (Spring Boot Services in AKS)
✅ onboarding-service
Validates payload (format, required fields).
Calls kyc-service for identity verification.
✅ kyc-service
Uses Kafka to publish event: kyc.initiated.
Triggers document collection via external eKYC (NSDL/Aadhaar XML API).
Fetches PAN status, Aadhaar verification (via external connectors).
Updates internal status (kyc.verified, kyc.failed).
✅ customer-service
Creates customer profile: name, DOB, address.
Stores in Azure SQL.
Encrypts sensitive fields (Aadhaar/PAN) using Azure Key Vault.
Emits customer.created event to Kafka.
✅ account-service
Listens to customer.created event.
Opens default savings account.
Initializes ledger balance to ₹0.
Stores account details in Cosmos DB.
✅ notification-service
Sends onboarding confirmation email/SMS via Kafka account.created event.
Uses Azure Logic App or Twilio SendGrid for email.
🔄 4. Event-Driven Interaction (Kafka on Azure)
Event | Consumer Service | Purpose |
kyc.initiated | kyc-service | Start verification |
customer.created | account-service | Open account |
account.created | notification-service | Send welcome notification |
Kafka provides asynchronous decoupling, ensuring eventual consistency across services.
🔐 5. Security and Access Control
All microservices communicate via Istio mTLS.
Azure AD manages service identities + SSO.
Access tokens verified at API Gateway and downstream services.
Secrets (e.g., DB creds, API keys) managed in Azure Key Vault.
🔄 6. Persistence
Data | Service | Store |
Customer Profile | customer-service | Azure SQL |
Account Info | account-service | Cosmos DB |
KYC Status/Docs | kyc-service | Azure Blob + SQL |
📈 7. CI/CD and Observability
Azure DevOps handles deployments of all services to AKS using Helm.
Logs and metrics collected by Azure Monitor, App Insights.
Alerts configured on onboarding errors, SLA breaches.
🛡️ 8. Failure Scenarios & Handling
Scenario | Mitigation |
eKYC API failure | Retry logic, dead-letter queue, fallback verification |
Kafka topic lag | Monitor with Prometheus, alert, increase partitions |
DB connectivity loss | Circuit breaker, retries with exponential backoff |
KYC takes too long | Timeout + notify user + async recheck |
🔚 9. Result
User receives onboarding confirmation and account number via SMS/email. Onboarding status available in UI via polling or event-driven push.
✅ Use Case: UPI Payment Flow – “Send Money to a UPI ID”
🧍♂️ Actor: End Customer (via Mobile Banking App)
🗺️ 1. Frontend Interaction
User Action: Opens mobile app → selects “Send Money” → enters recipient UPI ID and amount → authenticates via UPI PIN.
React Native app triggers API: POST api.bank.com/upi/payment
Encrypted payload: payer VPA, payee VPA, amount, remarks.
Token from Azure AD B2C is attached.
🔀 2. API Gateway Layer (Azure API Management)
Validates token (Azure AD B2C).
Applies rate-limiting: e.g., 100 req/sec per user/IP.
Routes request to upi-payment-service inside the AKS cluster via Istio ingress.
⚙️ 3. Microservices (Spring Boot on AKS with Istio)
✅ upi-payment-service
Performs basic validation (payer balance, UPI ID format).
Sends event upi.payment.initiated to Kafka.
Calls upi-auth-service for PIN validation.
✅ upi-auth-service
Validates encrypted UPI PIN using HSM/Tokenization (Azure Key Vault or Thales HSM).
Returns success/failure to upi-payment-service.
✅ account-service
Fetches payer account from Azure SQL or Cosmos DB.
Ensures sufficient balance.
Deducts balance (idempotent + ACID).
Emits upi.debit.success to Kafka.
✅ upi-router-service
Listens to upi.debit.success.
Routes payment to NPCI (or PSP gateway like YesBank, PayTM) via HTTPS with signed XML/JSON.
Handles external payment response.
Emits final upi.payment.status event (success or failure).
✅ transaction-service
Logs UPI txn with end-to-end trace ID.
Sends transaction.recorded event.
✅ notification-service
Sends SMS/email to payer/payee using Kafka event.
🔄 4. Event Flow on Kafka
Event | Producer | Consumer(s) |
upi.payment.initiated | upi-payment-service | auth, account |
upi.debit.success | account-service | upi-router-service |
upi.payment.status | upi-router-service | notification-service, transaction |
🔐 5. Security Layer
Istio enforces zero-trust (mTLS between services).
Azure AD token used for frontend/backend auth.
Token exchange supported for inter-service auth.
PII data encrypted (Azure Key Vault integration).
API Gateway applies threat protection rules.
🧮 6. Database & State Handling
Data | Store | Used By |
Payer/Payee details | Azure SQL | account-service |
UPI Transaction logs | Cosmos DB | transaction-service |
Failed Txn retry queue | Kafka DLT | upi-retry-service |
🛠️ 7. Reliability Patterns
Retry: Circuit breakers (Resilience4j) for PSP failure.
Idempotency key: Ensures duplicate txn requests are not reprocessed.
DLT (Dead Letter Topic): Captures failed Kafka events.
Alerting: Azure Monitor + Prometheus + Grafana dashboards.
🧰 8. CI/CD & Infra
Code in Azure Repos → Build & deploy via Azure DevOps Pipelines.
Services containerized with Docker → pushed to Azure Container Registry (ACR).
Deployed via Helm Charts to AKS (Azure Kubernetes Service).
Istio manages internal traffic, telemetry, retries.
🌐 9. External Integration
NPCI/UPI API or third-party PSPs.
Aadhaar/tokenized device fingerprinting.
Fraud engine (can optionally be triggered here).
📲 10. Final Response to User
App gets status: Txn Successful or Failed with reason.
Notification pops: “₹500 sent to abc@upi | Ref: TXN2345 | Time: 11:38 AM”.
コメント