Suppose in one of the EC2 instance out 2 EC2 instance of load balancer need to perform maintenance activity. Then all the traffic need to forward to other EC2 instance.
Practical steps:
Step 1: from the load balancer page --> instances tab --> check the status.
Step 2: Ensure that ping path in the health check is /health.
for that Navigate to Health check tab & go with option click on Edit Health Check option.
Ensure below details:
Ping protocol: HTTP
ping port : 4567
ping path = /health
Advanced Details:
timeout time for 5 seconds
interval for health check to be performed
unhealthy threshold = 2 ( if twice the health check is unhealth, then the system status will be unhealth)
healthy threshold =5 if the health check result is healthy for last 5 checks, then system is healthy as per the health checks.
Step 3:
For some maintenance activity, to make EC2 instance status as Not health follow below link in the browser.
DNS link/health/flip
Then the result will be Not healthy as shown below:
Step 4:
Then move back to link: DNS link/health (as shown below), it will still display status as health. Because of another health EC2 instance and if you refresh it again Not healthy from unhealthy EC2 instance. Meaning load balancing is still working.
Step 5:
After some refresh time. the status in instances tab will changes to Outofservice. Because of step3 process.
Step 6:
Step 7: Make the EC2 instance back to healthy( in service) status.
No comments:
Post a Comment