Start Here

Tier 1 · Building Blocks

Scale Reads

Scale Writes

Database Selection

Traffic Control

Consistency & Coordination

Estimation

Tier 2 · Core Systems

Tier 3 · Location & Real-Time

Tier 4 · Infrastructure & Data

Tier 5 · Finance & Commerce

Tier 6 · Advanced & Collaborative

Phase 1 — Clarify & Scope

Interviewer: Design a payment system — think Stripe, PayPal, or an internal payment service for an e-commerce platform. What do you want to clarify?

Candidate: Critical questions:

  1. What's the payment flow — are we processing cards directly (acquirer integration), or acting as a payment orchestrator on top of existing PSPs (Stripe, Braintree)?
  2. What payment methods — credit/debit cards, ACH, digital wallets, BNPL?
  3. What's the transaction volume and average value?
  4. Synchronous (user waits for confirmation) or async (bank transfer)?
  5. Which compliance requirements — PCI-DSS, SOC2, geographic regulations?

Interviewer: Payment orchestrator on top of PSPs (Stripe primary, Braintree as fallback). Credit/debit cards and digital wallets. 100,000 transactions/day, average $50. Synchronous confirmation required — user waits for payment success/failure. PCI-DSS compliance required.

Candidate: Let me size this:

Transaction rate=100,00086,400≈1.16 txns/sec average\text{Transaction rate} = \frac{100{,}000}{86{,}400} \approx 1.16 \text{ txns/sec average}

Peak (10× average)=11.6 txns/sec\text{Peak (10× average)} = 11.6 \text{ txns/sec}

Daily volume=100,000×$50=$5M/day\text{Daily volume} = 100{,}000 \times \$50 = \$5\text{M/day}

Annual volume=$5M×365=$1.825B/year\text{Annual volume} = \$5\text{M} \times 365 = \$1.825\text{B/year}

At typical PSP fees of 2.9% + $0.30 per transaction:

Processing cost=100,000×(0.029×$50+$0.30)=$175,000/day\text{Processing cost} = 100{,}000 \times (0.029 \times \$50 + \$0.30) = \$175{,}000/\text{day}

Interviewer: What are the core requirements?

Candidate:

  • Accept payment (card tokenization → charge via PSP)
  • Route to best PSP (lowest cost, highest approval rate, geographic availability)
  • Handle PSP failure with automatic retry and failover
  • Idempotent payment operations — never double-charge
  • Full audit trail for…

In the full tutorial

  • Phase 2 — High-Level Architecture
  • Phase 3 — Deep Dive & Evolution
  • Phase 4 — Robustness & Operations

Glossary history

Click dotted jargon to save explanations here.