System ArchitectureSystem Architect

How would you architect a cell-based, fault-isolated deployment topology for a mission-critical payment processing platform that guarantees blast radius containment during regional failures, enables zero-downtime cluster rotations, and maintains cross-cell data consistency for transactional integrity?

Pass interviews with Hintsage AI assistant

Answer to the question

Cell-based architecture partitions a service into independent instances called cells, each capable of handling a subset of traffic autonomously. For a payment platform, each cell comprises a complete stack: load balancers, application servers, databases, and message queues, deployed across multiple availability zones but isolated from other cells at the network and data layers. Traffic routing relies on deterministic sharding using customer identifiers, ensuring a single customer maps exclusively to one active cell while maintaining the ability to drain and rotate cells without service disruption.

Consistency across cells for cross-cutting concerns (e.g., fraud detection, regulatory reporting) is achieved through asynchronous event replication using Change Data Capture (CDC) streams, while intra-cell transactions maintain ACID guarantees via local database clusters. Cell rotation leverages blue-green deployment patterns within the cell boundary, coupled with circuit breakers and health-check-based traffic steering at the global Edge CDN layer to isolate degraded cells automatically.

Situation from life

A tier-1 payment processor handling $15 billion daily transactions experienced a catastrophic cascading failure in their US-East regional monolith when a database index corruption propagated across availability zones. This resulted in a 4-hour global outage affecting 40 million customers and violating PCI DSS availability requirements. The post-mortem revealed that shared infrastructure components created hidden failure dependencies, violating the principle of independent failure domains required for high availability in financial systems.

Solution A: Active-Active Multi-Regional Replication

This approach would deploy identical stacks in multiple regions with multi-master database replication using Galera Cluster or CockroachDB, allowing writes in any region. The primary advantage is full resource utilization and geographic locality for latency reduction. However, the complexity of conflict resolution for financial transactions introduces unacceptable risks of double-spending or inconsistent balance states during network partitions, while the operational burden of managing vector clocks and merge conflicts scales exponentially with transaction volume.

Solution B: Active-Passive with Hot Standby

Implementing a hot standby architecture maintains a secondary region in constant sync via synchronous replication, ready to assume traffic within seconds of primary failure. This ensures strong consistency and eliminates split-brain scenarios through explicit failover orchestration. The critical drawback is 50% resource waste during normal operations, and the inability to perform gradual rotations or updates without full cutover events, complicating routine maintenance windows and increasing deployment risk.

Solution C: Cell-Based Partitioning with Deterministic Routing

The selected architecture partitions the customer base into 20 distinct cells, each handling 5% of global traffic with isolated Kubernetes clusters, dedicated PostgreSQL primaries, and independent Kafka brokers. Envoy Proxy sidecars implement consistent hashing on customer_id to route requests to specific cells, while a global control plane monitors cell health and orchestrates traffic drainage during rotations. This limits blast radius to 5% of users during cell-level failures and enables zero-downtime rotations by gradually shifting traffic to new cell generations using canary analysis and automated rollback triggers.

Following implementation, the platform achieved 99.999% availability (less than 5 minutes downtime annually), reduced incident blast radius by 95%, and decreased deployment risk through cell-level canary deployments that validated changes against production traffic subsets before global rollout.

What candidates often miss

How do you maintain referential integrity for entities that span multiple cells, such as corporate accounts with sub-accounts distributed across different cells?

Candidates often incorrectly assume strict cell isolation prevents any cross-cell transactions. The solution implements a Saga pattern with compensating transactions orchestrated by a lightweight Temporal or Camunda workflow engine running in a separate control plane. For cross-cell operations, the system uses two-phase commit (2PC) only for the coordination phase, while actual mutations remain cell-local. Idempotency keys ensure that partial failures during distributed operations can be safely retried without duplicating financial impacts. Additionally, materialized views in a global read-only cache provide eventually consistent cross-cell queries without violating isolation boundaries.

How would you handle data residency compliance (e.g., GDPR, PCI DSS) when cells must span geopolitical boundaries for disaster recovery?

Many candidates overlook the legal implications of cell placement. The architecture implements geo-fenced cells where primary data storage remains within sovereign boundaries, while secondary cells act as encrypted warm standbys with cryptographic shredding capabilities. Homomorphic encryption techniques allow fraud detection algorithms to operate on encrypted cross-border data without decrypting sensitive PII in foreign jurisdictions. Cell traffic routing incorporates geolocation-aware DNS (Route 53 Geoproximity routing) to ensure EU customers never traverse US cells unless explicitly authorized for disaster recovery scenarios, with automated data residency audits verifying cell placement compliance through Infrastructure as Code (IaC) scanning.

What mechanisms prevent "thundering herd" problems when a failed cell recovers and thousands of clients simultaneously attempt to reconnect, overwhelming the restored instance?

This subtle operational issue is frequently neglected. The solution employs token bucket rate limiting at the API Gateway layer specifically for cell re-entry, coupled with exponential backoff jitter in client SDKs. Upon cell recovery, the control plane gradually increases the routing weight using linear interpolation from 0% to 100% over a 15-minute window while monitoring p99 latency and error rates. Connection pooling with adaptive concurrency limits in Envoy prevents connection exhaustion, while warmup requests (synthetic transactions) validate cell health before accepting customer traffic. Cache warming jobs proactively populate Redis clusters in the recovering cell to prevent cache stampede on cold storage.