A Blue-Green implementation is a deployment technique that results in zero downtime and minimizes risk for companies who are managing complex websites or applications that need to be highly available. In this post, we explain Blue-Green implementations for Sitecore and share the three reasons that makes SearchStax deployments unique.
What is a Blue-Green Implementation and Why Do Companies Use It?
In a Blue-Green implementation, there are two identical environments called Blue and Green. At any time, only one of the environments is live and serving all of the traffic while the other environment is idle.
Enterprise companies generally have business requirements where their website or application is so critical to their business that they cannot have any downtime at all. From time to time, every system must undergo regular maintenance, upgrades, or patching — so these companies architect an environment to ensure that there is always a live production environment available while maintenance, updating, and testing can occur on the other version of their environment.
There are two options for Blue-Green implementations. The more traditional option is common for organizations that run their own servers in-house but it can also be done in the cloud. In this situation, the organization has two complete environments that are exact copies of their system and both copies are running at all times. When it’s time to perform maintenance, all traffic is routed to the second environment while the production version moves to an idle state. After performing maintenance and updates, traffic is re-routed back to the production server and the second environment is returned to its idle state.
The other option has become more popular as companies move to cloud infrastructure and use the cloud to manage both environments. A primary environment is the full-time production system and another temporary/dynamic environment that is created and used only during the short window of time that it takes for system maintenance, patching, and upgrading of the production environment. After the production environment is updated, the temporary environment is shut down and deleted. The challenge with this option is to minimize the time and resources it takes to create and mirror the temporary environment, perform the switchovers, and then delete the environment.
An Example of a Blue-Green Implementation
One of our customers has a release process to update their Sitecore-based website every six weeks with new code and updates. Rather than having both their Blue and Green environments fully operational in the cloud at all times which would have been prohibitively expensive, SearchStax worked with them to develop a process to:
- Programmatically spin up and create a new Static environment of their Solr infrastructure in the Azure cloud that is an exact replica of their Production environment
- Seamlessly backup, restore and switch from the Production cluster to the Static cluster and back using SearchStax APIs
After 24 hours or so, the original system is returned into Production and the temporary Static system is shut down and deleted.