KatInterview

Architecting a High-Throughput Multi-Region Data Service

System DesignModel answer
HardModel answerSystem Designsystem-designdistributed-systemsmulti-region

Last updated

Design a multi-region metadata engine processing 50k peak QPS under 100 ms p95 latency, complete with capacity sizing, queueing performance modeling, and resiliency patterns.

Design a multi-region entity and metadata management service that handles 50,000 peak queries per second (QPS) across global regions with an end-to-end p95 latency under 100 ms.

Your solution must address both structural system architecture and analytical performance modeling. Specifically, cover the following areas:

  1. System Scope & Requirements: Define core functional capabilities (APIs) and non-functional guarantees (availability, latency target, consistency model).
  2. Back-of-the-Envelope Sizing: Estimate hardware requirements, database footprint, cache sizes, bandwidth/egress, and 12-month data growth under realistic read/write ratios and peak-to-average multipliers.
  3. Data & Storage Architecture: Define the schema, indexing, partitioning strategy (sharding/virtual nodes), handling of hot keys, and cross-region replication mechanics.
  4. Caching & Read/Write Flows: Outline the caching topology, invalidation mechanisms, read-your-writes guarantees, and thundering herd mitigations.
  5. Analytical Performance & Queueing Model: Build a mathematical model decomposing end-to-end service time. Use queueing theory principles (such as Little's Law and M/M/c models) to estimate p95/p99 tail latency under varying utilization rates ($\rho$), identifying primary performance bottlenecks.
  6. Operational Resiliency & Validation: Detail fallback tactics (circuit breaking, load shedding, bulkheading), deployment strategies (canary, multi-region rollouts), metrics/SLOs, and load-testing methodology to validate your model.