Unit content
Rolling, blue-green and canary deployments
A deployment strategy controls how a new version replaces an old one while the service remains in use.
A rolling deployment replaces instances gradually. Old and new versions coexist, so they must tolerate the requests, data and dependencies they can encounter during that overlap.
A blue-green deployment prepares a complete new environment beside the old one and switches traffic when the new environment is ready. Switching back can be fast when external state remains compatible.
A canary deployment sends a small fraction of real traffic to the new version first. Its behavior can be compared with the established version before exposure increases.
These strategies reduce different risks but do not make an incompatible change safe. Shared databases, queues and external APIs can outlive individual application instances.
A deployment plan must therefore consider both traffic movement and compatibility of the state and interfaces shared by old and new versions.