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 4

intermediate1 min read

Running independent requests with Promise.all and race

Start all requests then await Promise.all to get all results or fail fast on first rejection; use Promise.race when only the fastest settled result matters.

advanced1 min read

Relational versus wide-column for a news feed

Relational gives flexible joins but read-time fan-out; Cassandra precomputes per-user feed rows for fast writes-side fan-out.

How do you type-hint repeated query params in FastAPI?
advanced2 min read

How do you type-hint repeated query params in FastAPI?

Tests FastAPI's Annotated pattern for multi-value query strings. A great answer uses Annotated[list[str], Query()] = [] to collect repeated keys, and notes the old Query-as-default alternative. Red flag: manual parsing or typing it as str.

easy2 min read

Define a User struct and map of IDs to pointers

Tests Go struct and map pointer basics. Outline: define User with ID and Name, initialize map[int]*User with make, insert &User literals, and note shared mutation. Red flag: writing to a nil map or storing values instead of pointers.

intermediate1 min read

Handling async errors in Express middleware

Await inside try/catch and call next(err) on failure, or wrap the handler in an async error adapter; never let a rejected Promise go uncaught.

advanced1 min read

Shard key impact on uniqueness and cross-shard lookups

Uniqueness and FKs hold only within a shard; non-shard-key lookups need scatter-gather or a secondary index.

What is the :path converter in FastAPI?
advanced2 min read

What is the :path converter in FastAPI?

Tests FastAPI routing semantics and URL segmentation. A strong answer states :path captures slashes across segments while plain str stops at the next slash, and cites file-serving as the use case.

intermediate1 min read

How do you safely share a Go map across goroutines?

Tests Go memory model. Answer: maps are not concurrency-safe and risk panic or corruption; use sync.RWMutex with map for read-heavy cases or sync.Map for cache-like patterns. Red flag: suggesting runtime.GOMAXPROCS or channel-only access without justification.

intermediate1 min read

Comparing the three async error-handling styles

Callbacks pass err as first arg; Promises route errors to catch; async/await uses try/catch; an unhandled rejection can crash the Node process.

easy1 min read

The ACID properties of transactions

Define Atomicity, Consistency, Isolation, Durability and why each matters.

How do you define a Pydantic model for FastAPI request body validation?
easy2 min read

How do you define a Pydantic model for FastAPI request body validation?

Subclass BaseModel with id int, email str, full_name str|None; pass it as a route param so FastAPI validates JSON and returns 422s.

intermediate2 min read

What type replaces String for read-only function parameters in Rust?

Use &str; it borrows without ownership, accepts literals and String via coercion, and avoids clones.

advanced2 min read

Bounded concurrency for many async requests

Chunk the array and await Promise.all per chunk, or run a fixed worker pool pulling from a shared index; cap in-flight requests.

easy1 min read

The lost update anomaly explained

Both transactions read the same value, each adds one, the second overwrite erases the first.

How does Pydantic handle extra JSON fields, and how to configure it?
easy2 min read

How does Pydantic handle extra JSON fields, and how to configure it?

This tests Pydantic's data filtering behavior and configuration. By default, Pydantic ignores extra fields silently. Set model_config = ConfigDict(extra='forbid' or 'allow') to change it. A red flag is claiming FastAPI 422s by default on unknown fields.

intermediate2 min read

Sum Some values in Vec<Option<i32>>, ignoring None

Tests Rust Option handling and null-safety design. A strong answer uses map, unwrap_or, flatten, or match to skip Nones safely, and explains Option replaces null pointers with explicit enum variants. Red flag: using unwrap in a loop or suggesting null checks.

advanced1 min read

Promise.all vs Promise.allSettled

All rejects on the first failure; allSettled always fulfills with a status/value or reason per input. Use allSettled when partial success is acceptable.

easy1 min read

Database deadlocks and how engines resolve them

Define a deadlock as mutual waiting on locks, name detection plus victim rollback, and prevention by consistent lock ordering.

What is the difference between a Pydantic default and Optional field?
easy2 min read

What is the difference between a Pydantic default and Optional field?

Both forms are non-required; str = 'guest' rejects None, Optional[str] = None accepts it.

advanced2 min read

Explain Go struct embedding vs inheritance and method promotion

What it tests: knowing Go composition and method promotion from embeds. Outline: embedding adds a type as part without is-a; promoted methods join the outer type; collisions resolve by outer-type precedence.

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