Closed aalin closed 1 year ago
Got something basic working, just need to integrate it with the metrics aggregator...
(the client on the right is first connected to the server in the bottom window, but when that server receives SIGINT, it will send session.transfer
with the serialized state to the client, which will post the serialized session to another server which will resume the session)
Fixed by #19
By default, Fly.io sends SIGINT to processes when shutting down.
When the server receives SIGINT, it should stop receiving requests, stop all sessions, serialize+encrypt them and send them to each client and close their connections.
As soon as the connection has been closed, it should make a POST to the resume endpoint which should then be received by another server.
It's not clear to me how to trap SIGINT inside the async containers..