0

I have an ELB and ASG, where ASG has to do some warmup for about 75 minutes, before it can serve the full and correct results. I specified a health check grace period of 4500 seconds. In the ELB template I specified a HealthCheck Target to ping, which returns 200 (OK) only if the warmup is complete.

"HealthCheck" : {
        "HealthyThreshold" : "3",
        "Interval" : "60",
        "Target" : { "Ref" : "HealthCheckAPI" },
        "Timeout" : "15",
        "UnhealthyThreshold" : "5"
    }

and the URL for Healthcheck API is defined in properties:

  "HealthCheckAPI" : {
  "Type" : "String",
  "Description" : "The API to check for service availability and being warmed up",
  "Default": "HTTP:8080/api/health"
  }

However, what I get now is that even though the Healthcheck API returns 503 (Service Unavailable), the ELB can still serve requests against the ASG instances that are in the middle of being warmed up. Is that expected? How can I make the ELB unavailable for the period while Healthcheck API returns non 200 (OK) ?

Aliya
  • 101

1 Answers1

0

My HealthCheck API was returning 200 (OK) status when it was supposed to return 503 during warmup. Problem is fixed.

Aliya
  • 101