All tasks
Hardsystem-designreliabilityfailover

Survive a database failure

Acceptance: —Solved by: 0

Statement

A payment service: 800 requests/s. At second 30 the primary database fails for 45 seconds. Without a replica that is a single point of failure: every request errors. With a read replica attached to the primary, reads move to it at once and after 15 seconds the replica is promoted and takes writes too. Up to 5 % errors are tolerated during the outage, but in the last 30 seconds the system must be fully back to normal. Pick the replica’s tier so it can carry everything once promoted.

Constraints

  • p95 ≤ 250 ms, errors ≤ 0.1 % (≤ 5 % during the outage), recovery in the last 30 s, budget $2000/month.

Requirements

SimulationBuild from scratch
p95
≤ 250 ms
Errors
≤ 0.10 %
Budget
$2,000/mo
Users
50,000
Your architecture costs$0 / $2,000

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

Scenarios (checked in order)
  1. 1Normal loadLoad

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

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

  2. 2Primary downFailure

    At second 30 the database fails for 45 seconds; errors ≤ 5 %, the last 30 seconds must meet the normal SLO.

    120 s · 800 rps · R 70 / W 20 / S 10 % · Database fails at s 30 for 45 s · SLO here: 5.0 % · back to normal in the last 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.