Interview questions in Backend Dev, page 5
Async iterators and for await...of for streaming
Async iterators yield values lazily over time; for await...of consumes them sequentially with backpressure, keeping memory bounded.
How MVCC enables non-blocking reads
Writers create new row versions instead of overwriting, readers see a consistent snapshot, so readers never block writers.

Enforce positive price and SKU format using Pydantic Field without custom validators
Use Field(gt=0) for price and Field(pattern=r'^ITEM-\d{5}$') for SKU; mention Annotated.
How does struct field ordering affect memory layout in Go and Rust?
It tests alignment, padding, and compiler layout knowledge. A strong answer explains that alignment inserts padding, Go and Rust keep declared order, and reordering by size can shrink size. Red flag: saying order is irrelevant or that compiler auto-packs.
fs.readFileSync vs fs.readFile
Sync blocks the event loop and returns directly, async takes a callback or promise, only sync is safe at startup.
Two-Phase Locking and serializability
A growing phase only acquires locks, a shrinking phase only releases, no lock taken after one is freed.

Implement a custom validator for a single Pydantic model field
Use @field_validator as a classmethod, raise ValueError on failure, return the value.
Compare enum vs trait objects for heterogeneous shapes in Rust
This tests compile-time vs run-time polymorphism in Rust. A strong answer contrasts enum's closed set, static dispatch, and stack layout against trait objects' open extensibility, heap allocation, and vtable indirection.
Why use path.join over string concatenation
Path.join uses the correct OS separator, collapses duplicate slashes, normalizes . and .. segments.
Write skew under snapshot isolation
Two transactions read an overlapping set, each writes disjoint rows, jointly violating an invariant.

How do you prevent password_hash from appearing in a FastAPI response?
Tests FastAPI response filtering and the security practice of separating DB schemas from API contracts. A strong answer proposes a dedicated output model omitting the field, then cites response_model_exclude. Red flag: manual dict deletion or monkey-patching.
How do Go and Rust control visibility of functions and types?
Tests encapsulation conventions in systems languages. Go uses capitalization: uppercase exports across packages; Rust uses explicit pub keywords with module-level privacy. Red flag: claiming either uses Java-style access modifiers or runtime visibility.
Minimal HTTP server with the http module
CreateServer with a request listener, set status and Content-Type, end the response, call listen on 3000.
How the write-ahead log ensures atomicity and durability
Log changes before applying, flush log at commit, replay redo and undo on recovery.

Model an Order with a nested Product list in Pydantic
It tests Pydantic nested model composition. Define Product as BaseModel, then Order with products: list[Product]; Pydantic recursively coerces each dict and raises ValidationError on failure. A red flag is insisting on manual iteration.
Go package declaration, directory name, and import path relationship
Tests Go's separation of directory layout and package identity. A good answer states: import path is module path plus subdirectory; package clause is the in-code name; mismatch is legal and common for main or tests.
Counting lines in a 5GB log file efficiently
ReadFile loads all 5GB into RAM and may exceed buffer limits, instead stream with createReadStream plus readline and count line by line.
What a database index is and when it helps
An index is a sorted lookup structure avoiding full scans, helps selective WHERE/JOIN columns, but costs write overhead.

Ensure end_date is after start_date in Pydantic
Tests whether you know field validators see only one value and cannot compare siblings. Use a model validator instead, which receives the full instance and can compare start_date and end_date. Red flag: a field validator referencing the other field.

Why does Go forbid circular dependencies, and how do you resolve them?
Cycles break incremental compilation; resolve by moving logic down, merging coupled packages, or using dependency injection.
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