Advanced everything in Backend Dev, page 4
How do you keep consistency without multi-document transactions?
A Saga runs a sequence of local transactions, each with a compensating action to undo on failure, coordinated via choreography or orchestration.
How does a hash join handle memory overflow?
The build table is partitioned by hash and spilled to disk, then probe rows are partitioned the same way, and pairs are joined per partition.
Using page LSN to decide redo
Each page stores the LSN of its last applied change; during redo the engine reapplies a log record only if its LSN exceeds the page's LSN, meaning the change is not yet reflected on disk.
Row-oriented versus columnar storage
Row stores keep whole rows together, ideal for point reads and writes; columnar stores keep each column contiguous, enabling reading only needed columns and strong compression, ideal for scans and…
The three phases of ARIES recovery
Analysis rebuilds dirty-page and transaction tables from the last checkpoint, Redo replays all logged changes to restore state, Undo rolls back losers; Redo is idempotent via per-page LSN comparison so…
Indexing a low-cardinality status column
With three values each matches a third of rows, so the optimizer prefers a scan over costly random heap fetches; alternatives include partial indexes on rare values and composite indexes leading with status.
Optimizer picks nested loop over hash join
Nested loop wins on few rows, so bad row estimates from stale stats or skewed data trick it; fix by refreshing statistics, adding histograms, rewriting predicates, or ensuring memory for hashing.
How the write-ahead log ensures atomicity and durability
Log changes before applying, flush log at commit, replay redo and undo on recovery.
Write skew under snapshot isolation
Two transactions read an overlapping set, each writes disjoint rows, jointly violating an invariant.
Shard key impact on uniqueness and cross-shard lookups
Uniqueness and FKs hold only within a shard; non-shard-key lookups need scatter-gather or a secondary index.
Relational versus wide-column for a news feed
Relational gives flexible joins but read-time fan-out; Cassandra precomputes per-user feed rows for fast writes-side fan-out.
Polymorphic associations and referential integrity
A single column can't FK two tables, so integrity is unenforced; alternatives use exclusive arcs or per-type tables.
When to intentionally denormalize a schema
Identify read-heavy join cost, duplicate or precompute data, and own the consistency burden.
Diagnosing and fixing the N+1 query problem
Define the 1 parent plus N child queries, fix via JOIN or batched IN, and ORM eager loading.
Read Committed versus Serializable isolation levels
Name the four levels, map each anomaly (dirty read, non-repeatable read, phantom) to the level that blocks it.
Why Pin is needed for self-referential Futures
Async blocks compile to state machines that can hold references into their own storage; Pin guarantees the value will not move so those internal pointers stay valid across polls.
Architecting an L7 proxy in Go versus Rust
Go offers GC and cheap goroutines for fast delivery but tail-latency GC pauses; Rust offers ownership and async/await for predictable latency at higher complexity.
cgo directives: CFLAGS, LDFLAGS, and pkg-config
#cgo CFLAGS feeds the C compiler include paths/defines, LDFLAGS feeds the linker libraries/paths, pkg-config auto-discovers both; needed to compile against a system C library.
Building a safe Rust wrapper over an unsafe C API
Hide extern calls behind a safe module, own the resource in a struct with Drop calling the C free, return Result mapping C error codes, use NewType/NonNull and PhantomData.
Zero-copy string to []byte conversion via unsafe in Go
Use unsafe.StringData/Slice (or reflect headers) to alias the string's bytes without copying; assumes shared backing array; risk is mutating an immutable string.
We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.
See open roles