AWS ELB terminates instance when using offline.htm for IIS

467 Views Asked by At

Currently we using AWS ELB with multiple instances for hosting our IIS website(s). When using app_offline.htm to display a maintenance message, the ELB healthcheck will terminate all the instances. This is due to the fact that the app_offline.htm page will return a 503 message and the ELB will determine this a non healthy host.

Is there a way to gracefully solve this problem, without modifying the health check (time) parameters within the AWS ELB. (and not deploying a "maintenance site")

thanx in advance.

1

There are 1 best solutions below

1
On

Yes, use the EC2 health checks instead of the ELB health checks in your AutoScaling group, at least while in maintenance. Otherwise, your instance will be terminated when the ELB Health Check fails due to the 503.

You can also remove the instance under maintenance from your AutoScaling group.

In the AutoScaling docs, see:
Temporarily Removing Instances
Health Checks