Blue–green deployment
In software engineering, blue–green deployment is a method of installing changes to a web, app, or database server by swapping alternating production and staging servers.
Overview
In blue–green deployments, two servers are maintained: a "blue" server and a "green" server. At any given time, only one server is handling requests (e.g., being pointed to by the
Using this method of software deployment offers the ability to quickly roll back to a previous state if anything goes wrong. This rollback is achieved by simply routing traffic back to the previous live server, which still does not have the deployed changes.[2] An additional benefit to the blue–green method of deployment is the reduced downtime for the server. Because requests are routed instantly from one server to the other, there is ideally no period where requests will be unfulfilled.[3]
The blue–green deployment technique is often contrasted with the
History
Dan North and Jez Humble encountered differences between their test environments and the production environment while running Oracle WebLogic Server for a client sometime around 2005.[4] To ensure safe deployment, they introduced a method where the new application version was deployed alongside the live system. This approach allowed for thorough testing and easy rollback in case of issues. The team initially considered naming these environments A and B but decided against it to avoid perceived hierarchy. They instead chose color-based names like blue, green, orange, and yellow, eventually using only blue and green since "having two was sufficient".[5] This naming convention was adopted while working on the original Continuous delivery book published in 2010 [6] and became a common term in the industry afterwards.
References
- ^ LaToza, Thomas (2019). "Deployment" (PDF). Archived from the original (PDF) on 2020-01-14. Retrieved 2020-01-14.
- ^ Fowler, Martin (2010-03-01). "Blue Green Deployment". Archived from the original on 2020-01-10. Retrieved 2020-01-14.
- ^ a b Posta, Christian (2015-08-03). "Blue-green Deployments, A/B Testing, and Canary Releases". Archived from the original on 2018-03-30. Retrieved 2020-01-14.
- ^ Kuenzli, Stephen (2010-03-01). "Origin Story: The Blue-Green Deployment Method". Archived from the original on 2023-06-09. Retrieved 2024-01-23.
- ^ Terhorst-North, Daniel (2010-03-01). "Blue-Green deployment". Retrieved 2024-01-23.
- ISBN 978-0-321-60191-9.