Module server
Expand description
The server: holds the log (one shared log for every shard, or a log per
shard in directories from before it), each shard’s run store and
checkpoints on its own disk, and leases the shards to worker
connections. Each shard is leased on its own, with an epoch of its own:
a worker takes free shards up to the number it asked for (all, unless
it said otherwise) and waits as a standby for more. When a holder
disconnects or goes silent past its Liveness timeout, its shards go
to waiting workers with new epochs, which recover them from disk.
Structs§
- Liveness
- When the server revokes the lease of a worker it no longer hears from.
- Server
- Server
Config
Traits§
- Socket
- A connection the server can serve: read by the connection task, written by whichever thread produced a reply.
- TryWrite
- The write side of a
Socket. Shard threads write without a runtime.
Functions§
- head_
for - serve_
tcp - Listens on a TCP address (and optionally a Unix socket) until the task
is cancelled. Each connection first completes the server’s TLS handshake
and token exchange, if it has either (
Server::set_security). A listener on a non-loopback address with neither prints a warning. - serve_
unix - Listens on a Unix socket. The token applies here as on TCP; TLS does not.