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 5

advanced1 min read

Async iterators and for await...of for streaming

Async iterators yield values lazily over time; for await...of consumes them sequentially with backpressure, keeping memory bounded.

intermediate1 min read

How MVCC enables non-blocking reads

Writers create new row versions instead of overwriting, readers see a consistent snapshot, so readers never block writers.

Enforce positive price and SKU format using Pydantic Field without custom validators
intermediate1 min read

Enforce positive price and SKU format using Pydantic Field without custom validators

Use Field(gt=0) for price and Field(pattern=r'^ITEM-\d{5}$') for SKU; mention Annotated.

advanced2 min read

How does struct field ordering affect memory layout in Go and Rust?

It tests alignment, padding, and compiler layout knowledge. A strong answer explains that alignment inserts padding, Go and Rust keep declared order, and reordering by size can shrink size. Red flag: saying order is irrelevant or that compiler auto-packs.

easy1 min read

fs.readFileSync vs fs.readFile

Sync blocks the event loop and returns directly, async takes a callback or promise, only sync is safe at startup.

intermediate1 min read

Two-Phase Locking and serializability

A growing phase only acquires locks, a shrinking phase only releases, no lock taken after one is freed.

Implement a custom validator for a single Pydantic model field
intermediate2 min read

Implement a custom validator for a single Pydantic model field

Use @field_validator as a classmethod, raise ValueError on failure, return the value.

advanced3 min read

Compare enum vs trait objects for heterogeneous shapes in Rust

This tests compile-time vs run-time polymorphism in Rust. A strong answer contrasts enum's closed set, static dispatch, and stack layout against trait objects' open extensibility, heap allocation, and vtable indirection.

easy1 min read

Why use path.join over string concatenation

Path.join uses the correct OS separator, collapses duplicate slashes, normalizes . and .. segments.

advanced1 min read

Write skew under snapshot isolation

Two transactions read an overlapping set, each writes disjoint rows, jointly violating an invariant.

How do you prevent password_hash from appearing in a FastAPI response?
intermediate2 min read

How do you prevent password_hash from appearing in a FastAPI response?

Tests FastAPI response filtering and the security practice of separating DB schemas from API contracts. A strong answer proposes a dedicated output model omitting the field, then cites response_model_exclude. Red flag: manual dict deletion or monkey-patching.

easy2 min read

How do Go and Rust control visibility of functions and types?

Tests encapsulation conventions in systems languages. Go uses capitalization: uppercase exports across packages; Rust uses explicit pub keywords with module-level privacy. Red flag: claiming either uses Java-style access modifiers or runtime visibility.

easy1 min read

Minimal HTTP server with the http module

CreateServer with a request listener, set status and Content-Type, end the response, call listen on 3000.

advanced1 min read

How the write-ahead log ensures atomicity and durability

Log changes before applying, flush log at commit, replay redo and undo on recovery.

Model an Order with a nested Product list in Pydantic
intermediate2 min read

Model an Order with a nested Product list in Pydantic

It tests Pydantic nested model composition. Define Product as BaseModel, then Order with products: list[Product]; Pydantic recursively coerces each dict and raises ValidationError on failure. A red flag is insisting on manual iteration.

easy2 min read

Go package declaration, directory name, and import path relationship

Tests Go's separation of directory layout and package identity. A good answer states: import path is module path plus subdirectory; package clause is the in-code name; mismatch is legal and common for main or tests.

intermediate1 min read

Counting lines in a 5GB log file efficiently

ReadFile loads all 5GB into RAM and may exceed buffer limits, instead stream with createReadStream plus readline and count line by line.

easy1 min read

What a database index is and when it helps

An index is a sorted lookup structure avoiding full scans, helps selective WHERE/JOIN columns, but costs write overhead.

Ensure end_date is after start_date in Pydantic
advanced2 min read

Ensure end_date is after start_date in Pydantic

Tests whether you know field validators see only one value and cannot compare siblings. Use a model validator instead, which receives the full instance and can compare start_date and end_date. Red flag: a field validator referencing the other field.

Why does Go forbid circular dependencies, and how do you resolve them?
intermediate2 min read

Why does Go forbid circular dependencies, and how do you resolve them?

Cycles break incremental compilation; resolve by moving logic down, merging coupled packages, or using dependency injection.

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