What is blue-green deployment?
Blue-green deployment keeps old and new application versions in separate environments and shifts traffic between them.
How it works and where it is used
The new environment is checked before taking traffic. Error rates and latency are monitored after switching, with potential return to the old version. But a schema change or irreversible external action may make old code incompatible, so traffic rollback alone is not always enough.
Limits, safety and selection criteria
Plan for two environments, session behavior and duplicate background jobs. Design data compatibility for rollback. A small pilot can expose problems before a full switch; choose a release method according to product risk. While blue serves traffic, green is prepared and tested against compatible data. Routing may switch at a load balancer, while DNS caching can prevent an instant cutover. If both environments consume the same job queue, duplicate emails or charges may result. For schema changes, an intermediate format readable by both app versions preserves rollback options. Rehearse the switch and the return path before relying on them in production. A new environment that passes only a homepage check may still fail on checkout or login.