自动将公共IP分配给由austo-scaling组创建的实例 [英] Auto assign public IPs to my instance created by an austo-scaling group

查看:299
本文介绍了自动将公共IP分配给由austo-scaling组创建的实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站在那里运行,我有一个Auto-Scaling组(最少1个实例,最多5个)。
这个第一个实例公共IP指向我的域example.com
但是当自动扩展组使用另一个公共IP创建另一个实例(由于负载增加)时,如果我尝试访问新实例,此IP不会解析到我的域example.com,直到我将这个新的公共IP包含到我的主机文件名或我的dns管理器(godaddy)中。

I have an Auto-Scaling group (min. 1 instance and max. 5) with my website running there. This first instance public IP is pointing to my domain "example.com" But when the auto-scaling group create another instance (due the load incrementation) with another public IP, if I try to access to the new instance, this IP doesn't resolve to my domain "example.com" till I include this new public IP into my host filename or into my dns manager (godaddy).

我如何解决这个问题并自动完成此过程?

How could I solve this and automatise this process?

提前致谢
种类问候
KV

Thanks in advance Kind Regards KV

推荐答案

您需要在EC2实例前放置AWS负载均衡器。将自动扩展组附加到负载均衡器,以便在创建实例时将实例自动添加到负载均衡器池中,并在终止时自动从池中删除。将您的域名指向负载均衡器而不是单个实例。

You need to place an AWS load balancer in front of your EC2 instances. Attach the auto-scaling group to the load balancer so that instances are automatically added to the load balancer's pool when they are created, and automatically removed from the pool when they are terminated. Point your domain name to the load balancer instead of individual instances.

这篇关于自动将公共IP分配给由austo-scaling组创建的实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆