Two Regions, Both Writable: Conflict Resolution with Hybrid Logical Clocks
Geographic redundancy starts as an availability requirement and quickly becomes a consistency problem. The availability part is easy to state: if a region goes dark, the application should keep serving from another one. The naive implementation is a primary region that owns all writes and a secondary that replicates and serves reads. It survives a read-region outage gracefully, but it has two sharp edges. Every writer, wherever they are, pays the latency to reach the one primary — a user in Sydney writing to a primary in Virginia feels every one of those milliseconds. And when the primary fails, you are not serving degraded; you are promoting a standby under pressure, hoping the last few writes made it across before the lights went out.
Active-active removes both edges by making every region a first-class writer. A user writes to the region nearest them, reads from the region nearest them, and the regions reconcile in the background. No write pays an intercontinental round-trip, and no failover needs a promotion ceremony, because there was never a single primary to lose. The price of this is the problem active-active exists to solve and single-primary setups get to pretend does not exist: two regions can write the same key at the same time, and the system must decide, deterministically and identically everywhere, which write wins.
Zaris runs active-active as two independent clusters — not one cluster stretched across an ocean — linked by asynchronous replication, with conflicts resolved by a hybrid logical clock and last-writer-wins. This post is about why those three choices go together, and what "last writer" has to mean when there is no clock everyone can trust.