你怎么把一个维护页AWS当你的实例背后ELB?你的、你怎么、实例、ELB

2023-09-11 10:51:18 作者:不暖

你怎么把在AWS维护页面的时候,你要部署背后ELB应用程序的新版本?我们希望有ELB流量路由到维护实例,同时新的自动缩放实例都上来了,只有空翻多的新实例一旦他们全面上涨。我们使用自动缩放,使现有的情况下,新的实例,其中有新的code,了起来。

How do you put up a maintenance page in AWS when you want to deploy new versions of your application behind an ELB? We want to have the ELB route traffic to the maintenance instance while the new auto-scaled instances are coming up, and only "flip over" to the new instances once they're fully up. We use auto-scaling to bring existing instances down and new instances, which have the new code, up.

我们正在努力避免被具有ELB同时服务于交通,以新的EC2实例同时还能起到了维护页面的情景。由于我们没有启用粘性会话,我们想prevent被翻转来回维护模式页,并部署在EC2实例的应用程序的用户。我们也不能只是扩展(比如从2到4个实例,然后回到2)引入新的实例,因为code的变化可能涉及这将是重大更改旧code数据库的变化。

The scenario we're trying to avoid is having the ELB serve both traffic to new EC2 instances while also serving up the maintenance page. Since we dont have sticky sessions enabled, we want to prevent the user from being flipped back and forth between the maintenance-mode page and the application deployed in an EC2 instance. We also can't just scale up (say from 2 to 4 instances and then back to 2) to introduce the new instances because the code changes might involve database changes which would be breaking changes for the old code.

推荐答案

在AWS上最简单的方法是使用路线53 ,他们的DNS服务。

The simplest way on AWS is to use Route 53, their DNS service.

您可以使用的加权轮循。

您可以使用WRR,使服务器投入生产,进行A / B测试,   或平衡跨区域或改变数据中心的流量   大小。

"You can use WRR to bring servers into production, perform A/B testing, or balance your traffic across regions or data centers of varying sizes."

在 AWS单证这个功能

编辑:路线53最近增加了一个新功能,允许DNS故障转移到S3。检查他们的文档了解更多信息: HTTP://docs.aws。 amazon.com/Route53/latest/DeveloperGuide/dns-failover.html

Route 53 recently added a new feature that allows DNS Failover to S3. Check their documentation for more details: http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html