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 10

intermediate1 min read

Middleware execution order and sharing data via req

Middleware runs top-down in registration order; each calls next(); attach data like req.user that later handlers read.

intermediate2 min read

Hash join versus sort-merge join

Hash join builds and probes a hash table, great for unsorted equality joins with enough memory; sort-merge sorts both inputs then merges, winning when inputs are already sorted or output must…

Describe a common FastAPI project structure and key directories
easy2 min read

Describe a common FastAPI project structure and key directories

Main module holds the FastAPI app; domain files (users, items) expose APIRouters; dependencies in their own module; pyproject.toml as entrypoint.

easy2 min read

How does a Go type satisfy an interface? Provide an io.Reader example.

This tests implicit structural typing in Go. A type satisfies an interface by implementing every required method with exact signatures; no declaration links them. A red flag is claiming you need an implements keyword or explicit conformance.

intermediate2 min read

Sorting data larger than memory

External merge sort reads memory-sized chunks, sorts each in RAM and writes them as sorted runs to disk, then merges many runs together in passes until one sorted output remains.

How do you include a router in your main FastAPI app?
easy2 min read

How do you include a router in your main FastAPI app?

Create APIRouter in another file, import it into main.py, then call app.include_router(router).

easy2 min read

What is the difference between defining a Rust trait and implementing it?

Define with trait and signatures; implement with impl Trait for Type and concrete bodies.

advanced1 min read

Write a JWT authentication middleware

Read the header, strip Bearer, jwt.verify with the secret, set req.user and next(), else send 401.

advanced2 min read

How does a hash join handle memory overflow?

The build table is partitioned by hash and spilled to disk, then probe rows are partitioned the same way, and pairs are joined per partition.

intermediate2 min read

How to apply a dependency to only one FastAPI router?

Pass dependencies=[Depends(auth)] to APIRouter for /users, omit it for /items, include both.

intermediate2 min read

Explain Go's empty interface, safe usage, and runtime risks

Interface{} (alias any) holds values; unpack with type switches or ok assertions; risks are panics from bare assertions and nil interface vs nil concrete value confusion.

advanced1 min read

Conditionally apply middleware by request property

Use express.text({ type: 'application/xml' }) or a guard wrapper that checks req.is() then calls the parser or next().

easy1 min read

How do you choose between relational and NoSQL databases?

Relational gives schema, joins, and ACID for structured related data; document gives flexible schema and horizontal scale for varied or denormalized data.

intermediate2 min read

Manage dev, staging, and prod configs in a large FastAPI app

This tests separating environment config from code with pydantic-settings and env vars. A strong answer covers .env files for local dev, per-environment validation, and secret injection for prod. Red flags are hardcoded values or scattered conditionals.

intermediate2 min read

Static dispatch with impl Trait versus dynamic dispatch with Box<dyn Trait>

Tests monomorphization versus vtables. Note: static dispatch monomorphizes for zero-cost abstraction but bloats code; dynamic dispatch uses vtables for smaller binaries but adds indirection.

easy1 min read

Design an Express route to create a user

POST to a collection URL like /users, read the payload from req.body via express.json(), return 201 with the created resource.

easy1 min read

What is the CAP theorem?

Consistency, Availability, Partition tolerance; during a network partition you must choose between staying consistent or staying available.

intermediate1 min read

Value versus pointer receivers and interface satisfaction

Value-receiver methods belong to both T and *T, but pointer-receiver methods belong only to *T, so a value of T may not satisfy an interface.

How do you apply a common path prefix across FastAPI routers?
intermediate2 min read

How do you apply a common path prefix across FastAPI routers?

Tests whether you know APIRouter decouples routes from path prefixes. Use relative paths in APIRouter, then mount with app.include_router(router, prefix="/api/v1"). This keeps modules reusable. Red flag: hardcoding the full absolute path in every decorator.

easy1 min read

req.params vs req.query vs req.body in Express

Req.params holds named route segments, req.query holds the URL query string, req.body holds the parsed payload.

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