Expand description
One task per TCP connection: terminate TLS, route, attach, serve, detach.
The task owns the socket and nothing else. A migration never moves it: only the shard it sends its events to changes, which is exactly why a connection can cross shards without its client noticing anything but a new tree.
TLS -> Version -> [Authenticate] -> router.route()
-> attach -> prelude -> the shard's first transition -> ServerSync
-> service loop
-> detachFunctionsยง
- serve
- Serve one accepted TCP connection to completion.