4 ms·
This bit us in a recent project where we have very long ongoing downloads, where even a very high grace period wouldn't really help. I wonder whether it's tech
by eliaspro 4y ago
This bit us in a recent project where we have very long ongoing downloads, where even a very high grace period wouldn't really help.
I wonder whether it's technically generally feasible (possibly depends on net/http2's capabilities) to handover the connection from the old to the new server instance, comparable to what systemd does in terms of FD passing for socket-activated services.
- francislavoie 4y agoThe problem is that existing connections are inside of async functions (goroutines) that have references to the old config. AFAIK, there's no way in Go's stdlib to kill those goroutines while keeping the connection and handing it to another fresh goroutine. To be clear, the new config is running at the same time as the old is still tearing down; all new connections get handled by the new config. Listeners are shared and transferred between servers. We're all ears, though, if someone with deep knowledge of Go's internals can point us in the right direction.