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


 

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.

 

Selling More with Automated Stock Sales

So you have over 9,000 stock items and want to put some of them on sale on your website. Here's how Ambrose Fox helped English Woodlands Timber to automate their stock sale process.

 

Teledyne Distributor Portal: A Master-Hub Of Organisation and Brand Consistency

Ambrose Fox has built an Extranet platform for Teledyne which allows for the storage and distribution of all their marketing assets across different regions.