Blue-Green Deployment Strategy

by Matt Beck

At Ambrose Fox, we are always looking for ways to improve what we do. An essential part of our work is researching strategies and ideas while keeping up-to-date with the newest technologies. It’s exciting to discover something innovative that will enhance performance, eradicate inefficiencies and generally make things better.



Currently, our method for hosting applications is to group them together and host them on dedicated servers. Each server runs Apache, various PHP versions and hosts each application’s MySQL database.


While this method works and allows for easy deployments via SFTP, it does not allow for any redundancy and is not very resilient. Therefore, if something goes wrong with an update to an application, the site would be unusable until we fixed the issue.


A Blue-Green deployment strategy is where two identical copies of the same application run in parallel at the same time. Only one copy (e.g. Blue) will be live and receive traffic, the other will remain offline (e.g Green). A load balancer in front of the Blue and Green servers keeps track of which one is live. When an update is released for an application, only the offline server will receive it and the load balancer will start sending the traffic to it. So Green is now live and Blue is offline.




This strategy works on alternating which copy of an application is the live version. One copy is only ever one update ahead of the other, and we can very quickly switch the traffic back after an update if there is a problem.


Our goal is to move to a Blue-Green deployment strategy for all our solutions and in doing so achieve the following:

  • Zero downtime deployments for all containerised applications.
  • Greater data availability in outages, by hosting our databases independently
  •  Improved redundancy and resiliency through running multiple copies and the ability to recover quickly from system failures

More articles


 

ECVS Congress Planner: Change of Plan? No Problem.

The development of a bespoke Congress Planner has helped ECVS rapidly re-plan their Annual Scientific Meeting when the large-scale event was cancelled during the Covid-19 pandemic.

 

Ambrose Fox is Hiring!

Ambrose Fox is looking for a new Graduate/Junior Web Developer to join the team.

 

Genesis: Great Software Hopefully Becomes Invisible

On the one-year anniversary of the idea to develop Genesis, we look back on the benefits for Ambrose Fox and what it means to develop great software.