tag:blogger.com,1999:blog-534724342082307142.post3170356378530332164..comments2023-02-22T18:30:17.187+02:00Comments on Cloud Developer Tips: The "Elastic" in "Elastic Load Balancing": ELB Elasticity and How to Test itShlomohttp://www.blogger.com/profile/10469902663120418195noreply@blogger.comBlogger20125tag:blogger.com,1999:blog-534724342082307142.post-4012903106477551332009-12-27T23:07:57.733+02:002009-12-27T23:07:57.733+02:00@Ramchandra,
You ask interesting questions.
1. T...@Ramchandra,<br /><br />You ask interesting questions.<br /><br />1. There is no way to request a specific subnet for your instance's private IP.<br /><br />2. It's normal for traffic between instances to experience fluctuation, especially when measuring ping time: The EC2 network de-prioritizes ICMP communications (as per the comment from Cindy@AWS in this thread: http://developer.amazonwebservices.com/connect/message.jspa?messageID=156301 ). Note that the SLA does not guarantee a minimum bandwidth or network latency.<br /><br />3. First we need to determine if network latency is improved or not between instances on the same subnet. I did a little experiment and launched 20 instances in a single request. The private IPs I was assigned were scattered across three different subnets.<br /><br />We can run tests to determine the average network latency & speed across instances on the same and on different subnets. If these tests indicate that network is better within the same subnet then you can launch four or five times as many instances as you need, and terminate those that are not in the same subnet.<br /><br />Please share the results of any tests you do to determine the common subnet's effect on network latency.Shlomohttps://www.blogger.com/profile/10469902663120418195noreply@blogger.comtag:blogger.com,1999:blog-534724342082307142.post-5069978078920877962009-12-25T11:20:39.943+02:002009-12-25T11:20:39.943+02:00Hello Shlomo,
This might be a unrelated questio...Hello Shlomo, <br /> This might be a unrelated question to this post, but since you are a EC2 expert, hope you can shed light on this.<br /><br /> I dont know is it only my observation or in general people have seen this.<br /><br />I was configuring some clusters on the EC2 and most importantly was putting up a typical mysql master-slave replication based cluster. As I was doing it, I saw that the every instance created was given a private IP from different subnets. When I did some basic network tests including ping round-trip test, I saw the network was fluctuating a lot and at time was miserable. This also reflected on the performance of the cluster, because they were made to communicate over private IPs.<br /><br />So wanted to know:<br />1. I guess there is no way you can ask for private IPs to be from the same subnet (except on VPC).<br />2. What I am seeing here, is it a normal phenomena on the Amazon?<br />3. If it is normal, how does one mitigate these issues. Cause with these basic network issues, performance at the backend is not at all good.<br /><br />Hoping that you will shed some light on this.Unknownhttps://www.blogger.com/profile/17503319820208932356noreply@blogger.comtag:blogger.com,1999:blog-534724342082307142.post-42856503384107869132009-12-25T02:47:02.191+02:002009-12-25T02:47:02.191+02:00@Matthew,
Thanks for pointing that out - I've...@Matthew,<br /><br />Thanks for pointing that out - I've edited it to say "at this point the client is communicating with one of your EC2 application instances". I hope that makes it clearer.Shlomohttps://www.blogger.com/profile/10469902663120418195noreply@blogger.comtag:blogger.com,1999:blog-534724342082307142.post-50769853735359774432009-12-25T02:41:15.956+02:002009-12-25T02:41:15.956+02:00"4.The ELB virtual appliance at address 1.2.3..."4.The ELB virtual appliance at address 1.2.3.4 passes through the communications from the client to one of the EC2 instances in the load balancing pool. At this point the client is connected with one of your EC2 application instances"<br /><br />This is the part which I originally took to mean connections are handed off. But on reading it again after your reply, it makes a little more sense.<br /><br />The main thing is that it sounds like as long as I configure things correctly, the ELB will suit my requirements. Thanks again for the article!Unknownhttps://www.blogger.com/profile/02075758726320459682noreply@blogger.comtag:blogger.com,1999:blog-534724342082307142.post-73918192105439351972009-12-24T21:06:30.372+02:002009-12-24T21:06:30.372+02:00@Matthew,
I did not mean to imply that connection...@Matthew,<br /><br />I did not mean to imply that connections are "handed off" to back-end instances - they're not, the traffic is "passed through" to the back-end instances via the ELB. Please let me know where I might clarify the article.<br /><br />The theoretical bandwidth of ELB is unlimited - it will keep on scaling as long as the traffic keeps ramping up. So the overall bandwidth that your system will be able to handle is a direct result of the number of instances you put behind the ELB. As I described above, you'd need to test ELB carefully to make sure you're actually reproducing the conditions under which ELB was designed to scale. It's possible (and I've suggested as much in the forum) that the forum posts describing bandwidth limitations did not test the ELB properly and therefore hit a "faux" limit.<br /><br />Unlike ELB, software load balancers running on an EC2 instance (and hardware load balancers in a data center) cannot scale beyond the bandwidth of the network connection feeding into them.Shlomohttps://www.blogger.com/profile/10469902663120418195noreply@blogger.comtag:blogger.com,1999:blog-534724342082307142.post-70600701274329420842009-12-24T20:41:01.908+02:002009-12-24T20:41:01.908+02:00Excellent blog, very informative.
I however, bein...Excellent blog, very informative.<br /><br />I however, being an EC2 newbie, would like to ask a quick question regarding bandwidth.<br /><br />Your explanation on how requests are handed off to instances (ie the client is eventually connected directly with an instance behind the ELB) suggests that max bandwidth should be increased when increasing the number of instances behing the ELB. Does this sound correct?<br /><br />What concerns me is that I've read several forum posts etc that seem to suggest this is not the case. And that bandwidth is limited to the bandwidth of the ELB itself and the number of instances behind is irrelevant. This doesn't sound right to me, hopefully they're wrong.<br /><br />Bandwidth is going to be very important for me, as my app will have a very heavy streaming element. So I am trying to determine whether or not I can increase bandwidth by simply increasing the number of instances I have behind my ELB.Unknownhttps://www.blogger.com/profile/02075758726320459682noreply@blogger.comtag:blogger.com,1999:blog-534724342082307142.post-197285202865532962009-11-20T14:03:05.641+02:002009-11-20T14:03:05.641+02:00@Ramchandra,
1 GB/sec is not a lot and it is defi...@Ramchandra,<br /><br />1 GB/sec is not a lot and it is definitely possible to do with ELB. I've seen ELB handle more. I don't know what the limit is - if there is one, because there might not be a limit on the ELB side. The limit might be the number of back-end instances you can launch.<br /><br />There's no problem with putting all the back-end instances in the same availability zone.<br /><br />Concurrent connections are also not really limited by the ELB, but by the back-end instances.<br /><br />If your traffic patterns match those that ELB was designed for (i.e. gradually ramping-up) then it should be able to scale to handle that traffic.Shlomohttps://www.blogger.com/profile/10469902663120418195noreply@blogger.comtag:blogger.com,1999:blog-534724342082307142.post-55749615522488685742009-11-20T05:04:58.394+02:002009-11-20T05:04:58.394+02:00hello Shlomo,
A very informative and well writte...hello Shlomo, <br /> A very informative and well written post, I am very thankful for that.<br /><br /> I just need to know you views on the following<br /><br />We are trying to achieve something of this order... 1 Million Requests per sec (1 KB size per request) == 1 gByte/sec. <br />* Can Amazon allow such a limit or in specific can it possible to achieve that with step 2 (ofcourse with proper backend on step4.)<br />* Can this be achieved with a single availability zone? <br />* Also we want to check on the concurrent connection limits. What is the limit of concurrency that Amazon supports? <br />* Can step 2 help us scale that as well.<br /><br />Hoping to hear your comments on this.. will surely be of much help to me.<br /><br />with regards<br /><br />SecionUnknownhttps://www.blogger.com/profile/17503319820208932356noreply@blogger.comtag:blogger.com,1999:blog-534724342082307142.post-71193995131335634892009-10-24T20:35:30.086+02:002009-10-24T20:35:30.086+02:00@visualplant,
The only solutions available today ...@visualplant,<br /><br />The only solutions available today for using ELB with the root domain are workarounds.<br /><br />You can spread the traffic hitting the root domain (for redirection to www.example.com) by using round-robin DNS pointing to multiple machines (each of which performs the redirect).<br /><br />There is another intriguing workaround suggested by M. David Peterson here:<br />http://broadcast.oreilly.com/2009/06/hacking-the-awsec2-load-balanc.html<br />I haven't tried it, though.Shlomohttps://www.blogger.com/profile/10469902663120418195noreply@blogger.comtag:blogger.com,1999:blog-534724342082307142.post-65119936700533300302009-10-23T20:19:59.411+02:002009-10-23T20:19:59.411+02:00Does anyone have the problem that a domain name ro...Does anyone have the problem that a domain name root cannot be a CNAME (e.g., to the load balancer)?<br /><br />so, how do you get mydomainname.com to proxy the AWS loadbalancer which requires a CNAME? Point to an IP address and redirect that traffic to WWW ?<br /><br />I'm no network engineer, but 1 static IP representing a single instance taking millions of hits in a few seconds, even if only redirects, sounds like a bottleneck!<br /><br />Is there something I'm missing?visualplanthttps://www.blogger.com/profile/13875199500593980680noreply@blogger.comtag:blogger.com,1999:blog-534724342082307142.post-1986497232241898482009-09-21T10:50:53.732+03:002009-09-21T10:50:53.732+03:00@vinod
There is no way to associate an Elastic IP...@vinod<br /><br />There is no way to associate an Elastic IP with an ELB today.<br /><br />Regarding question #2 about inbound network capacity and the back-end instances: An ELB has a pool of back-end instances. The ELB automatically scales itself to handle the incoming traffic and distribute it to the back-end instances. Once you have created an ELB and assigned it a pool of back-end instances, you do not have to create any more ELBs for those back-end instances - the ELB will automatically scale by itself to handle the incoming traffic. This does not involve a new ELB, just some new behind-the-scenes stuff inside Amazon. The behind-the-scenes stuff is what I described in this article.<br /><br />Regarding question #3: There is no general answer to "how many requests can an instance handle at a time". This depends on the type of instance (because each instance type has different CPU and network characteristics) and on the applications that you are running on the instance. You need to test this yourself to find the answer for your application and instance type. There are many many tools available to help you measure this. Google is your friend.<br /><br />Regarding "share the load from one instance to the next": ELB spreads out the incoming requests approximately evenly among the back-end instances, not in a "cascading" style that you describe. The only thing you need to consider is how many back-end instances to give to the load balancer in order to handle the incoming load. One approach is to simply do the math (max desired traffic / max traffic per instance = # back-end instances to put into the ELB). The more cost-effective approach is to use Auto Scaling to automatically launch (and terminate) back-end instances for the ELB according to demand. For more details about Auto Scaling please consult the docs here:<br />http://docs.amazonwebservices.com/AutoScaling/latest/DeveloperGuide/Shlomohttps://www.blogger.com/profile/10469902663120418195noreply@blogger.comtag:blogger.com,1999:blog-534724342082307142.post-43935846584398807312009-09-19T15:57:56.540+03:002009-09-19T15:57:56.540+03:00Hi Shlomo,
Thank you for this wonderful article!!...Hi Shlomo,<br /><br />Thank you for this wonderful article!!! I am a newbie to ELB. I would like to clarify certain things with you.<br /><br />1. According to amazon each ELB will have a DNS name instead of an elastic ip which we should configure by adding a CNAME entry. could you please explain how to make it technically possible of attaching an elastic ip to ELB?<br /><br />2. Regarding the step 2 scalability, once the inbound network network traffic capacity has reached, will a new load balancer be automatically created? if so will those instances that were registered with the first load balancer be automatically registerd with the new one?<br /><br />3. could you let me know any kind of testing tool that will check HOW MANY REQUESTS can an instance handle at a time? ie at what point will the load balancer share the load from one instance to the next one?<br /><br />Thanks in advance!!!!!<br /><br />regards,<br /><br />VinodUnknownhttps://www.blogger.com/profile/03219875496187534485noreply@blogger.comtag:blogger.com,1999:blog-534724342082307142.post-86013529210687227252009-08-07T06:53:06.188+03:002009-08-07T06:53:06.188+03:00A lookup table for client IP addresses in the ELB ...A lookup table for client IP addresses in the ELB might explain why a client connection could appear to have an affinity/stickiness to a backend server. The ELB might only incur the expense of determining to which server to route a request, if it had not recently seen the connecting IP address. This would allow higher throughput for the ELB.<br /><br />It's a reasonable shortcut if all backend servers process requests equally quickly and connections/session, when averaged, last roughly the same amount of time on each server. You might get interesting results by mixing small and extra large instances behind the same ELB.Adam Talaathttps://www.blogger.com/profile/07256138198081062729noreply@blogger.comtag:blogger.com,1999:blog-534724342082307142.post-86002308302973940742009-07-30T22:21:10.141+03:002009-07-30T22:21:10.141+03:00@Egg
Yes - as I mentioned in my comment on your b...@Egg<br /><br />Yes - as I mentioned in my comment on your blog, that is actually a documented characteristic of ELB.Shlomohttps://www.blogger.com/profile/10469902663120418195noreply@blogger.comtag:blogger.com,1999:blog-534724342082307142.post-4194763647032698762009-07-30T22:03:46.685+03:002009-07-30T22:03:46.685+03:00I was bit this morning by a "feature" of...I was bit this morning by a "feature" of elastic load balancing. If you run in multiple availability zones, be sure to have at least 1 working instance in each, otherwise you'll get some failing requests because the round robin DNS check doesn't eliminate zones that have no instances running. <br /><br />http://af-design.com/blog/2009/07/30/elastic-load-balancing-in-multiple-zones/Erik Gibertihttps://www.blogger.com/profile/09319117650039368497noreply@blogger.comtag:blogger.com,1999:blog-534724342082307142.post-62527139142729786662009-07-29T16:48:08.805+03:002009-07-29T16:48:08.805+03:00Awesome description of working of ELB.Awesome description of working of ELB.Pratyush Pushkarhttps://www.blogger.com/profile/16917793129418889753noreply@blogger.comtag:blogger.com,1999:blog-534724342082307142.post-40064286723639904982009-07-17T01:22:57.817+03:002009-07-17T01:22:57.817+03:00@Shlomo
OK, that sounds right.
Thanks for the hel...@Shlomo<br />OK, that sounds right.<br /><br />Thanks for the help.Bruhahahttps://www.blogger.com/profile/15429059792783201251noreply@blogger.comtag:blogger.com,1999:blog-534724342082307142.post-40187311707815082452009-07-15T20:34:47.954+03:002009-07-15T20:34:47.954+03:00@Bruhaha
I don't believe your issue has anyth...@Bruhaha<br /><br />I don't believe your issue has anything to do with DNS CNAME or A records. If it did, the problem would happen even when only one back-end server is in service.<br /><br />I'm not too familiar with Sharepoint, so I'm sorry I can't help on that.Shlomohttps://www.blogger.com/profile/10469902663120418195noreply@blogger.comtag:blogger.com,1999:blog-534724342082307142.post-8603013427893940342009-07-15T20:04:37.738+03:002009-07-15T20:04:37.738+03:00Very informational post about Elastic Load Balanci...Very informational post about Elastic Load Balancing.<br /><br />Specific Setup Question:<br />When I'm trying to use this load balancer with a medium-sized Sharepoint farm (2 web servers, 1 sql server), the end-user is not able to be authenticated by the domain controller. If only one of the web servers is connected to the load balancer, then the user is authenticated and it doesn't matter which server is the one connected. But as soon as the second server is added, authentication fails.<br /><br />Does this have anything to do with using a CNAME vs a regular A entry?Bruhahahttps://www.blogger.com/profile/15429059792783201251noreply@blogger.comtag:blogger.com,1999:blog-534724342082307142.post-86341066980892909602009-07-15T17:59:43.799+03:002009-07-15T17:59:43.799+03:00Nice, saves me a lot of digging around!Nice, saves me a lot of digging around!Unknownhttps://www.blogger.com/profile/12793682855207186084noreply@blogger.com