Skip to content
tezvyn:

⚙️Backend Dev

Backend engineering, APIs, and databases

533 bites

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

Interview questions in Backend Dev, page 11

intermediate1 min read

Embed or reference likes in a document database?

Embedding is fast for small bounded lists but unbounded likes hit document size limits; referencing scales for high-cardinality, write-heavy likes.

advanced2 min read

How do you dynamically discover and register FastAPI routers from a directory?

Scan app/routers/ with importlib, validate APIRouter objects, include_router with prefixes, and isolate failures.

advanced2 min read

Describe Rust's orphan rule and its ecosystem purpose

State that either trait or type must be local; explain this stops conflicting foreign impls; note crates.io would see silent impl collisions breaking downstream builds.

easy1 min read

Status codes for successful POST and GET

201 Created for a successful POST (ideally with a Location header), 200 OK for a successful GET returning data.

intermediate1 min read

What are eventual consistency and the BASE model?

Eventual consistency means replicas converge given no new writes; BASE is Basically Available, Soft state, Eventually consistent.

advanced1 min read

Associated types vs generic type parameters in traits

Associated types fix one type per implementer; generics allow many impls; Iterator::Item is the canonical example.

advanced2 min read

How do you manage service lifecycle with FastAPI Depends versus formal DI?

Tests scaling FastAPI DI beyond routes. Answer: use Depends(yield) for request-scoped DB sessions; use a formal container for deep singleton service graphs and lifespan wiring; hybrid is best. Red flag: using Depends for everything and ignoring testability.

intermediate1 min read

Modularize routes with express.Router

Create a Router per resource in its own file, define routes on it, export it, and mount with app.use('/products', router).

intermediate1 min read

Why fit Cassandra to a high-read, high-write workload?

Consistent-hash partitioning spreads load, replication and no single master give availability, log-structured writes are fast, tunable consistency balances per query.

advanced2 min read

Override a FastAPI dependency at the APIRouter level

Tests FastAPI DI scoping limits. Answer: APIRouter has no dependency_overrides; create a sub-app, apply overrides, mount it. Red flag: Claiming router-level overrides exist or mutating global app state.

easy2 min read

What is the fundamental difference between a goroutine and an OS thread?

This tests your grasp of Go's M:N scheduler. A strong answer notes that goroutines are runtime-managed, multiplexed onto OS threads, and use far less memory per unit, enabling thousands of concurrent tasks.

intermediate1 min read

Idempotency: PUT vs POST in REST

Idempotent means repeated identical requests leave the same server state; PUT is idempotent, POST is not. Use PUT to overwrite a resource at a known URL.

advanced1 min read

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.

What is the difference between async def and regular functions?
easy2 min read

What is the difference between async def and regular functions?

This tests async def call semantics. A strong answer contrasts regular functions, which execute immediately, with async def, which returns a coroutine object that does nothing until awaited or wrapped in create_task.

easy2 min read

How do Send and Sync prevent data races? Give a Send-but-not-Sync example.

Explain Send moves values and Sync allows shared references across threads; give Cell as Send but not Sync because it has interior mutability.

intermediate1 min read

404 vs 500: missing resource vs server failure

A missing resource returns 404 Not Found (client asked for something absent); a database failure returns 500 Internal Server Error (server-side fault).

advanced1 min read

What consistency do you sacrifice in an AP system?

You give up linearizability and often sequential consistency, accepting stale reads and conflicts, then mitigate with quorums, vector clocks or CRDTs, and…

Explain await's purpose, awaitable types, and event loop signaling
easy2 min read

Explain await's purpose, awaitable types, and event loop signaling

This tests whether you understand await as a yield point. A strong answer lists three awaitables (coroutines, Tasks, Futures), explains await yields control to the event loop until completion, and warns that a bare coroutine call does not run it.

easy2 min read

Buffered vs unbuffered Go channels and deadlock scenario

Tests channel synchronization semantics. Unbuffered channels block until sender and receiver rendezvous; buffered channels block only when full or empty. Deadlock: goroutine sends on unbuffered channel with no receiver.

advanced1 min read

Centralized error handling in an Express API

A final four-arg error middleware, an asyncHandler wrapper to funnel promise rejections via next, a custom error class with statusCode, returning uniform JSON.

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