HLD-328·Transactions & Locking
Hard · 1,500 ptsMulti-Tenant Merchant Checkout, Cart Hold & Drop Isolation
Design a Shopify-scale multi-tenant e-commerce checkout platform where a celebrity sneaker/cosmetics drop on one storefront generates 150k RPS without degrading checkout latency for 100,000 calm independent merchants sharing the platform.
Max p99
≤ 65 ms
Availability
≥ 99.7%
Budget
≤ $9,900
Functional Requirements
- FR-1POST /v1/shops/{shop_id}/checkouts — Validates bot-queue token, places atomic TTL inventory reservation on SKU, and computes tax/shipping.
- FR-2POST /v1/shops/{shop_id}/checkouts/{checkout_id}/complete — Commits idempotent payment + order creation and decrements reserved SKU stock.
- FR-3DELETE /v1/shops/{shop_id}/checkouts/{checkout_id} — Releases expired/abandoned cart holds back into available SKU inventory.
- FR-4Strict zero-oversell per sku_id AND strict noisy-neighbor pod/shard bulkhead isolation so calm shop_ids hold p99 <= 60 ms.
Workload Profile
Multi-Tenant Baseline52,000 Storefront & Cart Read RPS / 9,000 Checkout Write RPS
Viral Celebrity Merchant Drop148,000 Read RPS / 26,000 Checkout Write RPS
Active Working Set40 GB hot SKU inventory counters, checkout leases & shop routing cells
Isolation GateZero oversell (strict serializable SKU) + cell/shard noisy-neighbor isolation
Consistency Model
Strict atomic SKU stock reservation + idempotent checkout completion with synchronous/quorum durability.
Solutions Locked
Sign in and either achieve AC or complete 3 official submissions on this question to inspect community diagrams and writeups.
Loading solutions...
Submission History (0)Select to replay
No submissions yet
Click Submit in the top bar to evaluate against all 7 judge cases and save each run here.
Click an item in Inventory above, or press B to add a component, double-click to name, C to connect.
Design Write-up
Write under ### Architecture for Diagram to take that up directly
Compulsory section · if not written yet, Diagram reads from the start of your write-up.
Architecture: required·FRs mentioned: 0/4·0 boxes · 0 edges
0 words