{"canonical_url":"https://engineer.company/glossary/rolling-update/","content_markdown":"# Rolling update\n\n## What it is\n\nA rolling update replaces running instances of an application in steps. Some\ninstances remain available while the system brings up replacements and removes\nthe older version. During the transition, an old and a new version can serve\nrequests at the same time. The updating controller follows a desired state and a\nset of limits that govern how quickly it changes the live population.\n\nKubernetes Deployments implement this through ReplicaSets. For a Deployment\nusing the RollingUpdate strategy, maximum surge limits how many additional\nreplicas the controller can create during the rollout. Maximum unavailable\nlimits how many replicas may be unavailable relative to the desired count. An\navailable replica has to meet the Deployment's readiness conditions long enough\nwhere a minimum ready time is configured. Capacity and readiness influence what\nthe controller can safely do next.\n\nA rolling update describes the replacement process. A sound release also defines\nthe artifact, the changes made to shared dependencies and the conditions under\nwhich an operator can stop or roll back. For a stateful service, volume\nownership and ordered replacement may call for a different controller or a more\nspecific plan. Identify what remains shared while versions overlap, because\ncompatibility across that period is part of the design.\n\n## Why it matters\n\nReplacing every instance at once can produce a noticeable outage even if the new\nimage is healthy. Startup, connection establishment and cache warming take time.\nMaintaining a working population during replacement gives clients somewhere to\ngo while the new instances start. It can also give operators time to notice an\nunexpected decrease in request success while some old capacity is still\navailable.\n\nThe trade-off is that both versions may receive requests during the rollout. A\nclient can call one version for a read and another for a write. Instances can\nuse the same database, cache or job queue. A change that removes a field the old\ncode still needs can fail even if the new code works by itself. Create a\ncompatibility period for shared formats, then remove old support after the\naffected instances and clients have moved.\n\nCapacity must be planned along with compatibility. An additional replica needs\nresources where it lands, and existing connections can continue briefly as an\nold instance terminates. If replacement Pods wait for space, a rollout can stay\npending while the original application still serves traffic. Test the effect of\nlimited resources and identify which observation signals that the release is\nmaking progress. Readiness, request success and available capacity tell\ndifferent parts of that story.\n\n## What it looks like in practice\n\nConsider a service with three desired replicas. Use an illustrative rollout\npolicy that permits one extra replica and requires all three to remain\navailable. The controller can start a fourth instance while the old three are\neligible for traffic. Once the replacement becomes available, it can remove one\nold instance and continue. In a live cluster, a terminating Pod can still occupy\ncapacity while it shuts down. Include that overlap when estimating the resources\nthe rollout needs.\n\nAn application release can add a database column in a backwards-compatible step\nand deploy code that handles both relevant row shapes. Test an old instance\nreceiving a request after the schema change. Then test the new instance reaching\nthe expected ready condition before directing requests to it. Keep a separate\nlater transition for dropping obsolete data or tightening requirements once the\ncompatibility period is over.\n\nEngineer's\n[GIS SaaS delivery case study](/portfolio/automated-gis-saas-deployment-with-github-actions/)\ndescribes making test, build and deployment repeatable with GitHub Actions and\nconsistent configuration. A repeatable pipeline gives a rolling deployment the\nsame kind of foundation. The automation can identify the precise image, wait for\nreadiness and collect service observations before it reports release success.\nThe example here makes those checks explicit for a Kubernetes workload.\n\n## Where it goes wrong\n\nA rollout can appear complete from the number of running processes while the\nservice's response has changed for users. A Pod might respond to a simple\nendpoint and still fail on an important application request. Observe a real read\npath, the expected response code and any important dependency calls before\naccepting the new version. Record the revision serving each test so results from\nthe old instances are easy to identify.\n\nKeep the build identity visible to operators and to checks that can reach\nindividual instances. During overlap, total error rates can hide a fault\nconcentrated in the single new replica. Group the results by release for the\nduration of the rollout and compare the experienced request rate as well as the\nnumber of active Pods. Watch the same measures during the final replacement,\nwhen the new version begins receiving the full share of normal traffic.\n\nA stop or rollback also needs a plan. New releases sometimes write data in a\nformat the old version cannot read. A rollback to that version can then leave\nrequests failing even after the earlier image starts. Rehearse recovery while\nboth versions have access to representative data. Give operators a condition\nthat distinguishes a deployment that is merely slow from one with no usable\nreplacements. A rollout's progress deadline helps report stalled progress, and\nthe response still needs an explicit decision.\n\nFinally, consider draining and queued work. A replacement system can stop new\ntraffic to an old instance while clients and workers still hold existing\nconnections. Keep request handling bounded, and test what happens to active\nusers when the old process is removed. A reliable rolling update leaves enough\nevidence to explain which instance served an operation, how data remained\ncompatible, and what the system does when the release stops progressing.\n\n## Further reading\n\n- [Kubernetes Deployments](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/).\n  Describes rolling update settings, availability and rollout status.\n- [Kubernetes rolling-update tutorial](https://kubernetes.io/docs/tutorials/kubernetes-basics/update/update-intro/).\n  Shows how traffic stays available during incremental replacement.\n- [kubectl rollout reference](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_rollout/).\n  Documents rollout observation and supported control commands.\n\n\u003chttps://engineer.company/glossary/rolling-update/\u003e\n","date_modified":"2026-11-25T07:18:46Z","description":"Plan a Kubernetes deployment with overlapping versions, explicit availability limits and conditions for a safe rollback.","formats":{"gemtext":"https://engineer.company/glossary/rolling-update/index.gmi","gopher":"https://engineer.company/glossary/rolling-update/gophermap","html":"https://engineer.company/glossary/rolling-update/","json":"https://engineer.company/glossary/rolling-update/index.json","markdown":"https://engineer.company/glossary/rolling-update/index.md","pdf":"https://engineer.company/glossary/rolling-update/index.pdf"},"kind":"page","language":"en","title":"What is a rolling update?","url":"https://engineer.company/glossary/rolling-update/","version":1}