lunes, 28 de abril de 2014

Test your ELB

ELB (Elastic Load Balancer) is a service provided by AWS to allow you include easily scalable load balancers in your architecture. But sometimes, you detect issues difficult to determinate if they are related with backend instances or ELB itself. Some alternatives in this situation: you can review your CloudWatch metrics trying to find any related issue or you can design a specific test to ensure your environment is working as expected.

In the second situation, several tools can be used to perform an in-depth test (jmeter, for example). But if you want to make an easy test based in a URL, could be what you need. will test an URL during a period (by default, ten minutes), making random queries through all associated IPs in your ELB. Additionally, will show you interesting information about:

  • Average response time
  • Maximum response time
  • Percentile 95 response time
  • Average payload size
  • Error request (including percent)
Here is an execution example: output


  ELB: DNS Name associated to ELB
  LOOP: Number of loops. Default value: 600 (ten minutes)
  URL: URL to check in ELB. Default value: /
  PORT: Port in ELB to check. Default value: 80
  PROTOCOL: Protocol to use. Default value: http

This shell script could be a good starting point to troubleshoot ELB issues. Fell free to use it!