Search Topic

Lagoon implements “Active/Standby” - a blue-green deploy solution

Active/Standby for Blue/Green Lagoon Deployments -

Lagoon implements “Active/Standby” - a blue-green deploy solution

What is Active/Standby?

Active/Standby deployments, also known as blue/green deployments, are a way to seamlessly switch over your production content. Your active (or green) environment is your current active production environment. Your standby (or blue) environment is your standby environment, where you have changes staged that are ready to roll out. The environments are otherwise identical, so the go-live is just a flip of a switch. All incoming traffic is now routed to your new active environment, and the previous active environment takes the standby position. 

Why use Active/Standby?

One of the major advantages of the active/standby deployment strategy is that it reduces risk. If something were to go wrong with the deployment of the standby environment, or perhaps the content isn’t actually ready to go live, it’s easy to roll back the changes and switch back to the previous active environment. It also reduces or eliminates downtime during a deployment - instead of waiting for a deployment to finish, the new environment is already live, and traffic is simply directed to the new production environment. 

How does it work?

Lagoon implements the blue-green deploy strategy by initially duplicating your current production environment, and creating them with an ‘active’ and ‘standby’ Lagoon type.  Each environment is treated as if it were production - so any logic present in themes, settings or modules is handled the same in each environment.  Where they may differ is in the autoscaling provisions (a standby environment won’t receive the same traffic as an active one).  When you promote the standby environment to active, Lagoon handles the moving of the external-facing route for you - everything else stays the same (database, files, Git repository etc). We will be providing guidance on how to enable active/standby in our documentation.

Lagoon does not automate synchronizing content, databases or filesystems between these two environments while they are actively being worked on (however the task system provides manual mechanisms for doing so.

How do I enable active/standby for my project?

For now, please contact support while we create better user documentation. Eventually the process will be automated, but please note that running dual production environments will incur additional costs (based on our pay-per-use cloud hosting fee structure). We will need to make changes to your environments in the API, and you will need to make changes to your configuration in the .lagoon.yml file for each project.

How do I switch my standby environment to active?

As well as a GraphQL mutation, Lagoon will provide a button and confirmation via the UI.  The UI will indicate which environment is currently the active, and which is the standby. Importantly, the active and standby designations are independent of the source Git repository branch names (i.e. an environment, built from the master branch that switches from active to standby will still be building from the master branch).


Want to know more about Blue / Green deployment and see it in action? Join our upcoming webinar on June 25/26