Deployment handling open connections

This was asked before, but not answered, yet.

How does Fly handle in-flight-requests to old instances when shutting them down during deployment? Is there a wait time allowing in-flight-requests to be finished by these instances? Does setting kill_timeout affect this?

I thought this might be of interest for the community, so asking here not via support mail.

Hey @nickluger

Does setting kill_timeout affect this?

kill_timeout should be respected during deploy.

You also need to make sure the app no longer accepts new requests, so the app needs to handle kill_signal and close the listening socket.

Our proxy won’t send new requests to machines that are cordoned (blue/green deployment) or being updated to a new version (rolling/immediate deployment), but it still takes some time for this info to propagate to proxies in all regions, so it’s best for the app to stop accepting new requests if it knows it’s being shut down.

Hey @pavel,

thanks for the info, that clarifies things!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.