Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Blue-green deployment on Web Service with WebSocket Implementation on AWS

I'm currently looking to implement Web sockets for a couple of Web services. But was wondering how this stateful http connections will impact Blue-green deployments & auto-scaling on AWS.

Was googling around but haven't came across anything. Would appreciate any advice / inputs.

like image 425
Darren Avatar asked Aug 08 '16 00:08

Darren


People also ask

What is blue and green deployment in AWS?

A blue/green deployment is a deployment strategy in which you create two separate, but identical environments. One environment (blue) is running the current application version and one environment (green) is running the new application version.

What is AWS blue?

When an application is developed and deployed to an AWS Elastic Beanstalk environment, having two separate, but identical, environments—blue and green—increases availability and reduces risk. In this Quick Start architecture, the blue environment is the production environment that normally handles live traffic.

What is the difference between blue green and canary deployment strategies?

Blue/Green Deployment: the current and the new version run in parallel, then all traffic shifts to the new version. Canary Deployment: the new version rolls out incrementally to a subset of users, then is released to all users.

What is blue/green deployment on AWS?

When an application is developed and deployed having two separate, but identical, environments — blue and green — this deployment method increases availability and reduces risk. Blue/green deployment on the AWS platform provides a safer, less stressful way to upgrade production software. Let’s think of a v1 production environment “blue.”

What is a blue/green deployment strategy?

Using a blue/green deployment strategy increases application availability and reduces deployment risk by simplifying the rollback process if a deployment fails. Once testing has been completed on the green environment, live application traffic is directed to the green environment and the blue environment is deprecated.

What is blue and green environment in Elastic Beanstalk?

When an application is developed and deployed to an AWS Elastic Beanstalk environment, having two separate, but identical, environments—blue and green—increases availability and reduces risk. In this Quick Start architecture, the blue environment is the production environment that normally handles live traffic.

Where can I find blue/green deployment templates for CloudFormation?

If you’d like to try this approach to blue/green deployments, we have open sourced the code and AWS CloudFormation templates in the ecs-blue-green-deployment GitHub repo.


1 Answers

Use connection draining (sending all new requests to your desired environment - green for example) and giving time for blue clients to fall off.

You can set the max-lifetime of your websocket (connection draining period should be longer than max if that kind of reliability is needed)

Otherwise would just handle client side. If websocket drops initiate new connection through your AWS ELB to a healthy server. Do not keep any state on your ephemeral ELB backends. This also would also work when scaling down on AWS.

like image 73
thun Avatar answered Sep 26 '22 17:09

thun