pub struct ReplicationConfig {Show 19 fields
pub enabled: bool,
pub role: ReplicationRole,
pub bind_addr: String,
pub replica_of: Option<String>,
pub auth_token: Option<String>,
pub compression: ReplicationCompression,
pub zstd_level: i32,
pub send_policy: ReplicationSendPolicy,
pub batch_max_records: usize,
pub batch_max_bytes: usize,
pub batch_max_delay_us: u64,
pub backlog_bytes: usize,
pub snapshot_chunk_bytes: usize,
pub queue_capacity: usize,
pub max_replicas: usize,
pub connect_timeout_ms: u64,
pub write_timeout_ms: u64,
pub reconnect_backoff_ms: u64,
pub subscriber_channel_capacity: usize,
}Expand description
Native replication configuration.
Fields§
§enabled: boolEnable native mutation-stream replication.
role: ReplicationRoleRuntime role for this process.
bind_addr: StringAddress a primary listens on for replicas and service subscribers.
replica_of: Option<String>Primary address a replica connects to.
auth_token: Option<String>Optional plaintext authentication token for native replication.
compression: ReplicationCompressionCompression algorithm for mutation batches and snapshot chunks.
zstd_level: i32zstd compression level used when compression = "zstd".
send_policy: ReplicationSendPolicySend policy for primary mutation flushes.
batch_max_records: usizeMaximum records in one mutation batch.
batch_max_bytes: usizeMaximum uncompressed bytes in one mutation batch.
batch_max_delay_us: u64Maximum time a non-empty batch may wait before flush.
backlog_bytes: usizeApproximate retained in-memory backlog size for partial catch-up.
snapshot_chunk_bytes: usizeSnapshot chunk size before compression.
queue_capacity: usizePer-shard bounded queue capacity for ready replication batches.
The shard worker builds ordered mutation batches locally. When this queue is full, that shard’s emitting thread blocks until its exporter drains a batch. Increase this if export lanes cannot keep up with bursty writes.
max_replicas: usizeMaximum simultaneously-connected replicas in listen mode.
connect_timeout_ms: u64Maximum time spent opening one TCP connect attempt from a replica.
write_timeout_ms: u64Per-write timeout for replication TCP I/O.
reconnect_backoff_ms: u64Delay between reconnect attempts after a replica disconnect.
subscriber_channel_capacity: usizePer-subscriber outbound channel capacity.
Trait Implementations§
Source§impl Clone for ReplicationConfig
impl Clone for ReplicationConfig
Source§fn clone(&self) -> ReplicationConfig
fn clone(&self) -> ReplicationConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more