I started a new project this week to overcome a common problem without generic answer. How can I park incoming tcp connection during the few milliseconds needed to migrate or restart a service.
At Touch &Sell, we can already deploy without downtime our rails app with docker but only if there is no migration to run else we have a few seconds of downtime.
We have some fast but complex migrations scheduled in a month. During those migrations, we would like to have no tcp failure at all, a small delay is however acceptable.
So we will :
- Deploy our new app in another container
- Configure nginx to redirect to tcpdam
- Run the database migrations (a few seconds)
- Configure nginx to redirect to new app ( a few ms)
- Flush tcpdam connections to new app
The github repository : tcpdam