Expand description
Configuration for the replication engine.
This module defines all configuration types needed to run the replication engine.
Configuration is passed to ReplicationEngine::new()
and can be constructed programmatically or deserialized from YAML/JSON.
§Quick Start
use replication_engine::config::{ReplicationEngineConfig, PeerConfig};
let config = ReplicationEngineConfig {
local_node_id: "node-1".into(),
peers: vec![
PeerConfig::for_testing("node-2", "redis://peer2:6379"),
],
..Default::default()
};§Configuration Structure
ReplicationEngineConfig
├── local_node_id: String # This node's unique ID
├── settings: ReplicationEngineSettings
│ ├── hot_path: HotPathConfig # CDC stream tailing
│ ├── cold_path: ColdPathConfig # Merkle anti-entropy
│ ├── peer_health: PeerHealthConfig
│ └── slo: SloConfig # SLO thresholds
├── peers: Vec<PeerConfig> # Remote nodes to replicate from
└── cursor: CursorConfig # SQLite cursor persistence§YAML Example
local_node_id: "uk.node.london-1"
settings:
hot_path:
enabled: true
batch_size: 100
block_timeout: "5s"
cold_path:
enabled: true
interval_sec: 60
peers:
- node_id: "uk.node.manchester-1"
redis_url: "redis://peer1:6379"
cursor:
sqlite_path: "/var/lib/app/cursors.db"Structs§
- Cold
Path Config - Cold path (Merkle anti-entropy) configuration.
- Cursor
Config - Cursor persistence configuration.
- HotPath
Config - Hot path (CDC stream tailing) configuration.
- Peer
Config - Configuration for a single peer node.
- Peer
Health Config - Peer health check configuration.
- Replication
Engine Config - The top-level config object passed to
ReplicationEngine::new(). - Replication
Engine Settings - General settings for the replication logic.
- SloConfig
- SLO thresholds for detecting performance degradation.