Tuning a database connection pool
WHAT IT TESTS: connection-pool sizing intuition. OUTLINE: max size, min idle, connection and max-lifetime timeouts; size from cores and latency, not guesswork.
The N+1 query problem and how to fix it
WHAT IT TESTS: recognizing ORM lazy-loading waste. OUTLINE: one query for a list plus one per item for its relation, fix with eager loading or a batched join. RED FLAG: blaming the database, or fixing it by caching instead of reducing round trips.
Synchronous vs asynchronous replication trade-offs
WHAT IT TESTS: durability versus latency tradeoff. OUTLINE: sync waits for replica ack giving zero data loss but higher latency; async acks immediately, faster but risks losing recent writes on failover.
Choosing a good shard key and avoiding hot spots
WHAT IT TESTS: shard-key design tradeoffs. OUTLINE: high cardinality, even write distribution, query alignment; monotonic keys send all writes to one shard. RED FLAG: optimizing only for cardinality while ignoring write skew, or claiming any unique key works.
When a graph database beats relational or document stores
WHAT IT TESTS: fit between graph data and traversal queries. OUTLINE: deeply connected data, variable-depth traversals, fraud or recommendation paths, index-free adjacency.
SQL isolation levels and the anomalies they prevent
WHAT IT TESTS: the isolation-anomaly mapping. OUTLINE: Read Uncommitted allows dirty reads; Read Committed blocks them; Repeatable Read blocks non-repeatable reads; Serializable blocks phantoms.
Zero-downtime schema migration on a hot table
WHAT IT TESTS: safe online schema evolution. OUTLINE: expand-migrate-contract phases, dual-write and backfill, decouple deploys from migrations. RED FLAG: a single blocking ALTER plus drop-old-column in one release, breaking running code.
Tuning HNSW for recall vs latency
WHAT IT TESTS: tuning ANN index parameters. OUTLINE: ANN trades exactness for speed, and HNSW knobs M and efConstruction shape graph quality while efSearch trades query latency for recall at runtime.
TSM-Tree vs LSM-Tree storage engines
WHAT IT TESTS: storage-engine internals for time-series. OUTLINE: both buffer writes in memory and flush sorted immutable files, but TSM organizes by series and time with columnar, heavily compressed blocks tuned for ordered appends and range scans.
The analysis phase: tokenizers and token filters
WHAT IT TESTS: understanding text analysis in search indexing. OUTLINE: analysis turns raw text into index terms via a tokenizer that splits text into tokens then token filters that transform them, like lowercasing or stemming.
Vector embeddings and vector databases
WHAT IT TESTS: grasp of embeddings and ANN search. OUTLINE: an embedding is a learned dense vector capturing semantic meaning, and vector DBs use ANN indexes like HNSW for fast similarity search that relational B-trees cannot provide.
Cache-aside pattern pros and cons
WHAT IT TESTS: knowing lazy-loading caching and its consistency cost. OUTLINE: app reads cache, on miss loads DB and populates, invalidates on write; pros are resilience and lean cache, cons are stale windows and app-managed invalidation.
Inverted index in search engines
WHAT IT TESTS: understanding the core search data structure. OUTLINE: an inverted index maps each term to the list of documents containing it, making keyword lookup O(1)-ish instead of scanning every document.
Iceberg vs Delta Lake metadata and ACID
WHAT IT TESTS: deep table-format internals. OUTLINE: Iceberg uses a tree of metadata and manifest files with atomic pointer swaps and optimistic concurrency; Delta uses an ordered transaction log of JSON commits with optimistic concurrency.
The small files problem in data lakes
WHAT IT TESTS: diagnosing storage-layout performance issues. OUTLINE: many tiny files create per-file overhead and metadata pressure, hurting scans; fix via compaction, batching writes, and tuning partitioning.
Exactly-once semantics in stream processing
WHAT IT TESTS: understanding delivery guarantees and effects. OUTLINE: exactly-once means each event affects state once despite retries, it is hard because of failures between processing and committing, and you achieve it via idempotency or atomic…
Clickstream architecture for real-time and batch
WHAT IT TESTS: designing a dual-path streaming pipeline. OUTLINE: ingest events into a log like Kafka, fan out to a real-time path for dashboards and a batch path to a lake for ad-hoc analysis. RED FLAG: a single path that can't serve both latency profiles.
Schema-on-read in data lakes
WHAT IT TESTS: understanding deferred schema application. OUTLINE: structure is applied at query time not ingest, enabling flexible raw storage and ML, but costing query-time validation and risking data swamps.
Data warehouse vs data lake
WHAT IT TESTS: distinguishing two storage paradigms. OUTLINE: warehouses store structured, schema-on-write data for BI; lakes store raw multi-format data with schema-on-read for exploration and ML.
Multi-region active-passive DR with Aurora
WHAT IT TESTS: designing cross-region DR with clear RPO/RTO. OUTLINE: async global replication to a passive region, promote and repoint traffic on failover, and fence the old primary to prevent split-brain.