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 20

advanced1 min read

Zero-copy string to []byte conversion via unsafe in Go

Use unsafe.StringData/Slice (or reflect headers) to alias the string's bytes without copying; assumes shared backing array; risk is mutating an immutable string.

How do you add a title, description, and version to FastAPI auto-docs?
easy2 min read

How do you add a title, description, and version to FastAPI auto-docs?

Tests if you know FastAPI's metadata kwargs for OpenAPI docs. Pass title, description, and version to the FastAPI() constructor; Swagger UI and ReDoc render them automatically.

easy1 min read

Purpose of the Node.js cluster module

Cluster forks worker processes sharing one listening port, so requests spread across CPU cores via the OS, raising throughput and adding resilience.

easy1 min read

Schema-on-read in data lakes

Structure is applied at query time not ingest, enabling flexible raw storage and ML, but costing query-time validation and risking data swamps.

Add summary and description to a FastAPI endpoint for Swagger UI
easy2 min read

Add summary and description to a FastAPI endpoint for Swagger UI

This tests FastAPI path operation decorator configuration. Pass summary and description to @app.get, or use function docstring for description. A red flag is setting metadata inside the function body or confusing docs with Pydantic Field descriptions.

advanced2 min read

Design a safe Rust wrapper taking &[i32] and returning Vec<i32>

Tests Rust FFI buffer-output encapsulation. A strong answer declares an unsafe extern C block, allocates a Vec with capacity, passes as_mut_ptr and a local size_t, validates returned length, then calls set_len.

intermediate1 min read

Clickstream architecture for real-time and batch

Ingest events into a log like Kafka, fan out to a real-time path for dashboards and a batch path to a lake for ad-hoc analysis.

What are FastAPI's two default interactive documentation UIs and URL paths?
easy2 min read

What are FastAPI's two default interactive documentation UIs and URL paths?

This tests whether you know FastAPI's built-in auto-generated docs. A strong answer names Swagger UI at /docs and ReDoc at /redoc, then notes the OpenAPI schema at /openapi.json. A weak answer confuses these with external tools or custom routes.

easy2 min read

Purpose of Go import C and Rust equivalent mechanism

This tests FFI entry points: Go's import "C" activates cgo to reference C symbols directly, while Rust uses an unsafe extern "C" block to declare external functions. A red flag is calling either a normal import or omitting unsafe in Rust.

intermediate2 min read

Offloading CPU work with worker_threads

Heavy sync work blocks the single event loop and stalls all requests; move it to a Worker, message the input, await the result asynchronously, and ideally pool workers.

intermediate1 min read

Exactly-once semantics in stream processing

Exactly-once means each event affects state once despite retries, it is hard because of failures between processing and committing, and you achieve it via idempotency or atomic…

How do you document multiple response schemas in OpenAPI?
intermediate2 min read

How do you document multiple response schemas in OpenAPI?

This tests FastAPI OpenAPI schema generation for error responses. A strong answer covers the decorator responses dict mapping status codes to Pydantic models and descriptions, plus manually returning JSONResponse with that code.

easy2 min read

Pass a string from Go and Rust to C safely

This tests FFI ownership and null-termination. In Go, use C.CString then C.free it. In Rust, create a std::ffi::CString, bind it to a let, then pass as_ptr while the binding lives. Red flag: claiming Rust is auto-safe without mentioning the temp-drop gotcha.

intermediate1 min read

worker_threads versus cluster: when to use each

Worker_threads offloads CPU-bound compute within one process with shared-memory transfer; cluster forks processes to scale IO-bound request throughput across cores.

advanced1 min read

The small files problem in data lakes

Many tiny files create per-file overhead and metadata pressure, hurting scans; fix via compaction, batching writes, and tuning partitioning.

intermediate2 min read

How can you provide a Swagger UI example for a Pydantic body?

Tests whether you know FastAPI generates OpenAPI schema from Pydantic metadata. A strong answer names Field(example=...) for per-field samples and Body(example=...) for the full payload.

Use a C malloc'd char* in Go and Rust, then free it
intermediate2 min read

Use a C malloc'd char* in Go and Rust, then free it

Tests FFI allocator discipline. In Go, copy with C.GoString then C.free the *C.char. In Rust, read via CStr::from_ptr, copy to String, then libc::free. Red flag: letting Go GC or Rust Drop manage C memory, or using CString::from_raw on C malloc'd pointers.

intermediate2 min read

Implementing a custom filtering Transform stream

Subclass Transform with objectMode, implement _transform to parse each chunk, push only matching objects, and call the callback; handle parse errors.

advanced2 min read

Iceberg vs Delta Lake metadata and ACID

Iceberg uses a tree of metadata and manifest files with atomic pointer swaps and optimistic concurrency; Delta uses an ordered transaction log of JSON commits with optimistic concurrency.

How do you group FastAPI endpoints under tags and describe groups?
intermediate2 min read

How do you group FastAPI endpoints under tags and describe groups?

Tests FastAPI's two-step tag system: decorators label routes, and openapi_tags supplies group descriptions. Good answers cover tagging paths with tags=["users"], then defining metadata in FastAPI(openapi_tags=[...]) with matching names.

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