Skip to content

Failure lab

Break a system on purpose. Watch the failure cascade from one component to the next. Choose fixes that each protect something and cost something, run the same failure again, and compare.

How a failure lab works

  1. Break it: press the button and watch the failure unfold, with play, pause, step and speed.
  2. Read the cascade: from busy components to queues, latency, timeouts and errors, with when each step began.
  3. Choose fixes: each one says what it protects and what it costs.
  4. Run it again and compare: the same failure at the same moment, so only your changes differ.

Every figure comes from a model that lists what it leaves out, under each lab. The numbers are illustrative: they show how a failure unfolds, not what a real product would do.

The eight failure labs

  • Kill Redis

    Redis answers almost every read. Choose how the application reacts when it cannot be reached, kill Redis, and watch where the work goes.

    Runs on the cache model: single requests, expiry times and a database queue.

    Open the lab
  • Kill an API instance

    Lose one of three API instances when the other two cannot carry the traffic. Watch a queue grow, latency climb and requests start to time out.

    Runs on the system model: components, queues, timeouts and retries over time.

    Open the lab
  • Add 10x traffic

    Ten times the traffic arrives at once. See what gives way first, and what gives way next when you fix it.

    Runs on the system model: components, queues, timeouts and retries over time.

    Open the lab
  • Introduce 500 ms latency

    The network to the API tier becomes 500 ms slower. Nothing is broken, yet a timeout and a retry can turn it into an outage.

    Runs on the system model: components, queues, timeouts and retries over time.

    Open the lab
  • Slow dependency (not dead)

    The database still answers, ten times slower. See why a slow dependency can do more damage than a dead one.

    Runs on the system model: components, queues, timeouts and retries over time.

    Open the lab
  • Kill the database

    The database stops answering. Find out how much of the system still works, and what a replica or a bigger cache would change.

    Runs on the system model: components, queues, timeouts and retries over time.

    Open the lab
  • Kill the primary (failover)

    Kill the primary database and watch writes fail until a replica is promoted, then count the acknowledged writes the replica never received.

    Runs on the system model: components, queues, timeouts and retries over time.

    Open the lab
  • Replication lag

    Send a burst of writes and watch the replicas fall behind: the further behind they are, the older the data their reads return.

    Runs on the system model: components, queues, timeouts and retries over time.

    Open the lab
  • Network partition

    Cut the link between the primary and its replicas and watch both sides carry on, with data that drifts apart, unless you choose to refuse writes.

    Runs on the system model: components, queues, timeouts and retries over time.

    Open the lab
  • Duplicate request

    Slow the link to the primary so that answers come back too late, and watch a retried write run again and again.

    Runs on the system model: components, queues, timeouts and retries over time.

    Open the lab

Built by GhaziAlibi.

© ShardCraft. All rights reserved.