Production-ready TCP server with security, clustering, and monitoring.
Admin -- Full access to all commands including user managementReadWrite -- CRUD, indexes, transactions, blobs, search, proceduresRead -- Queries, counts, aggregations, list operations onlyOxiWire is OxiDB's custom binary protocol. Fixed-size encoding (1-byte type tags, 4-byte LE lengths, 8-byte LE numbers). Faster than JSON and MsgPack for both serialization and deserialization.
Clients can also use plain JSON over the same TCP connection.
Multi-node replication via Raft consensus (openraft). Each node runs its own state machine and persistent log; writes commit on quorum (2/3 for a 3-node group). Enable with the cluster feature flag in oxidb-server.
Persistent state v0.28.18 — Raft state is written to raft_meta.json + raft_log.jsonl on every mutation. Nodes survive container restarts and rejoin their Raft group automatically (previously the node would come back as a fresh Learner and the cluster would diverge).
To bootstrap a 3-node cluster, send raft_init on node 1, then raft_add_learner for nodes 2 and 3, then raft_change_membership: [1, 2, 3]. The full reference deployment lives at ShardReplicaRealWorldTest/ — 3 shards × 3 Raft nodes, fronted by oxipool, validated under 1M-record load with mid-stream failover.
| Environment Variable | Default | Description |
|---|---|---|
OXIDB_ADDR | 127.0.0.1:4444 | Client bind address |
OXIDB_DATA | ./oxidb_data | Data directory (also holds raft_meta.json + raft_log.jsonl) |
OXIDB_POOL_SIZE | 4 | Worker thread count |
OXIDB_IDLE_TIMEOUT | 30 | Connection timeout (seconds, 0 = never) |
| Cluster mode (--features cluster) | ||
OXIDB_NODE_ID | — | Required to enable cluster mode. Unique u64 per node within a Raft group. |
OXIDB_RAFT_ADDR | 127.0.0.1:4445 | Bind address for Raft RPC (separate from client port) |
OXIDB_RAFT_PEERS | — | 1=node1:5000,2=node2:5000,3=node3:5000 |