NGINX and Zookeeper, Dynamic Load Balancing and Deployments

Опубликовано: 06 Октябрь 2024
на канале: NGINX
10,155
64

Deployment strategies are a large focus for a lot of teams right now as more and more companies begin to migrate services to public cloud. All of these teams have one goal in common, Zero Downtime. The most common strategy for this is the Blue Green Deployment, and while it seems simple enough to do it can contain a few caveats, and even more for larger stacks.

In this talk we will explore a case study around moving a large stack of over 30 application to Amazon Web Services and why Nginx was the right choice for load balancing and the deployment. The Goal, release code with out dropping a single packet and ensure all applications get their new code version at the exact same time.

With the use of Zookeeper for service discovery, new nodes in the environment are automatically added to Nginx upstream pools. When new code is released and applications nodes ready, Nginx is alerted and directs traffic to new pools serving the latest release. Using a header to tag requests with the current release Nginx will continue to direct the request to the correct release while it makes it way through the stack, ensuring that each request will hit the appropriate application version during and after the traffic switch.