Skip to content

Architecture

david edited this page Jul 18, 2026 · 3 revisions

Architecture

中文: 架构

Full notes: docs/ARCHITECTURE.md · 中文

Positioning

Thin Multi-Raft for matching HA: one Raft group per symbol (GroupId), shared peer connections, pluggable FSM. Stack: openraft + openraft-multi (exact pin). Not a TiKV raftstore fork.

Crate map

multiraft-core   → shared types / errors / ClusterConfig
multiraft-net    → MultiRaft facade + shared gRPC / in-process Router
multiraft-fsm    → StateMachine trait
multiraft-store  → per-group file persistence
multiraft-demo   → 3-node × N-group acceptance + Jepsen target

Topology

Admin HTTP (per node)     Raft gRPC (shared, O(nodes))
        │                         │
   node-1 / node-2 / node-3  ←── many groups per process
  • --mode node: one OS process per Raft node
  • --mode cluster: in-process 3-logical-node harness

Consistency (per group)

API Guarantee
propose Ok Linearizable write
read_linearizable Linearizable read (ReadIndex)
with_fsm Local / may be stale (debug only)

No cross-group transactions. See Consistency & testing · jepsen.md · 中文.

Downstream integration (phase 2, target)

matching process / ingress shell (Leader-only RMQ)
  → multiraft propose
  → FSM → matching engine FSM

Related designs

Clone this wiki locally