Expand description
The Cluster Transport Protocol (CTP).
CTP is the protocol used to transmit commands from controllers to replicas and responses from replicas to controllers. It runs on top of a reliable bidirectional connection stream, as provided by TCP or UDS, and adds message framing as well as heartbeating.
CTP supports any message type that implements the serde Serialize and Deserialize
traits. Messages are encoded using the bincode format and then sent over the wire with a
length prefix.
A CTP server only serves a single client at a time. If a new client connects while a connection is already established, the previous connection is canceled.
Structs§
- Client
- A client for a CTP connection.
- Cluster
Server Metrics - Metrics for a cluster (CTP) server.
- Noop
Metrics - No-op
Metricsimplementation that ignores all events. - PerCluster
Server Metrics - Metrics for a single named cluster (CTP) server.
Traits§
- Message
- Trait for messages that can be sent over CTP.
- Metrics
- A trait for types that observe connection metric events.
Functions§
- serve
- Spawn a CTP server that serves connections at the given address.