DEV Community

Sreekar Reddy
Sreekar Reddy

Posted on • Originally published at sreekarreddy.com

🔄 Rolling Deployment Explained Like You're 5

Gradual updates one server at a time

Day 101 of 149

👉 Full deep-dive with code examples


The Rotating Restaurant Staff Analogy

Imagine replacing all restaurant staff:

One way: Close the restaurant, swap a lot at once, reopen

Better way: Replace one waiter at a time while restaurant stays open

  • One leaves, one new person starts
  • Customers barely notice
  • If a new person struggles, it usually affects a small area

Rolling Deployment updates servers gradually!


The Problem It Solves

Deploying new code can be risky:

  • All at once: Problems can hit many users at once
  • Downtime: Users may not be able to use the app during updates
  • Rollback is hard: If something's wrong, more of the system is affected

How It Works

Instead of updating everything at once:

Several servers running the current version

Step: Replace one server with the new version
Step: Wait for it to become healthy and take traffic
Step: Repeat until everything is on the new version
Enter fullscreen mode Exit fullscreen mode
  • Some servers stay running
  • Users keep using the app
  • If the new version has problems, pause and roll back

Benefits

  • Reduced downtime → Some servers stay available
  • Gradual risk → Problems caught early
  • Simpler rollback → Pause the rollout and keep most servers on the old version
  • Automatic → Most platforms do this for you

Considerations

  • Version compatibility → Old and new versions run together briefly
  • Database changes → Often need to work with both versions
  • Can take longer than all-at-once → Takes time to complete

Compared To Others

  • Blue-Green: All at once to separate environment
  • Canary: Tiny % first, then rest
  • Rolling: Gradual, server by server

In One Sentence

Rolling Deployment updates servers one at a time so your application stays available throughout the entire update process.


🔗 Enjoying these? Follow for daily ELI5 explanations!

Making complex tech concepts simple, one day at a time.

Top comments (0)