wire compatibility contract
This page is the normative contract for mixed-version clusters and tooling that speak the legacy braft wire protocol.
QuorumKit may refactor transport internals, but a rolling migration only works if old nodes and new nodes can still talk to each other. For that reason, the default migration path MUST preserve the legacy braft wire dialect.
Scope
This contract covers:
- node-to-node Raft RPCs
- snapshot file transfer RPCs
- administrative RPCs that existing operators and tools may still call during migration
- the attachment and string-encoding conventions those RPCs rely on
This contract does not require QuorumKit to use brpc internally forever. It does require any compatibility transport mode to look the same on the wire as existing braft deployments.
Stable services and methods
QuorumKit MUST preserve the externally visible service and method names in these schemas:
src/braft/raft.protoRaftService.pre_voteRaftService.request_voteRaftService.append_entriesRaftService.install_snapshotRaftService.timeout_now
src/braft/file_service.protoFileService.get_file
src/braft/cli.protoCliService.add_peerCliService.remove_peerCliService.change_peersCliService.reset_peerCliService.snapshotCliService.get_leaderCliService.transfer_leader
QuorumKit SHOULD preserve the operational compatibility surface in src/braft/builtin_service.proto, including raft_stat.default_method, for drop-in observability and tooling.
Schema stability rules
For the protobuf messages in the legacy wire schemas:
- existing field numbers MUST NOT be renumbered
- existing fields MUST NOT be removed
- existing fields MUST NOT be repurposed to a different meaning
- existing field types and cardinality (
required,optional,repeated) MUST remain wire-compatible
QuorumKit MAY add new optional fields if, and only if:
- legacy peers can ignore them safely
- mixed-version behavior remains correct when old nodes never send or read them
Attachment conventions
Some parts of the wire contract are not expressed entirely in protobuf fields.
QuorumKit MUST preserve these conventions:
AppendEntriesentry payload bytes remain carried in the RPC attachment, withEntryMeta.data_lendescribing the attachment-side payload lengthGetFileResponsefile bytes remain carried in the RPC attachment
Changing those conventions would be a wire break even if the protobuf schemas were unchanged.
String and URI conventions
QuorumKit MUST preserve these compatibility encodings:
peer_idandserver_idstrings use the legacyPeerId::to_string()grammar, whose canonical form ishost:port:idx:roleand whose parser continues to accept the shorter legacy forms that existing deployments use in practice (host:port,host:port:idx, and the full canonical form)group_idremains the same application-level identifier used by legacy deployments- snapshot-copy URIs carried in
InstallSnapshotRequest.uriremain consumable by legacy snapshot download logic built aroundFileService, including the legacyremote://<server_addr>/<reader_id>grammar emitted bySnapshotReader::generate_uri_for_copy()
Mixed-version cluster guarantees
In a supported rolling migration, a cluster containing both legacy braft nodes and QuorumKit nodes MUST be able to:
- elect a leader
- replicate and commit logs
- install snapshots
- transfer leadership
- process peer configuration changes through the legacy RPC/admin surface
Storage backend selection MUST NOT change the network-visible protocol. A node using one backend family and a node using another backend family still have to speak the same legacy wire dialect during migration.
Transport independence
This contract freezes the wire behavior, not the implementation behind it.
QuorumKit MAY eventually support:
- a different transport implementation that still speaks the legacy braft wire dialect
- a separate native QuorumKit wire protocol
But a native QuorumKit wire protocol, if it exists, MUST be treated as a separate explicit mode. It is not the default rolling-migration path.
Out of contract
This contract does not require:
- permanent brpc internals inside QuorumKit
- identical connection pooling or threading behavior
- identical performance characteristics
It does require that old peers, new peers, and existing operational tools continue to interoperate across a mixed-version rollout.