ACID Transactions: Follow-Up Questions Interviewers Ask (And How to Answer)
When a candidate brings up ACID transactions, interviewers instantly shift from "what" to "how". They want to see whether you understand the cost of strong consistency, how it interacts with latency, and what you would do when the guarantees become a bottleneck. The follow-up questions also reveal whether you can articulate trade-offs and propose realistic mitigations.
A good answer shows you can quantify the impact, reference a concrete system, and suggest a pragmatic path forward. Below are the nine probes interviewers typically ask, ordered from the most straightforward to the hardest, each paired with a concise, example-rich response.
1. What does each letter in ACID stand for?
Answer
"ACID stands for Atomicity, Consistency, Isolation, and Durability. Atomicity means a transaction either fully commits or fully rolls back – no partial state. Consistency guarantees that all defined invariants hold before and after the transaction. Isolation ensures concurrent transactions don’t interfere; the classic level is serializable, though many systems settle for snapshot isolation. Durability means once a transaction is committed, it survives crashes, typically via write-ahead logging to persistent storage."
2. Which isolation level does your system use by default?
Answer
"In the design I’m describing, we use snapshot isolation by default because it gives a good balance between performance and correctness. For example, PostgreSQL (and Aurora PostgreSQL) uses multiversion concurrency control: at REPEATABLE READ each transaction reads a consistent snapshot, and readers never block writers. This reduces contention compared to serializable isolation, which adds predicate locking or validation and aborts some transactions under contention, so clients must be ready to retry them."
3. How does the system guarantee durability?
Answer
"Durability is achieved with a write-ahead log (WAL) that is flushed to durable storage before the transaction is considered committed. In practice we replicate the log to three nodes in three availability zones and wait for a majority to acknowledge; this means a single zone outage won’t lose committed data. Because the leader's own disk sync runs in parallel with the replicas' writes, a commit waits for roughly one cross-zone round trip plus a replica's disk sync, not the sum of every step; with single-digit-millisecond links between zones, that is a few milliseconds."
4. What is the performance impact of ACID on latency?
Answer
"Strong ACID guarantees add write latency because each commit must be durably recorded and often replicated. With synchronous replication, each commit costs at least one replica round trip plus a disk sync, a few milliseconds inside a region. The exact number depends on network distance: across regions the round trip alone is tens of milliseconds, and often more than 100 ms between continents. This is why many services replicate synchronously within a region and asynchronously across regions."
5. How do you handle long-running transactions?
Answer
"Long-running transactions are split into smaller units of work using the saga pattern. Each saga step is its own ACID transaction, and a compensating action undoes the step if later steps fail. For instance, in an e-commerce checkout we might first reserve inventory, then charge payment, then create the order. If payment fails, the inventory reservation is rolled back via a compensating “release inventory” operation. This keeps lock hold times short and avoids blocking other users."
6. What happens if a node fails during a transaction?
Answer
"If a follower crashes, the leader still reaches a majority with the remaining replicas and the commit goes through. If the leader crashes after writing its local WAL but before a majority acknowledges, the transaction is never acknowledged: a new leader is elected, and the client sees a timeout or retryable error. The outcome can be ambiguous, since a surviving replica may already hold the record, so the client retries with an idempotency key or checks whether the write landed. This is similar to how Google Spanner’s Paxos-based commit protocol works – it only marks a transaction committed once a majority of replicas have persisted the commit record."
7. Can you scale ACID transactions horizontally?
Answer
"Horizontal scaling is possible by sharding data and limiting each transaction to a single shard. For example, a user-profile service might shard by user ID, ensuring that all updates for a given user land on the same shard, thus preserving ACID within that shard. Cross-shard transactions require a two-phase commit (2PC); in practice we keep them rare because 2PC adds two rounds of messages (prepare, then commit) with a durable log write in each, holds locks across both, and blocks participants if the coordinator fails between them."
8. How would you trade off consistency for availability in a geo-distributed system?
Answer
"We would adopt a tunable consistency model like Spanner’s true-time timestamps, allowing reads to be served from the nearest replica with a bounded staleness window, say 100 ms. Writes still go through a quorum to guarantee durability, but reads can be served locally, improving read latency from a cross-region round trip (tens of milliseconds or more) to a local read of a few milliseconds. The trade-off is that a client might read slightly stale data, but the staleness is bounded and acceptable for many use-cases such as social feeds."
9. What distinguishes a senior-level answer from a staff-level answer on this topic?
Answer
"A senior-level answer explains the mechanics, cites concrete numbers, and suggests practical mitigations like sharding or saga decomposition. A staff-level answer goes further: it evaluates the impact on system architecture, proposes alternative consistency models, and sketches a migration path from strict ACID to a hybrid approach. It also anticipates operational concerns—monitoring commit latency, handling split-brain scenarios, and evolving the data model to reduce cross-shard transactions."
How to practice this
- The worked design of a relational database, Design a Relational Database like PostgreSQL, is part of Pro ($10/month); click each component to read its notes.
- On paper or a whiteboard, draw a simple service that uses transactions, then annotate the points where latency, replication, and sharding decisions occur.
- Role-play the interview: have a friend ask the nine questions above and answer them aloud, using concrete numbers from your design.
Questions people ask
Why do interviewers focus on isolation levels?
Isolation determines how concurrent writes interact. Different levels (read-committed, snapshot, serializable) have distinct performance and correctness implications, so interviewers gauge your awareness of those trade-offs.
Is it ever okay to drop durability?
Only for cache-only data or when the business can tolerate loss, such as analytics pipelines that replay from source logs. Dropping durability for primary data is rarely acceptable.
How many replicas are typical for durability?
A common setup replicates to three nodes in three availability zones; this provides a quorum of two for commits while tolerating the loss of a single node or zone.
Can ACID be achieved without a central coordinator?
Distributed ACID often relies on consensus protocols (Paxos, Raft) that act as coordinators. Fully decentralized ACID is impractical because the commit order must be agreed upon globally.