Log inStart free
LESSON 33.09 · 5 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

Rolling deployments and health checks

Watch a new version replace four pods while probes guard every request.


Pro lesson. Stage 1 is free to watch. Pro opens all 5 stages, 3 controls and 3 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 33.09 · SESSION STORE4 PODS · 159 REQ/MIN · 39.75 EACH
01
Stage 1 of 5 · Deployment and Service
A Deployment keeps 4 pods of v1 on N1–N4. A Service sends each request to the next pod.
Explain it simply

The four bands are four copies of the chat API, one on each node. The Deployment is the order that says keep four of them running. The Service is one fixed address in front of them, so a client never needs to know which pod answers. It hands the 159 requests a minute to the pods in turn.

Four v1 pods run on nodes N1 to N4. The Service sends 159 requests a minute to them in turn, about 40 each. Node N5 is empty.

pod in the Service (v1 a tint, v2 solid)pod not ready (grey); dashed: starting, warming or hungrequest answeredpod that cannot answer, failed request or probe, restartnode, Deployment setting, minimum
N1N2N3N4N5spare0 s20406080100120pods inServiceServicechat-api159/min4 podsv1v1v1v1min 4needed for 159/min: 2.650 sdeployment and ServiceDeployment chat-api · 4 replicas · v1 → v2 · max surge 1 · max unavailable 0 · probes on159 requests/min ÷ 4 pods = 39.75 per podeach pod answers up to 60 a minuteN1N2N3N4N5spare0 s20406080100120pods inServiceServicechat-api159/min4 podsv1v1v1v1min 4needed for 159/min: 2.650 sdeployment and ServiceDeployment chat-api · 4 replicas · v1 → v2 · max surge 1 · max unavailable 0 · probes on159 requests/min ÷ 4 pods = 39.75 per podeach pod answers up to 60 a minute
Toy: the 33.05 nodes N1–N5, 159 requests a minute
STAGE 1 / 5
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
r=159n≤c\sy{r}{data}{r} = \frac{159}{\sy{n}{out}{n}} \le \sy{c}{param}{c}
r=1594=39.75≤60r = \frac{159}{4} = 39.75 \le 60

Each pod takes the request rate split over the pods in the Service.

Common mix-ups

MYTHA running container is ready for requests.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01With health checks on, if the new version is broken, does the rolling update replace all four pods?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
  • 4 more stages and 3 live controls
  • 2 mix-up cards and 3 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.