Lab · Reliability

Deployments

Six servers behind a load balancer run version 1 of an app. Ship version 2 in one of four ways, and make it faulty if you like. Watch how much traffic reaches it, how many requests fail and how fast you can go back.

Try it

Lab time 3.0 s
Blue set: servers 1 to 6Green set: no servers runningUsers, 30 requests/sUsers30 requests/s4 in progressLoad balancer, 0% to version 2Load balancer0% to version 26 of 6 servers servingServer 1, version 1, V1Server 1version 117% · 3/3 busyV1Server 2, version 1, V1Server 2version 117% · 0/3 busyV1Server 3, version 1, V1Server 3version 117% · 0/3 busyV1Server 4, version 1, V1Server 4version 117% · 0/3 busyV1Server 5, version 1, V1Server 5version 117% · 0/3 busyV1Server 6, version 1, V1Server 6version 117% · 1/3 busyV1

The lab is busy, so only some requests are drawn as dots, few enough to follow. The numbers still count every request.

  • Users — 30 requests/s — healthy — 4 in progress
  • Load balancer — 0% to version 2 — healthy — 6 of 6 servers serving
  • Server 1 — version 1 — healthy — V1 — 17% · 3/3 busy
  • Server 2 — version 1 — healthy — V1 — 17% · 0/3 busy
  • Server 3 — version 1 — healthy — V1 — 17% · 0/3 busy
  • Server 4 — version 1 — healthy — V1 — 17% · 0/3 busy
  • Server 5 — version 1 — healthy — V1 — 17% · 0/3 busy
  • Server 6 — version 1 — healthy — V1 — 17% · 1/3 busy
  • Request
  • Response
  • Error / rejected
Traffic on version 2
0%
nothing shipped yet
Failed requests
0
since the start
Error rate now
0%
over the last 2 s
Servers serving
6/ 6
most running in this release: 6
Refused for lack of room
–
compares before and during a rollout
Time to roll out
–
Time to roll back
–

Numbers add up:94 arrived = 90 served by version 1 + 0 served by version 2 + 0 failed by the bug + 0 refused for lack of room + 4 in progressThe lab checks this sum as it runs, so a counting mistake would show here.

Controls

How to ship

One server at a time leaves, restarts on version 2 and returns.

Release

Now: Every server runs version 1.

Half of the requests that version 2 serves fail.

Pulls version 2 when over 5% of its last 20 requests failed.

Traffic
30/s

Each server handles 3 requests at once, so 6 servers have 18 slots.

Where requests went

  • Served by version 190
  • Served by version 20
  • Failed by the bug0
  • Refused for lack of room0
Error rate and traffic on version 2 (%)
Failed requestsTraffic on version 2
02550751001s2s3s
Show data table
TimeFailed requestsTraffic on version 2
1s00
1s00
2s00
2s00
3s00
3s00

What just happened

Nothing yet. Start traffic or run an experiment.

What this model simplifies
  • Every request is the same size and takes 40 to 120 ms. Real requests vary far more.
  • A request that finds every slot full fails at once. There is no queue and no retry, as a real load balancer or client would add.
  • A server always takes 2 s to start. Real servers take seconds to minutes, and some fail to start.
  • A rolling update never adds a spare server first. Real ones often start one extra server before they take one out.
  • Blue-green keeps the old servers for only 10 s. Real teams keep them for minutes or hours.
  • The release changes no database table. A real release often has to change the data first.
  • The bug fails half of the requests on version 2. Real bugs can be rare, slow, or hit only some users.
  • Health checks are instant: version 2 is judged on its last 20 requests. Real monitors need seconds or minutes to notice a problem.
  • The load balancer never fails, and it moves traffic in no time at all.