awslabs / fargatecli

CLI for AWS Fargate
Apache License 2.0
893 stars 114 forks source link

Add health check configuration to service create #32

Open ksteiny opened 6 years ago

ksteiny commented 6 years ago

anyway to add custom health checks configurations to loadbalancer create cmd?

We are using graphql so everything is under /graphql vs /

jpignata commented 6 years ago

Sure, that's certainly doable. We'd have to add the toggles to the service create command as those properties are in the target group IIRC.

agwaltz commented 6 years ago

Adding the "Health check grace period" also would be excellent.

ecs-cli compose service --health-check-grace-period

andrewodri commented 6 years ago

Just want to 👍 this and clarify a few things:

I've encountered issues with the default settings, where the path "/" returns a 302 status code, which results in instance draining continually. Being able to specify our own health check would really help in providing a more robust configuration (especially when it comes to setting up a workflow of other developers).

And of course, the grace period would be really helpful too...

Also, thanks so much for providing this tool!

holyjak commented 5 years ago

We had two problems: 1) Our / requires authentication, so it would help to be able to specify another path that is open, e.g. /health. 2) Our service takes way too long to start so LB concluded it unhealthy before the web server had time to get up and start responding. Therefore we would need to either be able to disable health checks or, perhaps better, increase the Interval. Even better would be to be able to set the healthCheckGracePeriodSeconds.

To set the grace period manually:

aws ecs update-service --cluster fargate --service $SERVICE_NAME --health-check-grace-period-seconds 360

Reference: https://docs.aws.amazon.com/sdk-for-go/api/service/elbv2/#CreateTargetGroupInput