← All guides
Skylight in the City Hall subway station
Grad School

What Is Zero-Downtime Deployment? Swapping Cars on a Moving Train

Zero-downtime deployment routes traffic to new instances while old ones drain, so users never see an error page. Ends with one small action you can take tonight.

Photo: Rhododendrites · CC BY-SA 4.0 · via Wikimedia Commons
3 min read · Updated 2026-11-30 · Grad School
Jump to quick answers ↓
Direct answer

Zero-downtime deployment routes traffic to new instances while old ones drain, so users never see an error page.

Zero-downtime deployment routes traffic to new instances while old ones drain, so users never see an error page. Everything below expands that one sentence into something you can actually use, in four short sections.

The core idea

Start with the mechanism itself. Health checks gate readiness, and load balancers remove draining instances only after in-flight work completes. Database migrations must run before code that needs them, using expand-then-contract patterns.

Graceful shutdown handles SIGTERM properly, finishing requests before exit. Hold that thought, because the next section turns it into practice.

How it actually works

Next, the moving pieces. No; load balancers and rolling scripts achieve the same.

readiness probeWhat Is Zero-Downtime Deploymeexpand-contractWhat Is Zero-Downtime DeploymeSIGTERMWhat Is Zero-Downtime Deployme
PieceWhat it meansWhy it matters
readiness probethe check gating traffic to an instanceit separates beginners from the fluent
expand-contracttwo-phase migration compatibilityit is what exams ask about
SIGTERMthe shutdown signal handlers should respectit separates beginners from the fluent

Where people get it wrong

The common mistakes form a short list worth learning early. Migrations running after new code, or handlers ignoring shutdown. That leaves one piece missing, and the next section supplies it.

Common beliefThe accurate version
Do I need Kubernetes for this?No; load balancers and rolling scripts achieve the same.
Is downtime ever acceptable?For batch systems yes; for user-facing services it compounds.

Quick answers

Test yourself before moving on; the pause is the point.

Do I need Kubernetes for this?Pause to think. Then press enter to reveal.

Answer:No; load balancers and rolling scripts achieve the same.

What breaks most often?Pause to think. Then press enter to reveal.

Answer:Migrations running after new code, or handlers ignoring shutdown.

Is downtime ever acceptable?Pause to think. Then press enter to reveal.

Answer:For batch systems yes; for user-facing services it compounds.

From BrainRemember this without rereading.

Drop the PDF in, get a 3D map of its ideas, and quiz the red nodes until they turn green.

Open Brain — free

Key terms

readiness probe
the check gating traffic to an instance
expand-contract
two-phase migration compatibility
SIGTERM
the shutdown signal handlers should respect

the check gating traffic to an instance

two-phase migration compatibility

the shutdown signal handlers should respect

Write the direct answer in your own words before reading further.

If a term above still feels foggy, that is your next study target.

Testing yourself once now beats rereading this page three times later.

The fastest learners treat confusion as a map, not a verdict.

Small daily reviews compound into knowledge that survives the exam.

Explain one piece of this to someone else and watch the gaps surface.

Your notes should carry questions, not just answers.

The goal tonight is one honest attempt, not a perfect one.

A study method only counts when it survives contact with a real exam week.

Understanding arrives in layers, and the second layer is usually where marks are won.

Practice makes permanent, so practice the version of the habit you want to keep.

When in doubt, return to the direct answer at the top of this page.

Reading about a method changes nothing; running it for one week changes plenty.

The term readiness probe appears throughout this page on purpose; repetition here is structure, not padding.

Notice how the direct answer, the table and the quick answers all point at expand-contract.

Revisit this page after one week and the retrieval will feel different from reading it today.

Tonight, send SIGTERM to your app and watch the logs, because graceful shutdown is verified, not assumed.

Filed underdevopsbackend
Share this guide
Cite this guide
APABrain — try4ever. (2026, November 30). What Is Zero-Downtime Deployment? Swapping Cars on a Moving Train. Brain Blog, try4ever.com. Retrieved November 30, 2026, from https://www.try4ever.com/blog/what-is-zero-downtime-deploy/
MLA"What Is Zero-Downtime Deployment? Swapping Cars on a Moving Train." Brain Blog, try4ever, 30 Nov. 2026, www.try4ever.com/blog/what-is-zero-downtime-deploy/. Accessed 30 Nov. 2026.
ChicagoBrain — try4ever. "What Is Zero-Downtime Deployment? Swapping Cars on a Moving Train." Brain Blog, try4ever.com, November 30, 2026. https://www.try4ever.com/blog/what-is-zero-downtime-deploy/.
BibTeX@misc{brain2026what-is-zero-downtime-deploy, author = {{Brain — try4ever}}, title = {What Is Zero-Downtime Deployment? Swapping Cars on a Moving Train}, year = {2026}, howpublished = {\url{https://www.try4ever.com/blog/what-is-zero-downtime-deploy/}}, note = {Brain Blog, try4ever.com; published 2026-11-30} }
Link to this guide
HTML<a href="https://www.try4ever.com/blog/what-is-zero-downtime-deploy/">What Is Zero-Downtime Deployment? Swapping Cars on a Moving Train</a> — Brain, try4ever.com
Markdown[What Is Zero-Downtime Deployment? Swapping Cars on a Moving Train](https://www.try4ever.com/blog/what-is-zero-downtime-deploy/) — Brain, try4ever.com

Reproducing a paragraph elsewhere? Keep the source line that appears when you copy it — that citation is what search engines and AI assistants credit back to this page.

From Brain Your devops map, tonight.

The step above takes ten minutes. Do it on a map: drop the file in, quiz the first node, watch it turn green. It does not leave your device.

Free plan: 21 nodes. No card, no countdown.

Build my map — free