为 AWS 负载均衡器分配静态 IP 地址 [英] Assigning Static IP Address to AWS Load Balancer

查看:63
本文介绍了为 AWS 负载均衡器分配静态 IP 地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何为 ELB 分配静态 IP 地址.好像不能.

How can I assign a static IP address to a ELB. Seems like I cannot.

一些在线文章要求创建 Route 53 记录,但这需要更改域的 CNAME,这也会重定向电子邮件流量.我只是想改A记录,不是CNAME.

Some articles online asks to create a Route 53 record but this requires changing CNAME of domain which also redirect email traffic. I just want to change A record not CNAME.

有些文章还提到我可以使用 EC2 实例作为反向代理.但是单个代理是否能够处理大量流量?

Some articles also mention that I can use a EC2 instance as a reverse proxy. But will a single proxy be able to handle a lot of traffic?

有什么解决办法吗?

推荐答案

AWS 的 Elastic Load Balancer 实际上在两个级别上具有弹性,如下所述:http://shlomoswidler.com/2009/07/elastic-in-elastic-负载平衡-elb.html

AWS' Elastic Load Balancer is actually elastic on two levels as described here: http://shlomoswidler.com/2009/07/elastic-in-elastic-load-balancing-elb.html

第一级是负载均衡器本身.为了确保 ELB 可以扩展到您拥有的任何卷并突增到您突然遇到的任何卷,AWS 分配了一个静态"DNS 主机名(例如 MyDomainELB-918273645.us-east-1.elb.amazonaws.com).该主机名指向多个 IP 地址.您可以通过运行

The first level is the load balancer itself. In order to make sure that ELB can scale to whatever volume you have and burst to whatever volume you suddenly encounter, AWS assigns a 'static' DNS hostname (e.g. MyDomainELB-918273645.us-east-1.elb.amazonaws.com). That hostname points to multiple IP addresses. You can see that (from a command line) by running

$ host MyDomainELB-918273645.us-east-1.elb.amazonaws.com
MyDomainELB-918273645.us-east-1.elb.amazonaws.com 172.31.7.2
MyDomainELB-918273645.us-east-1.elb.amazonaws.com 172.31.11.33

ELB 中的第二种弹性形式显然是 ELB 将查询定向到池中的一个 EC2 实例.

The second form of elasticity within the ELB is obviously then ELB directing the query to one of your EC2 instances in the pool.

因此,您可以看到,尝试为负载均衡器分配静态 IP 地址会弄巧成拙.

So, you can see that trying to assign a static IP address to the load balancer would be self-defeating.

使用 EC2 实例作为反向代理似乎也会弄巧成拙,因为您甚至会在到达 ELB 之前就造成瓶颈.也可以创建自己的负载平衡器.

Using an EC2 instance as a reverse proxy would also seem self-defeating as you would then create a bottleneck before even getting to the ELB. Might as well just create your own load balancer.

推荐的解决方案(您已经指出)是创建一个指向 ELB 主机名(不会改变)的 CNAME.

The recommended solution (which you've pointed out) is to create a CNAME that points to the ELB hostname (which won't change).

即my-app.mycompany.com ->MyDomainELB-918273645.us-east-1.elb.amazonaws.com

i.e. my-app.mycompany.com -> MyDomainELB-918273645.us-east-1.elb.amazonaws.com

这将允许您在域内的 ELB 后面集成可扩展的应用程序.

This would allow you to integrate your scalable application, behind the ELB within your domain.

我不确定我是否完全理解为什么您不能在 DNS 中创建 CNAME 或者这与引导电子邮件流量有什么关系,您能解释一下吗?

I'm not sure I fully understand why you cannot create a CNAME in your DNS or what that has to do with directing email traffic, can you explain?

这篇关于为 AWS 负载均衡器分配静态 IP 地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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