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 13

intermediate2 min read

What is a Type 2 slowly changing dimension?

An SCD handles dimension attributes that change over time; Type 2 inserts a new row per change with a surrogate key and validity dates, marking one current.

How do you gracefully cancel and clean up an asyncio task?
advanced2 min read

How do you gracefully cancel and clean up an asyncio task?

This tests asyncio cooperative cancellation and cleanup. A strong answer covers catching CancelledError at await points, using try/finally or async context managers for cleanup, and re-raising.

easy2 min read

How do you initialize and manage Go dependencies?

Init with go mod init; use go get and go mod tidy; go.mod sets path and versions, go.sum stores checksums for verified builds.

advanced1 min read

Solving the N+1 query problem in Sequelize

Define N+1 as one parent query plus one per child, detect it via SQL logging, fix with eager loading using include.

advanced2 min read

Why separate storage and compute in a cloud warehouse?

Data lives in cheap shared object storage while independent compute clusters scale separately, enabling elastic, concurrent, isolated workloads and pay-per-use.

Why are contextvars better than threading.local in async Python?
advanced2 min read

Why are contextvars better than threading.local in async Python?

This tests whether you know async tasks share OS threads, making thread-local storage unsafe for request state. A great answer notes ContextVar is task-local and resets automatically, while threading.local bleeds across concurrent coroutines.

easy2 min read

What is the difference between Cargo.toml and Cargo.lock?

Cargo.toml declares broad requirements; Cargo.lock pins exact resolved versions.

advanced1 min read

Atomic order creation with Sequelize transactions

Wrap dependent writes in sequelize.transaction, pass the transaction to each query, let managed transactions auto-commit or roll back.

advanced2 min read

What is an OLAP cube and its operations?

A cube pre-aggregates measures across dimensions; operations are slice, dice, drill-down, roll-up, and pivot.

Describe SQLAlchemy setup in FastAPI from database config to endpoint
easy2 min read

Describe SQLAlchemy setup in FastAPI from database config to endpoint

Tests FastAPI dependency injection and SQLAlchemy session lifecycle. Good answers cover: engine with pooling, declarative models, a yield-based session dependency, and endpoint queries. Red flag: engine per request or global session shared everywhere.

intermediate2 min read

What Go tool detects data races and how do you invoke it?

This tests Go's built-in race detector. A strong answer names the -race flag, notes it instruments memory accesses to catch concurrent unsynchronized reads/writes, and shows go test -race. A red flag is confusing it with static analysis or external tools.

advanced1 min read

MongoDB aggregation pipeline for total sales

Explain the pipeline as ordered stages, use $group with $sum to total per productId, $match on the computed total, then $sort descending.

easy1 min read

What is database replication and why use it?

Replication keeps copies of data on multiple servers; primary benefits are high availability through failover and improved read scalability by spreading reads.

Explain SQLAlchemy ORM vs Pydantic models in FastAPI
easy2 min read

Explain SQLAlchemy ORM vs Pydantic models in FastAPI

This tests separation of database schema from API contracts. A strong answer distinguishes SQLAlchemy table rows from Pydantic validation and OpenAPI generation, and notes that create schemas exclude auto-generated IDs.

intermediate2 min read

How does cargo differentiate unit and integration tests by location?

This tests Rust test layout conventions. Unit tests live inside src files in cfg(test) modules; integration tests go in top-level tests/ files as separate crates. Red flag: saying integration tests need cfg(test) or can use private APIs.

easy1 min read

Authentication versus authorization in Express

Authentication proves who you are, authorization decides what you may do, authentication happens first.

easy2 min read

What is sharding and why shard over vertical scaling?

Sharding splits one dataset across servers by a shard key so each holds a subset; you shard because vertical scaling hits hardware ceilings, gets costly, and remains a single point of failure.

How do you use FastAPI dependency injection for database sessions?
intermediate2 min read

How do you use FastAPI dependency injection for database sessions?

Build a generator dependency that yields a session and closes it after; inject via Depends(get_db).

intermediate2 min read

Difference between go build and go install? Cross-compile for ARM64 Linux?

Tests Go toolchain artifact placement and native cross-compilation. A strong answer distinguishes go build (current directory) from go install ($GOBIN), then sets GOOS=linux GOARCH=arm64 for cross-compilation.

easy1 min read

JWT structure and how the signature works

Name header, payload, and signature, note the first two are base64url-encoded not encrypted, explain the signature is computed over header and payload with a secret to detect tampering.

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