当使用面向ELB的互联网时,负载均衡器背后的所有实例都必须拥有自己的公共IP? [英] When using an internet facing ELB, do all of the instances behind the load-balancer have to have their own public IPs?

查看:208
本文介绍了当使用面向ELB的互联网时,负载均衡器背后的所有实例都必须拥有自己的公共IP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在配置Internet面向我的AWS部署的负载平衡,有一个问题我似乎无法得到。
我明白ELB使用DNS记录在实例的IP之间平衡,但是我必须为我的Web服务器分配弹性(公共)IP地址?如果我想在10个面向互联网的Web服务器之间平衡,我真的需要10个弹性IP吗?还是有一种使用ELB的方法,一个弹性IP和一个DNS记录?



谢谢!

解决方案

您的实例不需要自己的弹性IP;他们不需要任何类型的公共IP,通常他们甚至不应该在公共子网中。只有ELB本身需要在公共子网中。



ELB不使用弹性IP,即使它们存在。 ELB部署为您提供一个主机名,用于使用CNAME或Route 53 Alias DNS记录路由入站请求。



还要注意,您的Web服务器计算机在私有子网中,您将需要一个正确配置的NAT实例和路由表,以使这些机器执行出站请求(例如,到其他Web服务,下载更新等)。此配置还具有为所有Web服务器提供一个(或每个可用性区域)源IP地址的优势,如果您正在进行API请求的用户想要将您的IP地址列入白名单,这可能会很有用。



另见:




I'm configuring internet facing load balancing on my AWS deployment and there's one issue I can't seem to get. I understand that ELB uses DNS records to load balance between the IPs of the instances, but do I have to assign elastic (public) IP addresses to my web servers? If I want to load balance between 10 internet facing web servers, do I really need 10 elastic IPs? Or is there a way to use ELB with one elastic IP and one DNS record?

Thanks!

解决方案

Your instances do not need their own elastic IPs; they don't need any kind of public IP, and, typically, they should not even be in a public subnet. Only the ELB itself needs to be in a public subnet.

The ELB does not use your elastic IPs, even if they are present. An ELB deployment provides you with a hostname that is used to route inbound requests, using either a CNAME or a Route 53 Alias DNS record.

Note also, your web server machines in private subnets, you'll need a properly-configured NAT instance and routing tables in order for those machines to make outbound requests (e.g. to other web services, downloading updates, etc). This provisioning also has an advantage of providing all your web servers with one (or one per availability zone) source IP address for their originated traffic, which can be useful if someone you are making API requests to wants to whitelist your IP address.

See also:

这篇关于当使用面向ELB的互联网时,负载均衡器背后的所有实例都必须拥有自己的公共IP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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