Elastic Load Balancing in EC2 [closed]

自闭症网瘾萝莉.ら 提交于 2019-12-02 16:57:23
arfon

I've been running an ELB instead of HAProxy for about a month now on a site that gets about 100,000 visits per day, and I've been pretty pleased with the results.

A gotcha though (UPDATE, this issue has been fixed by Amazon AWS, see comments below):

  1. You can't load balance the root of a domain as you have to create a CNAME alias to your load balancer. Once solution is to redirect all traffic from http://mysite.com to http://www.mysite.com.

Apart from that I really can't speak highly enough of the AWS ELB offerings. I'm also using the Cloudwatch monitoring and autoscaling. Oh and don't forget it's cheaper than running a small EC2 instance ($0.025 per hour instead of $0.10).

ELB's dependence on DNS CNAME record indirection is pretty crippling for web services that need to be very fast. In our case we need to have very good response time. In a quick performance test, the use of an ELB increased the average latency for HTTP requests by a factor of almost 2. This is mainly because the TTL on the CNAME lookup is zero. Thus, all lookups involve hitting name servers for two different domains, so the name resolution is way slower. (I worry that defeating caching in DNS is simply an abuse of the system.) The only hope for ELB in our case would be to get away from CNAME records by having Amazon support an Elastic IP as the address of a load balancer instance.

Another issue is getting the client IP address. For regular HTTP this works fine, as ELB sets the X-FORWARDED-FOR header. But for HTTPS this isn't possible because it is forwarding at the TCP layer. Hopefully some day ELB will have SSL termination.

There are complaints in the Amazon forum about ELB's reliability. I suggest you head over there and search on ELB to form your own opinion on that front.

We wanted to use ELB to load balance web service requests, but we have many external callers, some of which send a 100-Continue HTTP message. Unfortunately ELB does not understand that part of the HTTP protocol, so we're unable to go beyond proof-of-concept until that's addressed.

2013 Update

According to an AWS forum post, HTTP 100-Continue is now supported.

https://forums.aws.amazon.com/message.jspa?messageID=144022

One main problem for many users with ELB is that it does not support stickyness, which is a killer for many web application.

According to Amazon AWS developers it should however come in the next release.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!