Multi-Region Active-Active Database Architecture (2026)

Multi-Region Active-Active Database Architecture (2026)

Multi-Region Active-Active Database Architecture (2026)

Most teams that say they run a multi region active active database architecture are actually running something narrower: a stateless application tier in every region sitting on a database that still has one writer per row. The distinction matters, because the moment two regions can accept a write to the same key at the same time, you have moved from an operations problem to a correctness problem, and no amount of load-balancer tuning fixes a lost update.

This is a good moment to revisit the topic. Over the past eighteen months the managed market changed shape. Amazon Aurora DSQL reached general availability with a two-region-plus-witness design, DynamoDB global tables gained a multi-Region strong consistency mode, and the distributed SQL engines hardened their region-survival stories. The trade-offs did not disappear, but the menu got better and the cost of choosing wrong got clearer.

You will leave with a decision framework: which topology fits which data, which consistency promise you can afford, how conflicts actually get resolved, what failover looks like in practice, and where the traps are. Facts about specific products were checked against vendor documentation on 2 November 2026; anything I could not verify is labelled.

What this covers: the economics of active-active, the consistency spectrum and PACELC, single-writer versus multi-writer topologies, quorum-based and asynchronous replication, conflict resolution with last-writer-wins, CRDTs and application merge, how four real systems behave, failover and evacuation, and a practical checklist.

Context and Background

Three forces push teams toward active-active. The first is recovery objectives. When the recovery time objective (RTO) and recovery point objective (RPO) approach zero, an active-passive standby that takes minutes to promote is not good enough. If every region already serves traffic and accepts writes, failover is a routing change rather than a promotion event.

The second force is latency. A user in Frankfurt should not pay a 150 millisecond round trip to a writer in Virginia for every mutation. The speed of light in fibre is roughly 200,000 km per second, so a Frankfurt to Virginia round trip has a physical floor of about 80 to 90 milliseconds before routing, queueing, and TLS handshakes add their share. Placing a writable replica near the user removes that tax for operations that can commit locally.

The third force is data residency. Regulations such as the GDPR and India’s DPDP Act push some records toward being stored and served from specific jurisdictions. Regional write capability then stops being a luxury. Note, however, that residency usually argues for home-region ownership, not for free-for-all multi-writer, which is a theme we return to later.

Active-passive is the conservative alternative: one region writes, others replicate asynchronously and stand by. Its real RPO is the replication lag at the moment of failure, which under load can be seconds of writes lost permanently. Its RTO is detection plus promotion plus client reconnection, which in practice is seldom under a minute. Active-active compresses both numbers, but only if the design keeps the surviving region able to accept writes without waiting for the failed one.

The theory behind the trade-off is well known. The CAP theorem says that during a network partition you choose between consistency and availability. The more useful lens is PACELC: if there is a partition (P), choose availability (A) or consistency (C); else (E), in normal operation, choose latency (L) or consistency (C). Active-active is a bet about the “else” clause, because partitions are rare but every write pays the latency-versus-consistency toll all day long. For the distributed SQL engines that sit at the strong-consistency end, our comparison of PostgreSQL, YugabyteDB and CockroachDB covers the per-engine details. Google’s documentation on Spanner external consistency is the canonical statement of the strongest practical guarantee: the system behaves as if all transactions ran sequentially, in an order that matches the order in which commits can be observed.

A last piece of context is what changed recently. Until about 2024 the choice was effectively binary: Spanner-style strong consistency with a high write-latency floor, or Dynamo-style eventual consistency with last-writer-wins. In 2025 AWS shipped both a serverless strongly consistent active-active SQL service and a strongly consistent mode for global tables. That does not make strong consistency free. It makes the price list more transparent, and it makes the old argument that you must accept lost updates to be multi-region far harder to defend.

The Reference Architecture and the Consistency Spectrum

A multi-region active-active database accepts writes in more than one region and reconciles them into one logical dataset. Three choices define it: how writes are routed, whether commits wait for other regions, and which consistency promise the application receives. These choices are coupled. You cannot have strong consistency, low cross-continent write latency, and full availability on both sides of a partition simultaneously.

Multi region active active database architecture with global routing, two writable regions, a witness, and a conflict handler

Figure 1: Reference topology. A global router sends users to a nearby region, each region has a writable database node, a third witness or replica supplies the tiebreak, and a conflict handler covers collisions.

The figure shows the topology most teams converge on. Routing is by latency or geography, each region has its own stateless application tier and a writable database node, and a third location provides a tiebreaker. The conflict handler is drawn as a separate box because the best systems make conflict policy an explicit, inspectable component rather than a side effect of replication.

Split the application and the data consistency story

The application tier and the data tier do not need to share a consistency regime. It is common and sensible to run the application statelessly in every region while giving different tables different guarantees. A catalogue or profile table can be served from a nearby replica at single-digit-millisecond latency with bounded staleness. A ledger, an inventory counter, or a uniqueness constraint routes to a quorum that spans regions and pays the wide-area round trip.

This split is where most of the latency budget is won. If 95 percent of operations tolerate staleness and 5 percent require strong guarantees, you pay the cross-region cost only 5 percent of the time. The architectural work is deciding which calls are in which class, and writing that decision down per endpoint rather than leaving it to a default connection string.

The consistency levels you can actually promise

Strong consistency, meaning linearizability or Spanner’s external consistency, makes every read see the latest committed write. It is the easiest to reason about and the most expensive to provide globally. Bounded staleness lets reads lag by a defined window, such as a number of operations or a time interval. Azure Cosmos DB exposes it as a first-class level. Session consistency scopes read-your-writes guarantees to one client, which is often enough for user-facing flows. Causal consistency preserves the order of dependent operations without a single global order. Eventual consistency promises only convergence once writes stop.

The practical lesson is to choose the weakest level that still satisfies the product requirement, feature by feature. A social feed tolerates a post appearing a few seconds late. A comment thread must never show a reply before its parent, which causal consistency guarantees cheaply. A balance transfer needs serializability. Treating consistency as one global knob is the single most common source of both overspending and data bugs.

Four classes of conflict

Conflicts follow from the model, and it helps to name them. A write-write conflict occurs when two regions update the same field. An insert-insert conflict occurs when two regions create rows that collide on a unique key. A read-modify-write hazard, such as decrementing a shared counter, is where naive last-writer-wins silently loses updates. A delete-update conflict occurs when one region deletes a row that another updates.

Azure’s documentation classifies Cosmos DB conflicts the same way: insert, replace, and delete. For each table in your schema, walk through all four classes explicitly instead of assuming write-write is the only one. The delete case is the classic source of zombie records: without retained tombstones, a late update can resurrect a row that a peer believed gone.

Topology: Who Is Allowed to Write What

The first design fork is whether any given row can be written from more than one region. Everything else follows from the answer.

Home-region ownership

In a home-region design every record has an owning region, and all writes for it land there. European customers write in Europe, US customers in the US. Two regions never write the same row concurrently, so conflicts largely vanish. Other regions may hold read replicas of the data, and a cross-region request is forwarded to the owner.

This is the safest pattern and, in my experience, how many production “active-active” systems truly run. It also lines up with residency law. The catch is that it works only when data partitions cleanly by geography. A travelling user, a global inventory count, or a cross-region transfer breaks the assumption, and you need a forwarding or two-phase path for those cases. CockroachDB’s REGIONAL BY ROW table locality is an explicit implementation of this idea: a hidden region column pins each row to a home region while the database remains one logical SQL surface.

Home-region ownership with failover writes

A refinement keeps the home region as the normal owner but permits another region to accept writes for a key if the home region is unreachable. Conflicts stay at zero in the common case, and write availability is preserved during a partition. The cost is a narrow window where a foreign write can collide with a late-arriving home write, so you still need a resolution rule for exactly that edge. Treat it as an explicit, tested path, not a theoretical one, because it will fire during the one regional incident you care about.

True multi-writer

In true multi-writer mode any region can mutate any row. DynamoDB global tables in eventual-consistency mode, Cassandra across multiple data centres, and Azure Cosmos DB with multi-region writes all operate here. Convergence depends on last-writer-wins or application-supplied merge logic. It offers the best write latency and availability, and the highest burden on data modelling. Use it when the data is inherently mergeable, or when losing an occasional concurrent update is genuinely acceptable.

Quorum-based global writes

The fourth option is not about who writes but about how commits happen. Systems such as Spanner, Aurora DSQL, CockroachDB, and YugabyteDB let any region accept a transaction, but the commit is decided by a quorum protocol, so there is only one agreed order. Conflicts are resolved by aborting one of the competing transactions, not by silently merging. You pay in commit latency, and in return you get a single timeline. The next section looks at that price.

Replication Discipline: From Asynchronous to Quorum Commit

The second design fork is replication discipline. It is better understood as a dial than a switch.

Asynchronous replication

Each region commits locally and ships changes to peers afterward. Writes are fast, because they never wait for a remote region, and a regional outage does not stall the others. The cost is that a fresh write is not immediately visible elsewhere, and two regions can commit conflicting writes that only meet later. AWS documents that DynamoDB global tables in multi-Region eventual consistency mode usually replicate within one to two seconds, and resolve concurrent changes to the same item by last-writer-wins. That is a vendor-stated typical figure, not a guarantee, and it will stretch during regional impairment.

The RPO under asynchronous replication is the amount of un-replicated data in the failed region, which is non-zero by definition. That is the price of the latency win, and it must be a conscious business decision rather than an accident of defaults.

Quorum commit

Quorum systems require a commit to be durably recorded in a majority of replicas, which for a multi-region deployment means at least one other region. The floor for write latency becomes the round trip to the nearest quorum partner. Spanner uses Paxos with TrueTime, a clock API that exposes bounded uncertainty, to give external consistency. CockroachDB and YugabyteDB use Raft-based consensus to provide serializable isolation.

CockroachDB makes the dial explicit through survival goals. The default is to survive a zone failure. Setting SURVIVE REGION FAILURE requires at least three database regions, and in a three-region cluster raises the replication factor from three to five, spread two, two, and one across the regions. The documentation states that region survival increases write latency by at least the round trip to the nearest region, because writes must coordinate across two of the three regions, while reads are unaffected. That is a clean example of paying exactly for the failure domain you want to survive.

The witness pattern

A subtle and increasingly popular design is a pair of full regions plus a lightweight witness. Amazon Aurora DSQL, generally available since 27 May 2025, uses two peered regions with endpoints and a third region acting as a log-only witness with no cluster resource or endpoint. AWS states the design targets 99.99 percent availability in a single region and 99.999 percent across multiple regions; those are design targets, and the contractual SLA is a separate document.

Marc Brooker’s engineering write-up explains the mechanics. DSQL uses optimistic concurrency control, adjudicators make commit decisions, and a Journal makes committed data durable in multiple regions. In the happy path replication is a two-of-three quorum across three regions, and commit latency is the same from either active region. If the witness becomes unreachable, replication degrades to two-of-two and commits must wait for the longest link, though customers see no unavailability. If one full region is partitioned away, its endpoint becomes unavailable for reads and writes, while the majority-side endpoint keeps strong consistency. That is a deliberate CAP choice: the minority side does not accept writes.

Sequence diagram of a multi region quorum commit across two active regions and a witness journal

Figure 3: Quorum commit in a two-regions-plus-witness design. The coordinating region validates conflicts optimistically, replicates the journal entry to its peer and the witness, and acknowledges the client after a majority has it.

The key insight in the figure is that a majority only needs two of the three journal copies. The witness is cheap because it stores only the log, but it is what lets a two-region deployment survive the loss of either full region without a split brain. Any design with an even number of data regions and no tiebreaker eventually hits the question of who is right after a partition. A witness answers that question structurally.

What commit latency really costs

Back-of-envelope reasoning is more useful than vendor marketing here. Suppose your two active regions are 70 milliseconds round trip apart. A quorum commit that needs one remote acknowledgement cannot complete faster than roughly 70 milliseconds plus processing. A transaction that issues five dependent statements before committing, with each statement hitting a remote leaseholder, can multiply that number. These figures are illustrative arithmetic, not benchmarks, but the structure is general: commit latency is bounded below by the round trip to the nearest quorum partner, and chatty transactions amplify it.

The practical mitigations are to keep transactions short, batch statements, colocate the rows a transaction touches in one region, and use follower or stale reads for read-only paths. Optimistic engines add a second consideration: with OCC, long transactions or hot rows produce commit-time aborts, so the application must retry. That retry loop is not optional; it is part of the contract.

Conflict Resolution: Last-Writer-Wins, CRDTs, and Application Merge

If two regions can write the same data without a global order, convergence is mandatory, and the strategy you choose determines whether your data stays correct. Three families cover almost everything: last-writer-wins, conflict-free replicated data types, and application-level merge. They differ in how much they understand your data’s meaning.

Conflict resolution routing by data shape: scalar to last writer wins, counter or set to CRDT, business rule to application merge

Figure 2: Route each conflict by data type. Scalars fall back to field-level last-writer-wins, mergeable structures use CRDTs, and genuine business rules escalate to an application handler with a manual conflict feed.

Last-writer-wins

In last-writer-wins (LWW) every write carries a timestamp and the highest timestamp wins on conflict. It always converges and costs almost nothing. Its flaw is that the loser is silently discarded. DynamoDB global tables use it in eventual mode; Cosmos DB uses it by default, with the system _ts timestamp as the resolution path and, for NoSQL accounts, an optional custom numeric path you can name instead. Cosmos DB documentation adds a notable rule: a delete always beats an insert or replace conflict, regardless of the resolution path value.

LWW is acceptable for last-seen timestamps, presence flags, and cache-like data. It is dangerous for anything where a lost write means lost money or lost intent. Two further problems sharpen the danger. First, LWW is only as good as the clocks: a region with a fast clock wins every race. Hybrid logical clocks and clock-synchronization services reduce skew, but they do not remove the semantic issue that the “later” write was not necessarily the better one. Second, granularity matters. If two regions update different columns of one row, row-level LWW discards one region’s column for no reason, whereas field-level or cell-level resolution keeps both and only arbitrates when the same field was touched. When evaluating a system, ask at what granularity it resolves conflicts.

CRDTs

A conflict-free replicated data type is designed so that concurrent updates merge to the same result regardless of delivery order. The standard building blocks are the grow-only counter, the positive-negative counter, the observed-remove set, and the LWW register. Increments from two regions both survive, which is exactly the behavior naive LWW cannot give you. Redis Enterprise active-active databases and Riak built their reputations on this approach.

The constraint is modelling. Not everything has a natural CRDT form. A bank balance with a non-negative invariant cannot be a plain counter, because two regions can each approve a withdrawal that is individually valid and jointly overdraws the account. CRDTs guarantee convergence, not invariants. For invariant-bearing data you need either a coordination step (a quorum transaction) or an escrow-style scheme that pre-allocates a budget of the resource to each region.

Application merge and the conflicts feed

When neither LWW nor a CRDT expresses your intent, you give the system both versions and a function that returns the resolved one. Cosmos DB supports this through a merge stored procedure registered on the container, which the server invokes automatically on conflict, executing once as part of the commit protocol. If no procedure is registered, or it throws, the conflict lands in a conflicts feed that your application must resolve manually. Per Microsoft’s documentation, the custom policy is available only for NoSQL accounts and only at container creation, which is a design-time commitment you cannot retrofit.

Two practices make application merge safe. Make the merge function pure and commutative, so replaying it in a different order gives the same answer. And make the conflicts feed observable, with an alert and a dashboard, because a conflict queue nobody watches is a slow data-loss channel.

Where the strong-consistency engines differ

Quorum systems sidestep merge by aborting one of two competing transactions. In DSQL’s optimistic model the loser fails at commit and the client retries. In Spanner the lock manager serializes writers. In CockroachDB, transactions that touch the same range contend through its transaction layer. The conflict does not disappear; it is converted from silent divergence into an explicit error, which is a better failure mode for most business data. The cost is that your application needs idempotent, retry-safe transaction code and your hot rows become throughput limits.

Four Systems in Practice

Abstractions help only if you can map them to products. The following reflects documentation checked on 2 November 2026; consult each vendor for region lists and prices, which change.

System Write model Consistency Conflict handling Key caveat
Google Spanner Any region via Paxos groups External consistency Locking, aborts Needs multi-region configuration; commit latency tied to quorum geography
Aurora DSQL Two active regions plus witness Strong, across regions Optimistic concurrency, commit-time abort Region availability limited; check current list
CockroachDB Raft per range, locality per table Serializable Transaction contention, retries REGION survival needs at least 3 regions, higher write latency
DynamoDB global tables Any replica region Eventual by default; strong via MRSC LWW in eventual mode MRSC write to an item being modified elsewhere fails with a retryable error

Spanner

Spanner is the reference point for strong global consistency. Its TrueTime clock exposes bounded uncertainty, and transactions wait out that uncertainty so that commit order matches real-time order. I could not verify a current numeric uncertainty bound from Google’s public documentation page this run, so I will not quote one. What matters architecturally is that you choose a multi-region instance configuration deliberately: where the leader replicas and witness replicas live determines your write latency, and a poor choice cannot be fixed by tuning queries.

Aurora DSQL

DSQL’s headline is serverless, strongly consistent active-active SQL with no instance management. At general availability the multi-region configuration was available in US East (N. Virginia), US East (Ohio), and US West (Oregon), with several other regions single-region only. That region list may have grown since; check the current documentation before you rely on it. The practical implication is that DSQL’s multi-region story is regionally bounded, so latency-sensitive global products on three continents need a different answer today. Its optimistic concurrency model also means you should design for retries from day one.

CockroachDB

CockroachDB gives the most explicit control surface. You declare database regions, set the survival goal, and choose a locality per table: REGIONAL BY ROW pins each row to a home region, REGIONAL BY TABLE puts a whole table in one region, and GLOBAL tables are optimized for read-heavy reference data with fast reads everywhere at the cost of slower writes. I cite these localities from product documentation I did not re-fetch in full this run, so verify exact semantics for your version before committing a schema. Combined with SURVIVE REGION FAILURE this is the closest thing to a configuration-driven version of the topology decisions described earlier.

DynamoDB global tables

Global tables now come in two flavours. In multi-Region eventual consistency (MREC), replication typically lands within one to two seconds and conflicts resolve by LWW. In multi-Region strong consistency (MRSC), which is chosen when the table is created, a successful write to any replica is immediately readable from any other replica, and AWS states a zero RPO for applications built on it. A write to an item that is concurrently being modified in another Region fails with a retryable exception, which is the conflict-as-error pattern again. AWS describes global tables as designed for up to 99.999 percent availability. Check the current MRSC requirements, such as which regions and how many replicas, in the developer guide, since I did not confirm them in this run.

Failover, Evacuation, and Operating the Thing

Active-active does not eliminate failover; it turns it from a database event into a traffic event. The database remains available on the majority side, and your routing layer must stop sending users to the impaired region.

Decision flow for choosing a multi region database topology from partitionability, consistency need and data mergeability

Figure 4: Choosing a topology. Start with whether data partitions by home region, then ask whether strong consistency is required and whether the data is mergeable.

Routing and health detection

Global routing can be DNS-based, anycast, or an application-level client library that holds multiple endpoints. DNS failover is bounded by TTLs and client caching, so a 60 second TTL does not guarantee 60 second failover. Client-side endpoint lists with health-aware retry give faster and more controllable behavior; AWS has published guidance on multi-region endpoint routing for DSQL for this reason. Whichever you pick, test it with a real fault injection exercise, because untested failover paths fail in novel ways.

Health detection needs care. A region that is slow but alive is more dangerous than one that is down, because it holds connections, builds retry storms, and stalls quorum commits. Use deep health checks that exercise a write path, and set circuit breakers so that retries do not amplify a brownout. This is where patterns from asynchronous processing architecture, such as queues with backpressure and idempotent consumers, pay off: they absorb the burst of replayed work when a region returns.

Evacuation and reintegration

Regional evacuation means draining traffic from a region deliberately, for maintenance or an incident. In a quorum system it is straightforward: shift routing and let the data layer continue. In an asynchronous multi-writer system you must first wait for outbound replication to drain, or accept the RPO. Reintegration is the dangerous half. A region that was offline comes back with writes the others never saw, and the merge happens then. Rehearse reintegration, not just failover, and watch conflict counters during it.

Observability that matters

Track replication lag per region pair, conflict rate per table, commit latency percentiles split by transaction type, retry and abort rates, and the age of the oldest entry in any conflict queue. Alert on trends. A conflict rate that doubles after a deploy is an early warning that a code change introduced a cross-region write pattern. Capacity planning should assume that after losing one of two regions the surviving region absorbs all traffic, so each region must be sized for 100 percent of load, which makes the cost of active-active roughly the cost of two full-size deployments, not one plus idle spare. In a three-region design the headroom can be smaller: each region needs to absorb its share of the lost region’s traffic.

Cost levers

Cross-region data transfer is typically a substantial line item for replication-heavy workloads, and it scales with write volume rather than read volume. Prices vary by cloud and region pair and change often, so model them using the provider’s current pricing page. The levers are compressing replicated payloads, avoiding wide rows that change a single column, keeping chatty derived data out of the replicated store, and using home-region ownership so most writes never cross a region boundary.

Trade-offs, Gotchas, and What Goes Wrong

Clock skew breaks LWW. Any timestamp-based resolver trusts clocks. Cosmos DB’s default path is based on a time-synchronization protocol, and Spanner invests in hardware time, because without bounded error “latest” is a guess. If you build your own timestamps, use hybrid logical clocks and monitor drift.

Hot keys eat the benefit. A single contended row, such as a global counter or a leaderboard, serializes writers across regions regardless of engine. In OCC engines it becomes an abort storm; in locking engines it becomes a queue. Shard the counter, use a CRDT counter, or move the hot item into a purpose-built store.

Uniqueness is expensive. A global unique constraint is a coordination problem. Insert-insert conflicts on a unique key either need a quorum check on every insert or a post-hoc conflict path. If usernames must be unique worldwide, plan on paying a cross-region cost at signup, which is rare, rather than at every request.

Secondary effects are not covered. A strongly consistent database does not make your message broker, cache, or search index consistent. Dual writes to a database and a queue can still diverge. Use the outbox pattern, change data capture, or transactional messaging so downstream systems see the same order as the source of truth.

Schema changes become distributed events. Rolling out a migration across regions with asynchronous replication risks a window where regions run different versions. Use expand-contract migrations and keep both versions of the application compatible until all regions converge.

Split brain from bad tiebreakers. Two regions and no witness means a partition leaves each side wondering whether it is the survivor. If both continue writing, you reconcile later by hand. A witness, a third region, or an external lock service provides a principled answer.

Retries without idempotency. Optimistic and quorum systems return retryable errors by design. A client that blindly retries a non-idempotent operation after an ambiguous timeout can double-apply it. Use idempotency keys on externally visible operations.

Testing only the happy path. Teams run a game day for region loss but never for partial failure: elevated latency, packet loss, one-way partitions. Those are the failures that stall quorums and fill retry queues. Inject them.

An honest summary is that active-active buys you resilience and latency at the price of design discipline. If your recovery objectives can tolerate a minute of failover and a few seconds of RPO, a well-run active-passive setup is cheaper, simpler, and easier to debug, and there is no shame in choosing it.

Practical Recommendations

Start from the data, not the technology. Classify each table or entity by three questions: does it partition naturally by region, does it require invariants such as uniqueness or non-negative balances, and is its content mergeable? Entities that partition by region should use home-region ownership. Entities with invariants belong on a quorum-based store. Mergeable entities, such as counters, sets, and presence data, can use CRDTs or LWW multi-writer replication.

Then set explicit objectives per tier. Write down the RTO, RPO, and acceptable write latency for each class, and map them to a survival goal or a consistency mode. Prefer managed services where the vendor operates the consensus layer, since running a cross-region Raft or Paxos deployment yourself is real work. Use the witness pattern or a third region so that partitions have a deterministic outcome.

Make the application retry-safe before you go multi-region. Idempotency keys, bounded retries with jitter, and short transactions are the entry ticket. Finally, rehearse: run failover, partial-failure, and reintegration exercises on a schedule, and keep the results.

Checklist before launch

  • Each entity is classified: home-region, quorum, or mergeable multi-writer.
  • RTO, RPO, and write latency targets are written down per tier.
  • The tiebreak mechanism (witness or third region) is explicit.
  • Conflict resolution granularity is known and tested for each table.
  • Delete and tombstone retention is longer than the worst expected partition.
  • Clients use idempotency keys and bounded, jittered retries.
  • Routing failover has been tested with real fault injection, including partial failures.
  • Each region is sized for the load it must absorb after a peer fails.
  • Replication lag, conflict rate, and abort rate are on dashboards with alerts.
  • Reintegration after an outage has been rehearsed.

Frequently Asked Questions

What is a multi-region active-active database?

It is a database deployment in which two or more geographic regions accept writes at the same time and keep one logical dataset in sync. Unlike active-passive, no region sits idle waiting for promotion. The hard part is concurrency: when two regions write the same key, the system must either order the writes through a quorum or converge them through a merge rule such as last-writer-wins or a CRDT.

Is active-active always better than active-passive?

No. Active-active reduces failover time and can cut write latency for distant users, but it adds consistency design, retry-safe application code, and roughly double the capacity. If you can tolerate a minute or more of failover and a few seconds of data loss, active-passive is simpler and cheaper. Choose active-active when recovery objectives or user latency requirements make the extra complexity worth paying.

Can I have strong consistency and active-active together?

Yes, with a price. Quorum-based systems such as Spanner, Aurora DSQL, CockroachDB, and DynamoDB global tables in multi-Region strong consistency mode give a single agreed order across regions. The price is commit latency bounded below by the round trip to the nearest quorum partner, and conflicts surface as aborted or retryable transactions rather than silent merges.

What is the difference between last-writer-wins and a CRDT?

Last-writer-wins picks the write with the highest timestamp and discards the other, so concurrent updates can be lost. A CRDT is a data structure whose merge function combines concurrent updates deterministically, so both increments to a counter survive. CRDTs fit counters, sets, and registers well, but they guarantee convergence only, not business invariants like a non-negative balance.

How does a witness region help?

A witness holds only a copy of the transaction log, not a full database. With two full regions and a witness, a majority of two out of three can form even if one full region is partitioned away, so the majority side keeps accepting writes with strong consistency. Aurora DSQL uses this design. It is cheaper than a third full region and prevents split brain.

How do I test a multi-region failover?

Run game days that inject realistic faults: full region loss, elevated latency, packet loss, and one-way partitions. Measure client-visible error rates, retry behavior, recovery time, replication lag, and conflict counts. Include reintegration of the failed region, because merging divergent writes is where problems often appear. Repeat after major releases, since routing and retry behavior drift over time.

Further Reading

By Riju — about

3 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *