Back to docs

Recipe: Active-active deployment design

Run Meridian across multiple regions simultaneously with zero failover latency and full write-mastery per node.


Why active-active

Traditional active-passive setups waste half your infrastructure and introduce failover gaps measured in seconds. Active-active keeps every node serving traffic all the time. Meridian's conflict-free replicated data types (CRDTs) make this safe even for concurrent writes.

Topology

Deploy at least three Meridian nodes across geographic regions (e.g. us-east, eu-west, ap-southeast). Each node runs the full stack: API, database shard, and WebSocket broker. Clients connect to the nearest node via latency-based DNS or Anycast.

Conflict resolution

Meridian uses last-writer-wins with hybrid logical clocks (HLCs) for most document types. For collaborative surfaces like the whiteboard, we ship an operational-transform layer that merges non-commutative edits deterministically. No manual conflict dialogs — ever.

Anti-entropy

Nodes gossip state vectors every 200ms. When a partition heals, Meridian performs a Merkle-tree diff and ships only the divergent keys. Full sync of a 10M-document cluster completes in under three seconds on 10GbE.

Checklist

  • Provision odd-numbered node count (minimum 3)
  • Enable HLC monotonicity via NTP-synced hardware clocks
  • Set gossip interval to 200ms with 500ms suspicion timeout
  • Run meridian doctor --topology weekly
  • Monitor anti-entropy lag via the built-in Prometheus endpoint