I am looking at graph which shows CPU load on EC2 instances. I spot that when for 1 EC2 CPU increases for 2 it decreases at same time. After some period (5 minutes) they changed that 1 decreases and 2 increases, after next 5 minutes they changed again and so on.


  • Does this mean that aws ELB route request to the instance for some period of time? For example 10s for 1 instance then 10s for another one?
  • Or it routes batch request? For example first 100 to the 1 EC2 and next 100 to 2 and so on?

The documentation says that aws ELB uses round robin. But I think that if they had routed every request to next instance there wouldn't have been different directions e.g. all instance loading would have been difference for 1-2% in load, but had the same trend (increasing or decreasing). Am I right?

The graph is like that (about 18 EC2, left is CPU loading percentage):

enter image description here


  1. It is classic load balancer
  2. There 2 avalaibility zones, per 9 instances at each zone.
  • Hi Chery, are you using a classic load balancer or an application load balancer, are the EC2 instances in the same or different availability zones? – Michael Brown Jul 18 '17 at 11:29
  • Good catch! Question has been updated. – Cherry Jul 18 '17 at 11:31

From the AWS Site

A Classic Load Balancer, the load balancer node that receives the request selects a registered instance using the round robin routing algorithm for TCP listeners and the least outstanding requests routing algorithm for HTTP and HTTPS listeners.

But this might change if you have sticky sessions enabled. with sticky sessions:

you can use the sticky session feature (also known as session affinity), which enables the load balancer to bind a user's session to a specific instance. This ensures that all requests from the user during the session are sent to the same instance.


Could sticky sessions be causing the behaviour you are seeing?


As Michael mentioned, sticky sessions could be affecting how incoming connections are being loadbalanced.

I don't know what kind of application you are running, but you could always check the webserver's access log or your middleware access log, which could give you an insight which node(s) receive traffic and when.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.