DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Software Design and Architecture
  3. Performance
  4. Amazon ELB and Multiple Availability Zones

Amazon ELB and Multiple Availability Zones

$$anonymous$$ user avatar by
$$anonymous$$
·
Feb. 04, 13 · Interview
Like (0)
Save
Tweet
Share
3.68K Views

Join the DZone community and get the full member experience.

Join For Free

i was recently playing with the aws elb and aws autoscaling which i described here . what i wanted to do was to setup some stress test and have the autoscaling kick in by instantiating extra instances because of the heavy load from my test. as i said just for fun to see how it works and what it takes to get it working. so i started with downloading and installing jmeter as this seems the right tool to generate some load. i followed the steps from this tutorial and came up with the following test plan:
screen shot 2013-01-07 at 13.16.24
so i defined some default http request properties like the url of the load balancer to which the request has to be send. i defined two requests, one for the home page and one for a blog post. finally i added a graph result step so i can see the results in a graph, although i wasn’t really interested in the results at this side but more in how the servers would respond.

before i executed the test i already increased the instances so i had 2 of them per availability zone with the following command:
as-update-auto-scaling-group wp-as-group --min-size 4 --max-size 6 --show-xml --region eu-west-1

note: to downgrade the autoscaling use the following commands:
as-update-auto-scaling-group wp-as-group --min-size 2 --max-size 4 --show-xml --region eu-west-1
and
as-terminate-instance-in-auto-scaling-group i-358e9e7e --decrement-desired-capacity --region eu-west-1

then i kicked of the test plan in jmeter. i first tried to see the results in amazon cloudwatch but this didn’t give me the information i was looking for. so i decided to open up a terminal to each of the four instances and do a ‘top’ in each of them. this showed an interesting result: only two of the servers were 100% working and the 2 others didn’t do anything…:
screen shot 2013-01-06 at 19.46.23

that was not what i was expecting from the load balancer ! and this also explained why i didn’t understand the result of cloudwatch graph:
cloudwatch
i only saw a result for 1 availability zone while i expected results for both of them but it appears my expectations were wrong, not the tool :-)

so that raised the question: what happened? first i went through the tips and tricks part of the aws support because i might have missed something here. that wasn’t the case but further investigation showed me that the dns of the load balancer is resolved to an ip address in one of the avaibility zones. this happens randomly per ‘client’, so if ten clients send a request half of them will go to the az ‘eu-west-1a’ and the other part would go to ‘eu-west-1b’. what is happening in my test with jmeter is that all requests are from one client machine and that this is resolved to the same ip address for the balancer during the run of the test. see also this thread in the aws forum. to avoid this behaviour the solution sounds easy: send requests from multiple machines. this can be done by using jmeter as described here . or a much ‘cooler’ approach is this article about the ‘bees with machine guns’. i haven’t tried this yet but it is on my list to try it soon!

Load balancing (computing)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Using AI and Machine Learning To Create Software
  • Top Authentication Trends to Watch Out for in 2023
  • PHP vs React
  • Automated Performance Testing With ArgoCD and Iter8

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: