0
votes

I'm having two EC2 instances running behind an Elastic Load Balancer (ELB). When one EC2 instance not responding, the request redirected by ELB to that instance will get a TIMEOUT response.

Is there anyway to prevent this, for example, redirect to other instances if the current one's load is high or not working?

2

2 Answers

2
votes

The Elastic Load Balancer supports a Health Check. The load balancer performs the health check at regular intervals (eg every 10 seconds) to check the health of the Amazon EC2 instances connected to the Load Balancer.

If an instance fails the health check a given number of times, the load balancer will stop sending traffic to the instance. The load balancer will continue performing the health check and, if the instance again passes the health check a given number of times, the load balancer will again serve traffic to the instance.

See:

0
votes

Config a health check on the load balancer so the load balancer can know this peer is down.