Quick revision
The short answer
Active-active replication across regions in both DynamoDB global tables and Cassandra multi-DC is asynchronous and resolves conflicts by last writer wins, so concurrent updates in two regions can silently lose one of them. That is acceptable for user profiles, which we write locally with idempotent, per-field updates. For account balances we either give each account a single home region that receives all its writes, or use a strongly consistent option such as DynamoDB's multi-region strong consistency where available, and in Cassandra we use LOCAL_QUORUM with lightweight transactions only within the home data center. Above all, we model money as an append-only ledger rather than a mutable balance.
What to remember
In this answer, we saw that multi-region active-active replication is asynchronous with last writer wins, which silently drops concurrent updates. Profiles accept that, with local per-field idempotent writes. Balances avoid it with a home region per account or a strongly consistent multi-region option, conditional writes or LWTs at LOCAL_SERIAL in Cassandra, and an append-only ledger whose entries never overwrite each other. A controlled failover of the home region trades a short pause for correctness.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
Active-active replication across regions in both DynamoDB global tables and Cassandra multi-DC is asynchronous and resolves conflicts by last writer wins, so concurrent updates in two regions can silently lose one of them. That is acceptable for user profiles, which we write locally with idempotent, per-field updates. For account balances we either give each account a single home region that receives all its writes, or use a strongly consistent option such as DynamoDB's multi-region strong consistency where available, and in Cassandra we use LOCAL_QUORUM with lightweight transactions only within the home data center. Above all, we model money as an append-only ledger rather than a mutable balance.
Why this question is asked
Running in three regions sounds like a deployment detail, but it changes what the database can promise. A write accepted in Frankfurt is not yet in Virginia, and if Virginia accepts a different write to the same record in that gap, one must lose. For a profile picture nobody cares; for a balance it means money appears or disappears. Interviewers ask this to see whether we can apply different consistency to different data in one product. In this answer, we will see how multi-region replication handles conflicts, design profiles for eventual consistency, design balances with a home region and a ledger, look at the Cassandra and DynamoDB specifics, and plan for a region failure.
1How Multi-Region Replication Handles Conflicts
In DynamoDB global tables, each region has a full replica that accepts reads and writes, and changes are copied to the other regions asynchronously, typically within a second. In Cassandra with several data centers, a write at LOCAL_QUORUM is acknowledged by the local data center and sent to remote ones in the background. In both, two regions can accept writes to the same item at nearly the same time.
When the changes meet, the systems apply last writer wins: the version with the later timestamp replaces the other. For a whole-item write in DynamoDB, the entire losing item is discarded; in Cassandra the comparison is per column. Either way, nothing raises an error. The losing update simply vanishes.
6 messages in order. Play them, or step through them one at a time.
Both debits were accepted; only one survives. The correct balance is 20.
For a balance this is dangerous. If an account holds 100 and a 30 debit is applied in region A while a 50 debit is applied in region B, both computing from 100, one region writes 70 and the other 50. Last writer wins keeps one of them, and the bank has lost track of a debit.
2Profiles: Local Writes and Eventual Consistency
User profiles change rarely and are mostly edited by their owner from one device at a time, so true conflicts are rare and their cost is low: at worst a user's latest display name is replaced by one from a second earlier. So profiles are written in the user's nearest region and replicated asynchronously.
Two design habits make this safer. First, update individual attributes rather than rewriting the whole item, using an UpdateItem with SET displayName in DynamoDB or an UPDATE of specific columns in Cassandra, so a change to the address in one region and to the avatar in another do not overwrite each other. Second, make updates idempotent, setting values rather than incrementing them, so retries and replays are harmless. If some fields must merge, such as a set of interests, we store them as separate rows or set types that combine additions.
3Balances: One Home Region per Account
For balances, we remove the possibility of concurrent writes from different regions. Each account gets a home region, stored in a small routing table and often chosen near the customer. Every write for that account, from any region, is routed to the home region, where it is applied with a strongly consistent, conditional operation. Reads can be served locally from the replica when slightly stale data is fine, such as showing the balance, and from the home region when deciding whether a payment is allowed.
In DynamoDB the home region applies debits with a conditional write or a transaction, for example TransactWriteItems that inserts a ledger entry and updates the balance with ConditionExpression balance >= :amount. DynamoDB global tables now also offer a multi-region strong consistency mode in recent versions, which avoids the routing layer at the cost of higher write latency; check availability in your regions and its cost before relying on it. A strongly consistent distributed SQL database is the other option if balances need multi-region writes without a home region.
4Model Money as a Ledger
Whatever the routing, a mutable balance column is fragile, because every update overwrites the previous truth. A ledger of entries is far more robust.
Each entry is a new row with its own key, so two entries written in different regions never conflict; replication merges them by simply having both. The balance is the sum of the entries, computed on read or kept as a cached projection that can be rebuilt. request_id makes retries idempotent: a duplicate request with the same id is ignored. The ledger does not, on its own, prevent overspending across regions, which is why the decision to accept a debit still happens in the home region, but it guarantees that no accepted entry is lost or overwritten.
5The Cassandra Specifics
In Cassandra multi-DC, profiles use LOCAL_QUORUM reads and writes in each data center, which gives read-your-writes for a user who stays in one region and tolerates the loss of one replica per data center. Balances use LOCAL_QUORUM in the account's home data center and lightweight transactions, such as INSERT ... IF NOT EXISTS for the idempotency key or UPDATE ... IF balance = ?, at LOCAL_SERIAL. LOCAL_SERIAL runs the Paxos round only within the local data center, which is why all writes for the account must go to that data center: an LWT in one data center does not coordinate with plain writes in another. SERIAL across data centers is possible but adds cross-region round trips to every conditional write.
| Data | Where writes go | Mechanism | On conflict |
|---|---|---|---|
| Profiles | Nearest region | Per-field updates, LOCAL_QUORUM | Last writer wins per field, accepted |
| Balances | Account's home region | Conditional write or LWT + ledger | Prevented; entries never overwrite |
| Balance display | Read local replica | Eventually consistent read | Briefly stale, accepted |
6When the Home Region Fails
A home region design must say what happens when the home is down. The usual answer is a controlled failover: an operator or automated runbook marks the region as down and moves home assignment for its accounts to another region. Because replication is asynchronous, the last second or so of entries may not have arrived, so the new home region pauses debits for affected accounts briefly, reconciles the ledger once the old region's data is available, and resumes. This is a deliberate choice of consistency over availability for money, explained in the RPO and RTO we agree with the business.
7Follow-up questions
Why not just use a version number with conditional writes in every region?
A condition such as version = 7 is checked only against the local replica. Two regions can each see version 7, each accept a write that sets version 8, and replication then picks one by timestamp. Conditional writes are only safe when every write for the item goes to the same place, which is why the home region is needed.
How do you detect conflicts that did happen?
For profiles, we can log the region and timestamp on each write and sample items where updates from two regions landed within the replication delay. For balances, a reconciliation job sums each account's ledger and compares it with the projected balance and with external records; any difference raises an alert.
8Conclusion
In this answer, we saw that multi-region active-active replication is asynchronous with last writer wins, which silently drops concurrent updates. Profiles accept that, with local per-field idempotent writes. Balances avoid it with a home region per account or a strongly consistent multi-region option, conditional writes or LWTs at LOCAL_SERIAL in Cassandra, and an append-only ledger whose entries never overwrite each other. A controlled failover of the home region trades a short pause for correctness.
Open with
I would start by saying that both DynamoDB global tables and Cassandra multi-DC replicate asynchronously and resolve conflicts with last writer wins, so if two regions update the same item at nearly the same time, one update silently disappears.
Then, if they want more
For profiles that is acceptable. I would write them in the nearest region, update individual fields rather than whole items so concurrent edits to different fields both survive, and keep updates idempotent. In Cassandra that is LOCAL_QUORUM per data center. Balances must not lose updates, so I would prevent concurrent cross-region writes.
Each account gets a home region and all writes for it are routed there, where they are applied with a conditional write or transaction in DynamoDB, or LOCAL_QUORUM plus lightweight transactions at LOCAL_SERIAL in Cassandra, which only coordinate within one data center. Reads for display can be local.
DynamoDB also has a multi-region strong consistency option in recent versions, which I would evaluate for availability and cost. Most importantly, I would model money as an append-only ledger of entries with idempotency keys: entries never overwrite each other, the balance is their sum, and reconciliation can always prove it.
Finally I would define a controlled failover for the home region, pausing debits briefly and reconciling, so we choose correctness over availability for money.
About this answer
- Last updated
- 12 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- Apache Cassandra documentation, Amazon DynamoDB developer guide
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "A global product must run in three regions with DynamoDB global tables or Cassandra...": https://scrivio-interview-library.netlify.app/databases/cassandra-and-dynamodb/2b46da6601/