All tasks
Mediumsystem-designoptimizecost

Cut the bill

Acceptance: —Solved by: 0

Statement

A startup pays $4225 a month: a load balancer, 20 app instances, a 64 GB cache, a tier “l” database and two “l” replicas. The traffic is 400 requests/s, 800 at the peak. Simplify the diagram: fit the $2400 budget while keeping the SLO — ideally half of it. Count what each block contributes: one app instance per 300 requests/s, a write costs 3 units, a cache catches 60–95 % of reads.

Constraints

  • p95 ≤ 250 ms, errors ≤ 0.1 %, budget $2400/month, ≤ 5 instances per node.

Requirements

SimulationCut the cost
p95
≤ 250 ms
Errors
≤ 0.10 %
Budget
$2,400/mo
Users
20,000
Your architecture costs$4,225 / $2,400

★ within budget · ★★ ≤ 75 % · ★★★ ≤ 50 % of the budget

Scenarios (checked in order)
  1. 1Normal loadLoad

    400 requests/s for 60 seconds: 70 % reads, 20 % writes, 10 % static.

    60 s · 400 rps · R 70 / W 20 / S 10 %

  2. 2PeakSpike

    From second 20, traffic doubles for 30 seconds (800 requests/s).

    80 s · 400 rps · R 70 / W 20 / S 10 % · ×2 from s 20 for 30 s

Blocks

Click to add, or drag onto the canvas. Connect blocks by dragging from the right handle to the left one.

AI tutor

Stuck? Get a nudge — the tutor explains the idea, it never hands you the solution.

Solve this task to unlock the editorial.