System Design: Online Banking Platform
Context
Design an online banking platform (scope similar to a credit-card application system) that supports:
-
Secure user login
-
User account opening
-
ATM transactions (cash deposit and withdrawal)
-
Intra-bank transfers
-
Inter-bank transfers
-
Querying transaction statistics within a specified time window
Assume web and mobile clients, multi-currency support, and integration with ATM and interbank networks. Aim for high availability, strong consistency for balances, and near real-time analytics.
Requirements
Describe:
-
System architecture, core services, and data stores (e.g., user/account, ledger, ATM gateway, transfer orchestration).
-
Data schema for users, accounts, balances, transactions, holds/ledger, and audit trails.
-
API design, including idempotency for write operations.
-
Transaction processing and concurrency control to prevent double spending.
-
Consistency and recovery guarantees.
-
External integrations for inter-bank transfers and ATM networks.
-
Efficient time-window analytics (indexes, pre-aggregations, streaming, or OLAP).
-
Scalability and availability strategies.
-
Security controls (authentication, authorization, encryption).
-
Failure handling and retries.
-
Monitoring and on-call plan (key SLIs/SLOs, alerting rules, dashboards, runbooks).