将静态IP地址分配给AWS Load Balancer [英] Assigning Static IP Address to AWS Load Balancer

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

问题描述

如何为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-load-balancing-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?

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

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