Intermediate interview questions in Backend Dev
Order of the Node.js event loop phases
Timers, pending callbacks, poll, check, close phases in order; I/O completion runs in poll.
nextTick vs setImmediate vs setTimeout(fn, 0)
NextTick is a microtask that drains before the loop continues; setImmediate runs in check; setTimeout(0) in timers.

How does FastAPI leverage Pydantic for request validation and serialization?
This tests your understanding of FastAPI's declarative validation. Explain that type hints trigger auto-parsing, Pydantic enforces schemas and errors, and return types auto-serialize responses. Red flag: manually parsing request.body() or json.loads in routes.
Compare Go interfaces with Rust traits
This tests structural versus nominal polymorphism and API design. A strong answer contrasts Go's implicit satisfaction with Rust's explicit impl and dyn Trait. Red flag: calling one universally better without discussing coupling or backwards compatibility.
Offloading CPU-bound work with Worker Threads
Synchronous CPU work freezes the loop and all requests; offload to a Worker, communicate via messages or SharedArrayBuffer, use a pool.
Write an async decorator that logs execution time for FastAPI
Use functools.wraps, wrap perf_counter around awaited call, log ms, and place decorator above path operation.
Describe 1NF, 2NF, 3NF, normalization's purpose, and its performance trade-off.
1NF atomic values; 2NF no partial dependencies; 3NF no transitive dependencies; prevents update anomalies but adds join overhead.

How do you structure concurrent API calls with asyncio.gather in FastAPI?
Tests FastAPI async concurrency. Strong answer: async def endpoint with two async HTTP requests in asyncio.gather, cutting total latency from sum to max of the two. Red flag: using sync clients or threads instead of async I/O.
Explain database indexes, the classic data structure, and write-heavy trade-offs
Tests the read-write trade-off of indexing. A strong answer names B-Trees, explains they avoid full scans, and notes that inserts, updates, and deletes must update the index, adding write amplification and storage cost. Red flag: claiming indexes are free.
Find users who never placed an order and explain JOIN choice
This tests SQL anti-joins and NULL semantics. A strong answer uses LEFT JOIN with IS NULL or NOT EXISTS, explains why NOT IN is risky with NULLs, and why NOT EXISTS is preferred. Red flag: using INNER JOIN or ignoring NULLs.
Why package-lock.json must be committed
Lockfile pins exact versions of the whole dependency tree including transitive deps; guarantees identical installs across machines and CI.
Compare Go's switch with Rust's match on exhaustiveness, fallthrough, and expressions.
Tests grasp of expression vs statement semantics and type safety. Go switch auto-breaks and lacks exhaustiveness; Rust match requires exhaustive patterns, forbids fallthrough, and yields values. Never say Go switch returns a value or Rust match falls through.
What is the difference between WHERE and HAVING in SQL?
Tests SQL execution order and aggregation. A strong answer states WHERE filters rows before grouping, HAVING filters groups after aggregation, and gives an aggregate example that WHERE cannot evaluate.
Choosing between CommonJS and ES Modules
ESM is the standard with static import/export and top-level await; set type to module; CJS uses require and module.exports and is synchronous.
Compare Go string and Rust &str/String types, mutability, UTF-8, ownership
This tests your model of immutable UTF-8 strings versus owned buffers. A strong answer contrasts Go's read-only header with Rust's &str borrow and heap-owned String, noting Go immutability is structural while Rust gates mutation via ownership.
Layered structure for a scalable Express API
Routes map URLs, controllers handle HTTP, services hold business logic, data layer talks to the DB; keep each layer ignorant of HTTP except controllers.

Parse a string to integer in Go and Rust with errors
This tests whether you map each language's error philosophy to syntax. Outline: Go returns (int, error) and callers check err != nil; Rust returns Result<i32, E> and callers match Ok/Err. Red flag: suggesting exceptions or ignoring Rust's must-use Result.
SemVer and the caret vs tilde range operators
MAJOR.MINOR.PATCH signals breaking/feature/fix; caret allows minor and patch updates, tilde allows only patch; use tilde for tighter control.
Describe Go slice internals and compare to Rust slice and Vec
Go slices are three-word headers over an array; Rust &[T] is a two-word borrow without capacity; Vec<T> is an owned buffer that reallocates.
How FastAPI uses type hints for validation
Hints drive parsing, validation, and conversion; a path declared int is coerced or returns 422; OpenAPI is auto-generated.
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