Migrations and health check timeouts

Hi there,

Sorry, I am not a Meteor developer, though I am keen to learn how other DevOps folk handle this scenario I faced.

In my opinion, I want the application Image to launch as quickly as possible.

But in Meteor’s case, sometimes there are complex migrations happening, and they can take some time.

The problem (can you guess?) I had was that the migrations didn’t get enough time, since I have like a 2 unhealthy check of interval 10s on my AWS ECS load balancer. Workaround is to give it much more time.

Are there any other strategies I am missing to accommodate these MongoDB migrations that I might be missing?

And avoid long unhealthy check intervals? Or rather lower deployment times, but making this quicker somehow.

Many thanks!

Anything that blocks the CPU for more than the health check interval will cause the health check to fail (it’s a Node.js thing rather than Meteor.js).

The way I deal with it in our Meteor monolith is to deploy a separate “worker” instance to run the migrations. This worker instance doesn’t serve any traffic, and also runs other background tasks. The health check interval is more relaxed for it, compared to the other instance serving the traffic