Interview questions in Backend Dev, page 8
res.send vs res.json vs res.end
Send is flexible and sets content type by type, json serializes and sets JSON content type, end is the raw http terminator with no body helpers.
Database checkpoints with WAL
A checkpoint flushes dirty pages and records a known-good point so recovery can start later in the log; frequent checkpoints shorten recovery but add I/O spikes, infrequent ones lengthen…
What is the purpose of yield in a dependency function?
Tests teardown logic in FastAPI dependencies. Yield splits setup from cleanup: code before yield runs pre-request, after yield runs post-response to close resources like DB sessions. Red flag: confusing it with return or thinking yield is only for generators.
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.
Express route order and matching
Express checks routes in definition order, /items/new matches the literal route first, if /:id came first new would be captured as an id.
Heap file versus clustered index
A heap stores rows unordered with cheap inserts but no inherent ordering; a clustered or index-organized table stores rows in primary-key order, giving fast key range reads but costlier inserts and page…
How do you apply a dependency to an APIRouter without per-endpoint signatures?
Pass Depends() to APIRouter dependencies parameter; runs before every route in that router and shows in docs.
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…
Modularizing routes with express.Router
Create a Router instance in users.js, attach routes to it, export it, then mount it under a base path with app.use in the main file.
Lifecycle of a single row update
Buffer manager faults the page in, the row is modified in memory marking the page dirty, a WAL record is written, and commit fsyncs the log while the dirty page is flushed later by a checkpoint.
How would you override a FastAPI dependency during testing?
Tests your grasp of FastAPI's dependency override mechanism. A strong answer mentions app.dependency_overrides, notes that sub-dependencies are bypassed, and stresses clearing overrides after each test.
How do you idiomatically return a recoverable error and result in Go?
This tests Go's multiple-return error idiom. A strong answer gives a (T, error) signature with error last, returns nil on success, and checks err before using the result. A red flag is suggesting panic for recoverable errors or pointer out-parameters.
Custom API key auth middleware
Read the header from req, on missing or invalid send res.status(401) and return, on valid call next, mount before protected routes.
B+ Tree range queries across pages
Internal nodes are pages of keys guiding the search, all data sits in linked leaf pages; a range query descends to the start key then follows the leaf chain sequentially until the upper bound.

How do you use a Python class as a FastAPI dependency?
It tests whether you understand FastAPI DI beyond functions and when stateful encapsulation wins. Explain that Depends takes callable classes, centralizing setup and shared state in __init__. Red flag: claiming classes are pure syntactic sugar.
What are Rust Result's variants and how does the compiler enforce handling?
This tests Rust's explicit error model. A strong answer names Ok(T) and Err(E), explains must_use warns when Results are ignored, and notes pattern matching or ? is required to extract values.
Centralized error-handling middleware
Error middleware takes four args err, req, res, next, is defined last, and runs when next(err) is called or sync errors throw.
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…
How does FastAPI execute setup and teardown in nested yield dependencies?
It tests FastAPI's dependency injection lifecycle and stack-like teardown for nested yield dependencies. Setup runs top-down; teardown runs bottom-up after the response. A red flag is claiming teardown order is arbitrary or follows garbage collection.
Rust's operator equivalent to Go's if err != nil return err
Tests if you know Rust's ? operator for error propagation. A strong answer names ?, explains it returns Err from the function via Result's Try and FromResidual traits, and unwraps Ok. Red flag: calling it .unwrap() or suggesting manual match is idiomatic.
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