Lab · Reliability
Orchestrator: copies, machines and autoscaling
You say how many copies of an app you want. An orchestrator places them on machines, replaces the ones a dead machine took with it, and can add copies when traffic grows. Watch where the copies go, and how long each fix takes.
Try it
The lab is busy, so only some requests are drawn as dots, few enough to follow. The numbers still count every request.
- Users — 120 requests/s — healthy
- Load balancer — 6 copies take traffic — healthy
- Machine 1 — 2 of 4 CPUs — healthy — 2 run
- C1 — running — healthy
- C4 — running — healthy
- Machine 2 — 2 of 4 CPUs — healthy — 2 run
- C2 — running — healthy
- C5 — running — healthy
- Machine 3 — 2 of 4 CPUs — healthy — 2 run
- C3 — running — healthy
- C6 — running — healthy
- Request
- Response
- Error / rejected
Copies running
6/ 6 wanted
Healthy: can serve about 240 requests/s
Pending
0
6 of 12 CPUs reserved
CPU use
45%
of the running copies, last second
Failing now
0%
of requests, over the last 2 s
Time to recover
–
no machine has died yet
Failed since traffic rose
0
requests
Numbers add up:351 arrived = 328 answered + 0 sent to a dead machine + 0 refused, no free copy + 23 in progressThe lab checks this sum as it runs, so a counting mistake would show here.
Controls
WantedRunning
Show data table
| Time | Wanted | Running |
|---|---|---|
| 1s | 6 | 6 |
| 1s | 6 | 6 |
| 2s | 6 | 6 |
| 2s | 6 | 6 |
| 3s | 6 | 6 |
| 3s | 6 | 6 |
CPU useFailed requests
Show data table
| Time | CPU use | Failed requests |
|---|---|---|
| 1s | 42.1 | 0 |
| 1s | 60.4 | 0 |
| 2s | 53.8 | 0 |
| 2s | 38.8 | 0 |
| 3s | 38.8 | 0 |
| 3s | 50.4 | 0 |
What just happened
Nothing yet. Start traffic or run an experiment.
What this model simplifies
- Every copy is the same size: 1 CPU. Real copies ask for different amounts of CPU and memory, and placing them is a harder puzzle.
- A copy always starts in 2 s. Real ones take seconds to minutes, mostly to fetch the container image.
- A dead machine is noticed after 3 s, and its copies are replaced at once. Kubernetes marks a silent machine not ready after about 40 s, and by default waits 5 more minutes before it replaces the copies.
- The load balancer learns of a dead machine at the same moment as the orchestrator. A real one has its own health checks, which are often faster.
- The autoscaler looks every 5 s and removes copies after 15 quiet seconds. The Kubernetes one looks every 15 s, reads CPU numbers that are already some seconds old, and waits 5 minutes before it removes copies.
- A request that finds every copy busy fails at once. There is no queue and no retry.
- "CPU use" is the share of each copy's 8 request slots in use. The load balancer picks at random among the copies with a free slot.
- Only copies are added by the autoscaler. Adding machines is your job here, and takes no time.