Distributed Systems & System Design
Find your next engineering question
Start with a subject, or narrow the library to the level and problem you want to practise.
26 questions
Clear filtersDatabase Internals & Transactions · Senior
The writes are fast. Why does one lookup scan a terabyte?Locating the newest value in an append-only store through an in-memory key directory, preserving tombstones, reclaiming segments, and rebuilding the index on restart.
Database Internals & Transactions · Staff
COMMIT succeeded. What exactly survived the crash?Defining a local durable-commit boundary and the role of WAL ordering, fsync, checkpoints, torn pages, and recovery under process versus system failure.
Database Internals & Transactions · Senior
One insert filled a B-tree page. What has to move?How B-tree leaf and parent page splits preserve ordered lookup under concurrent writers, including latches, fillfactor, key distribution, and secondary-row fetches.
Database Internals & Transactions · Senior
We stopped updating disk pages on every write. Where did the data go?Tracing LSM updates through WAL, memtables, immutable SSTs, overlapping L0 files, point reads, versioned deletes, and snapshots.
Database Internals & Transactions · Staff
Writes were fast for an hour. Why did the engine suddenly stop?Identifying an unsustainable background work rate and the distinct RocksDB stall triggers, then validating steady state without defeating durability or read health.
Database Internals & Transactions · Senior
We added an index. Why is the full table scan still faster?Read-path economics with correct selectivity: random heap fetches versus sequential scan; why index presence does not establish a faster access route.
Database Internals & Transactions · Senior
The index has all three columns. Why is there still a Sort?Composite B-tree key ordering and ORDER BY satisfaction across multiple equality groups; indexes do not promise one global ordering across grouped ranges.
Database Internals & Transactions · Staff
The SQL is identical. Did PostgreSQL really use the same plan?Planner statistics and prepared-statement generic-vs-custom plan choice under extreme tenant skew, distinguished from correct high-volume work.
Database Internals & Transactions · Staff
A hash join spilled gigabytes. Should we just add memory?Memory and I/O behavior of a hash join crossing its working-set threshold, including batch spill, concurrent memory multiplication, and remediation.
Database Internals & Transactions · Staff
Index Only Scan still hits the heap. What is it checking?Why index-only scans still consult heap MVCC visibility via the visibility map, and how volatile rows, vacuum, and HOT index-maintenance constraints change the tradeoff.
Database Internals & Transactions · Senior
Both updates succeeded. Why is the counter missing one?Lost update from stale application-calculated assignments under Read Committed, distinguished from atomic SQL arithmetic, compare-and-swap, and short row locking.
Database Internals & Transactions · Staff
The reader never blocked the writer. Where did the old row go?Multi-version visibility and snapshot lifetime, distinguishing Read Committed statement snapshots from Repeatable Read transaction snapshots and the vacuum retention cost.
Database Internals & Transactions · Staff
Both doctors followed the rule. Why was nobody left on call?Write skew under snapshot isolation, demonstrating a cross-row predicate invariant violated without a write/write conflict and evaluated through guard-row locking or serializable retry.
Database Internals & Transactions · Staff
Each transfer holds one row. Why is nothing moving?Real row-lock deadlocks versus ordinary contention, deterministic acquisition ordering, database victim selection and bounded whole-transaction recovery.
Database Internals & Transactions · Staff
Serializable fixed the bug. Why did checkout get slower?Serializable Snapshot Isolation conflicts, SQLSTATE 40001, bounded full retries, read-footprint granularity and goodput versus wasted retries under contention.
Database Internals & Transactions · Senior
The profile lookup takes 3 ms. Why does a new filter scan every customer?Decide when keyed lookup is sufficient, when a scan is unacceptable and what freshness contract a separate read model needs.
Database Internals & Transactions · Staff
The phone lookup found a user. Why did it return the wrong account?Distinguish secondary lookup from uniqueness, then protect reassignment of an alternate key across separate records.
Database Internals & Transactions · Senior
The post loads in one read. Why is adding one comment becoming expensive?Choose embedding versus referencing from boundedness, lifecycle, query shape and single-document atomicity.
Database Internals & Transactions · Senior
The inbox query is simple. Why does Cassandra need another table?Derive Cassandra partitions, clustering order, bucketing and denormalized tables from concrete user queries.
Database Internals & Transactions · Staff
Both writes were in one batch. Why did a reader see only one?Distinguish Cassandra logged-batch atomic application from isolation, and assign authority and repair for duplicated query tables.
Database Internals & Transactions · Senior
The title contains the word. Why is the database reading every row?Distinguish leading-wildcard scans, token retrieval and arbitrary substring matching, then select suitable indexes and semantics.
Database Internals & Transactions · Staff
Search takes 40 milliseconds. Why are the first ten results wrong?Separate lexical BM25 score, candidate recall, graded ranking quality and user success using judged queries and safe experiments.
Database Internals & Transactions · Staff
Elasticsearch acknowledged the document. Why can't search find it?Differentiate index durability, search refresh, Lucene commit, and immutable-segment merging without false ordering assumptions.
Database Internals & Transactions · Staff
Each shard returned its best ten. Why is the global top ten wrong?Prove when local top-K is globally sufficient, identify shard-local scoring divergence, and design consistent pagination and fanout.
Database Internals & Transactions · Staff
The filter says 1,200 jackets. Why can search find only 1,130?Define exact facet query populations, distinguish post filters, and reason about approximate shard-local terms buckets.
Database Internals & Transactions · Principal
The new index has two billion documents. Can we switch search to it now?Migrate search mappings through consistent snapshots, change history, version-safe writes, cutover and reversible rollback.