Course contentsShow
← Software Engineering
Lesson 711 of 1,93322. Continuous Delivery and DeploymentFree lesson

Rolling Deployments

Update instances incrementally across your fleet, maintaining service availability throughout the deployment.

Rolling Deployments

What you'll learn: How to update your application incrementally across multiple servers to maintain continuous availability during deployments.

The Core Idea

A rolling deployment updates your application instance by instance, gradually replacing the old version across your entire server fleet. Instead of taking everything down at once or running two complete environments, you update a few servers at a time while the rest continue serving traffic.

Think of it like renovating a restaurant: instead of closing the whole place for weeks, you renovate one section at a time. Customers keep dining in the finished sections while work continues elsewhere. The restaurant never fully closes, but eventually, everything gets updated.

How It Works

  1. Remove one instance from the load balancer (stop sending it traffic)
  2. Update that instance to the new version
  3. Verify it's healthy and working correctly
  4. Add it back to handle traffic
  5. Repeat for the next instance until all are updated

During this process, both old and new versions run simultaneously for a period. The load balancer routes requests to whichever instances are available and healthy.

Key Considerations

Gradual risk exposure: If the new version has problems, only a portion of users are affected initially. You can halt the rollout and investigate.

Version compatibility: Your old and new versions must coexist gracefully. Database schemas, APIs, and shared resources need to work with both versions during the transition period.

Duration: Rolling deployments take longer than instant switches like blue-green, but they require fewer total resources since you're not running duplicate infrastructure.

Key Takeaway: Rolling deployments update your fleet incrementally, maintaining service availability by ensuring some instances always remain operational, though old and new versions temporarily coexist.