Blue-Green Deployment — the downtime saviour

Fortune 1000 firms pay between $1.25 billion and $2.5 billion in yearly unplanned application downtime expenses, according to a survey done by DevOps.com. That’s not just once; but it’s once every year.

So, who will save us — Deployment Strategies, I am always here.

- There are various strategies present some of them are as follows: -

  1. Blue-Green Deployment (also red-black deployment)
  2. Canary Deployment
  3. A/B testing Deployment strategy
  4. Recreate Strategy
  5. Shadow Deployment

Blue-Green deployment is an application release approach that gradually migrates user traffic from an older version of an app or microservice to a nearly similar new release, both of which are present in the production environment.

- Let’s deep dive in the process -

Blue-green, in its purest form, asks us to duplicate every resource on which our application relies.

- When should a Blue-Green Deployment strategy be used? -

  1. Afford to have a large infrastructure setup, and it is scalable.
  2. Don’t want even a single second of deployment downtime for any of my users.

- Before implementing a Blue-Green Deployment strategy, the organization must ensure that -

  1. There are two identical environments available. As both will be running in production at the same time, the development team must ensure that their new code can coexist with the old code.
  2. A router or load balancer is also required so that users can be switched from one version to the other.

- What are the primary benefits of using Blue-Green Deployment? -

  1. Customers have an uninterrupted experience: There is no downtime.
  2. There are no upgrade timetables for developers: There is no need to wait for maintenance windows.
  3. Parity in testing: You can deploy to a test environment and test it before making the deployment live to the public. This can be a huge benefit if you are concerned that the change will break something in production.
  4. Instant rollbacks: You have a ready-to-work environment at all times. Whether this is for disaster recovery or for reverting to a previous state. A ready-to-use standby environment has numerous advantages.
  5. Instant cut-over: Users are switched to the new version almost immediately, if not instantly. At the same time, everyone sees the most recent release.

- What can be the drawbacks of using Blue-Green Deployment? -

  1. User transactions: Some user transactions will be disrupted during the transition. We must think carefully about how to deal with them. How should we handle transactions that are only partially applied? Do we display an error message and instruct the user to try again? Or do we try to bring them with us to the new environment? One possible solution would be to feed all transactions to both environments concurrently and in parallel. In this case, we’d have to deal with any duplicated data after the deployment is complete.
  2. Cold starts: When users are abruptly switched to a new environment, they may experience sluggishness. Any previously undetected performance issues are also likely to manifest at this point. Warm-up jobs and stress tests help to alleviate these problems.
  3. Costs: Blue-green deployments are more costly than other options. It helps to have the on-demand infrastructure. However, when we make multiple scaled-out deployments per day, the expenditures can quickly add up.
  4. Shared Services: Databases and other shared services may leak information between blue and green. We must exercise caution here, as one environment may have an indirect effect on the other. This could violate the isolation rule and disrupt the deployment.

- The Cloud Facilitates Blue-Green Deployments -

- Conclusion -

--

--

--

Aspiring Data Scientist & Cloud Practitioner | Full Stack Developer | Competitive Programmer | Blogger | Software Developer Intern @ Solar Industries India Ltd

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Laravel Advanced: 10 hal yang perlu kamu tahu

Kubernetes Cluster, Up and Running for GitOps

Fabric CA Setup — Client

Simple Java Example

QA in times of Scrum

Hey Siri, Open my Storm Door

Top 20 trending Go repositories of the week on Github.

image trending on unsplash

Data Structure

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Prathmesh Bhansali

Prathmesh Bhansali

Aspiring Data Scientist & Cloud Practitioner | Full Stack Developer | Competitive Programmer | Blogger | Software Developer Intern @ Solar Industries India Ltd

More from Medium

What’s next in the world of technology? Let’s talk about all the hype around distributed cloud!

SUBNET: How Does it Work?

Hacking on the cloud: An effective and cost optimization approach

CoreDump: Amazon AWS Pollexy