Skip to content
tezvyn:

⚙️Backend Dev

Backend engineering, APIs, and databases

261 bites

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

Intermediate interview questions in Backend Dev, page 6

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.

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.

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.

intermediate2 min read

Apply the CAP theorem to a real system

Define C, A, P; note partitions are unavoidable, so the real choice during one is consistency versus availability; then classify a system as CP or AP with reasoning.

Why synchronous DB libraries block async FastAPI endpoints and correct SQLAlchemy usage
intermediate2 min read

Why synchronous DB libraries block async FastAPI endpoints and correct SQLAlchemy usage

This tests event loop blocking: sync DB calls in async def halt all requests. Answer: sync drivers block the loop despite releasing the GIL; use asyncpg with SQLAlchemy create_async_engine and AsyncSession. Red flag: recommending run_in_executor as default.

intermediate2 min read

Explain Cargo features and how to define and enable them

This tests conditional compilation and optional dependency design in Rust. A strong answer outlines the [features] table, cfg attribute gating, and consumer enablement via --features or default features.

intermediate1 min read

Session-based versus token-based authentication

Sessions store server-side state with a cookie id, tokens carry self-contained claims with no server store, weigh revocation versus scalability, especially across services.

intermediate2 min read

Range-based vs hash-based sharding trade-offs?

Range sharding keeps ordered keys together, great for range scans but prone to hot spots on sequential keys; hash sharding spreads keys evenly, avoiding hot spots but killing efficient range…

intermediate2 min read

Implement a PATCH endpoint for partial SQLAlchemy updates

Tests PATCH vs PUT and selective ORM updates. Strong answer: all-optional update schema, load existing record, iterate exclude_unset=True fields with setattr, commit. Red flag: updating without excluding unset, which overwrites missing fields with None.

intermediate1 min read

MongoDB async ODM vs SQLAlchemy sessions

Motor client as a connection pool with no SQLAlchemy-style session or transaction; Beanie document models over Motor; initialize once at startup and await find queries.

intermediate1 min read

Securing Express with Passport local strategy

Configure LocalStrategy with a verify callback, call passport.authenticate as route middleware, and set up serializeUser/deserializeUser for sessions.

intermediate1 min read

Leader-follower vs multi-leader replication

Single-writer leader-follower is simple but a write bottleneck; multi-leader accepts writes in many regions for latency and availability.

intermediate1 min read

What is eventual consistency?

Replicas converge to the same value if writes stop, allowing temporary staleness for higher availability and lower latency.

intermediate2 min read

Compare efficient line-by-line file reading in Go and Rust

Go uses bufio.Scanner with ScanLines/Scan(); Rust uses BufReader with lines() or read_line().

intermediate1 min read

Propagating async errors to Express error handlers

Express does not auto-catch rejected promises, so catch and call next(err), or wrap handlers in an asyncHandler that forwards rejections; Express 5 awaits handlers automatically.

Implement OAuth2 Password Flow in FastAPI
intermediate2 min read

Implement OAuth2 Password Flow in FastAPI

Tests FastAPI security integration and stateless auth patterns. A strong answer covers the POST /token endpoint returning a JWT, the OAuth2PasswordBearer dependency, and get_current_user decoding the JWT sub.

intermediate2 min read

Compare Go's error tuples to Rust's Result for I/O

Tests trade-offs between Go's explicit error returns and Rust's Result type. Contrast Go's inline err checks with Rust's ? operator, noting verbosity versus compile-time exhaustiveness. Never call Result an exception or claim Go ignores errors.

intermediate1 min read

Reusable schema validation middleware with Zod or Joi

Define a schema (email, password min 8, optional firstName), write a factory middleware that validates req.body, returns 400 with messages on failure, and assigns the parsed value on success.

intermediate1 min read

Connection pooling and its key parameters

Reuse open connections to skip costly handshakes; tune max pool size and connection timeout.

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