1

I'm working with Marathon/Mesosphere and have enabled health checks for my app which is working fine, Marathon shows health check as Green for my app. Now that health check works, I want to use this feature further to deploy new container of my app if health check fails (say for every 10 consecutive failed health checks deploy a new container).

How can I do that?

ankit tyagi
  • 778
  • 2
  • 16
  • 27
  • This looks like an autoscaling. Take a look at [marathon-autoscale](https://github.com/mesosphere/marathon-autoscale) – janisz Aug 19 '16 at 11:17

1 Answers1

3

I don't think you even need marathon-autoscale to do this. This should work outside the box - you may configure a healthcheck that will kill a running Marathon task after 10 consecutive healthcheck failures and start a new one.

Something simple would look like that:

"healthChecks": [
  {
    "protocol": "HTTP",
    "path": "/health",
    "gracePeriodSeconds": 120,
    "intervalSeconds": 60,
    "portIndex": 0,
    "timeoutSeconds": 30,
    "maxConsecutiveFailures": 10
  }
]
serejja
  • 22,901
  • 6
  • 64
  • 72