InterviewStack.io LogoInterviewStack.io

Transactions, Concurrency Control, and Isolation Levels Questions

How databases manage concurrent access: ACID transactions, isolation levels and the anomalies they permit (dirty/non-repeatable/phantom reads), locking, and optimistic versus pessimistic concurrency. Covers deadlock handling and choosing an isolation level for a workload. Essential for correctness in any multi-user database system.

MediumTechnical
44 practiced

Analysts complain that their analytics replica is often stale. Propose an SLO for replica freshness for analytics workloads, describe how you would measure freshness (including instrumentation and sampling), and recommend mitigation tactics such as nearline ingestion, replication tuning, or changing topology to reduce staleness while balancing cost.

HardTechnical
43 practiced

Analyze the performance and correctness trade-offs between executing read-only transactions under snapshot isolation versus serializable isolation for a high-throughput analytical workload. Discuss MVCC snapshot management, stale reads, need for predicate locking or conflict tracking for serializability, and runtime overheads and memory implications. Recommend which isolation to use and when it may be reasonable to relax guarantees.

MediumSystem Design
43 practiced

Design a multi-region user profile service to serve 100M users with globally distributed reads. Requirements: read latency under 50ms for 99th percentile, logged-in users must see read-your-writes within their home region, system must tolerate a region failure, and writes are ~1k RPS globally. Propose replication strategy, consistency model, partitioning, read routing, and conflict handling. Justify trade-offs and explain how you'd validate the design.

HardTechnical
43 practiced

Design telemetry and automated alerting to detect violations of consistency SLOs such as read staleness, monotonicity breaches, and failed read-your-writes semantics. Specify metrics to collect, sampling frequency, acceptable overhead, dashboards, alert thresholds, and automated mitigations (e.g., failover to primary, switch to stronger consistency mode). Address false positives and how to tune sensitivity.

EasyTechnical
31 practiced

Explain synchronous replication versus asynchronous replication, and master-slave versus multi-master topologies. For each option describe the implications for write latency, read scalability, failover behavior, and conflict resolution needs. Give a short recommendation for a content management system that is read-heavy and has infrequent writes.

Unlock Full Question Bank

Get access to all 40 Transactions, Concurrency Control, and Isolation Levels interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.