Skip to content
tezvyn:

⚙️Backend Dev

Backend engineering, APIs, and databases

136 bites

Test yourself: Top 30 advanced Backend Dev interview questionsMultiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.

Advanced interview questions in Backend Dev, page 2

advanced1 min read

Promise.all vs Promise.allSettled

All rejects on the first failure; allSettled always fulfills with a status/value or reason per input. Use allSettled when partial success is acceptable.

advanced2 min read

Explain Go struct embedding vs inheritance and method promotion

What it tests: knowing Go composition and method promotion from embeds. Outline: embedding adds a type as part without is-a; promoted methods join the outer type; collisions resolve by outer-type precedence.

advanced1 min read

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.

advanced2 min read

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.

advanced3 min read

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.

advanced1 min read

Write skew under snapshot isolation

Two transactions read an overlapping set, each writes disjoint rows, jointly violating an invariant.

advanced1 min read

How the write-ahead log ensures atomicity and durability

Log changes before applying, flush log at commit, replay redo and undo on recovery.

Ensure end_date is after start_date in Pydantic
advanced2 min read

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.

advanced1 min read

Scaling across cores with cluster and os

Os.cpus gives core count, the primary forks one worker per core, all workers share the listening port, the OS load-balances connections.

advanced1 min read

Rust workspace versus single crate for plugins

A workspace gives incremental compilation, enforced API boundaries via a shared api crate, and per-plugin deps; a single crate is simpler but recompiles wholesale and blurs boundaries.

advanced1 min read

Backpressure in Node.js streams

Backpressure pauses the readable when the writable buffer fills, pipe and pipeline manage it automatically, pipeline also propagates errors and cleans up.

advanced1 min read

http.Agent and connection pooling

The agent pools and keeps sockets alive, avoiding repeated TCP and TLS handshakes, controlled by keepAlive and maxSockets.

advanced2 min read

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.

advanced2 min read

Implement a custom exception handler to catch ItemNotFoundError and return 404

Tests FastAPI exception handler registration beyond HTTPException. A strong answer covers creating a custom exception, using app.exception_handler, and returning a JSONResponse with status 404 and a structured body. Red flag: per-route try/except, plain dict.

advanced2 min read

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.

advanced2 min read

How would you use BackgroundTasks to run work after returning a 201?

What it tests: FastAPI deferred execution and failure modes. A strong answer injects BackgroundTasks, adds the task, returns 201, and notes same-process post-response execution with no persistence. Red flag: Treating it as a distributed queue like Celery.

advanced2 min read

Access raw request bytes in FastAPI for webhook verification

Tests FastAPI's Starlette integration and stream semantics. Outline: inject Request and await request.body, but the stream is single-use so JSON parsing later fails and docs are lost. Red flag: suggesting a Pydantic model still works after consuming the body.

advanced2 min read

Explain Go escape analysis and Rust ownership for stack vs heap

Tests compiler-driven memory placement. Go escape analysis keeps non-escaping locals on stack, shrinking heap and GC work. Rust ownership lets the compiler pick stack or heap at build time with zero cost.

advanced2 min read

Explain Rust Rc and Arc versus Go's tracing GC

This tests deterministic reference counting versus tracing GC. A strong answer contrasts Rc's heap reference counts with Go's root tracing, and notes Rc cannot reclaim cycles while Go's GC can. Red flag: claiming Rc has no cycle leak risk.

advanced2 min read

Rust unsafe FFI vs Cgo: who owns memory safety?

Tests your grasp of where compiler guarantees end at the FFI boundary. A strong answer contrasts Rust raw-pointer validity and aliasing invariants in unsafe blocks against Cgo's automatic copying, pointer-passing restrictions, and runtime thread-switching…

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