Skip to main content

Module cross_dc

Module cross_dc 

Source
Expand description

Cross-datacenter async replication for distributed vector indexes

This module implements asynchronous replication of vector index updates across multiple datacenters with configurable lag tolerance.

§Design

Each datacenter hosts a DcReplicationNode. One DC is designated the primary (or leader); others are replicas. Index mutations are buffered in the primary and asynchronously shipped to replicas.

Key features:

  • Configurable lag tolerance (max acceptable replication lag)
  • Per-replica lag tracking and alerting
  • Automatic catch-up on reconnection
  • Conflict resolution strategies for network partitions
  • Bandwidth throttling to avoid saturating WAN links

§Consistency Model

Cross-DC replication is eventually consistent with configurable lag bounds. Reads on replicas may return stale data. For strong consistency, use the Raft cluster within a single DC.

Structs§

ConflictRecord
Record of a detected conflict
CrossDcConfig
Configuration for cross-DC replication
CrossDcCoordinator
Cross-DC replication coordinator
CrossDcStats
Statistics for cross-DC replication
PrimaryDcManager
The primary datacenter replication manager
ReplicaDcManager
Replica datacenter replication receiver
ReplicaTracker
Per-replica tracking state (maintained by primary)
ReplicationEntry
A single replication entry
ReplicationHealth
Overall replication health summary

Enums§

ConflictResolutionStrategy
Strategy for resolving write conflicts between DCs
ReplicaStatus
Status of a replica DC connection
ReplicationOperation
Types of replication operations

Type Aliases§

DcId
Datacenter identifier
ReplicationSeq
Replication sequence number (monotonically increasing per primary)