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 21

intermediate2 min read

Why must FFI-bound structs use #[repr(C)] and what breaks without it?

Repr(C) fixes field order, size, alignment to C rules for extern calls; omitting it lets Rust reorder or pad fields, causing UB.

advanced1 min read

How does Node.js cluster module enable zero-downtime restarts?

Master-worker architecture, graceful shutdown of old workers, routing new requests to new workers.

easy1 min read

Inverted index in search engines

An inverted index maps each term to the list of documents containing it, making keyword lookup O(1)-ish instead of scanning every document.

How do you mark a FastAPI endpoint as deprecated?
intermediate2 min read

How do you mark a FastAPI endpoint as deprecated?

This tests decorator-level OpenAPI configuration in FastAPI. Pass deprecated=True to the path operation decorator, e.g. @app.get("/old", deprecated=True), so Swagger UI shows a strikethrough. Red flag: burying a deprecation warning in the docstring instead.

Explain the performance overhead of a cgo call
intermediate2 min read

Explain the performance overhead of a cgo call

Tests cgo transition penalties and scheduler semantics. A strong answer cites the ~100x overhead (~171ns vs ~1.8ns), notes C blocks an OS thread and starves the scheduler, and warns about memory copy taxes. Red flag: claiming cgo is free or ignoring blocking.

advanced1 min read

postMessage vs SharedArrayBuffer in worker_threads tradeoffs?

Structured cloning copies data, SharedArrayBuffer shares memory.

intermediate1 min read

Cache-aside pattern pros and cons

App reads cache, on miss loads DB and populates, invalidates on write; pros are resilience and lean cache, cons are stale windows and app-managed invalidation.

intermediate2 min read

Passing Go/Rust callbacks to a C library

C needs a plain function pointer; in Go use //export with cgo, in Rust an extern "C" fn; carry state via a void* user-data param.

Add a custom x- field to a FastAPI path operation schema
advanced2 min read

Add a custom x- field to a FastAPI path operation schema

Tests knowledge of FastAPI's built-in OpenAPI extension hook. Answer: cite the path operation decorator's extra-schema dict (OpenAPI Extra) to merge x-internal-id directly. Red flag: proposing manual JSON editing or schema post-processing.

advanced1 min read

How do you handle errors across piped streams safely?

Pipe connects streams but errors don't auto-propagate, must listen on each stream. Use pipeline() helper for auto-cleanup.

intermediate1 min read

Vector embeddings and vector databases

An embedding is a learned dense vector capturing semantic meaning, and vector DBs use ANN indexes like HNSW for fast similarity search that relational B-trees cannot provide.

advanced2 min read

Building a safe Rust wrapper over an unsafe C API

Hide extern calls behind a safe module, own the resource in a struct with Drop calling the C free, return Result mapping C error codes, use NewType/NonNull and PhantomData.

How do you disable FastAPI docs but keep the OpenAPI schema?
advanced2 min read

How do you disable FastAPI docs but keep the OpenAPI schema?

Tests FastAPI constructor routing: docs_url, redoc_url, and openapi_url. Answer: pass docs_url=None and redoc_url=None while keeping openapi_url="/openapi.json", gated by env var. Red flag: middleware or manual route deletion instead of native configuration.

easy1 min read

HTTP request-response versus WebSocket connections?

HTTP is request-initiated, pull-based, client waits for response. WebSocket is persistent, bidirectional, either side sends data anytime.

intermediate1 min read

The analysis phase: tokenizers and token filters

Analysis turns raw text into index terms via a tokenizer that splits text into tokens then token filters that transform them, like lowercasing or stemming.

advanced1 min read

cgo directives: CFLAGS, LDFLAGS, and pkg-config

#cgo CFLAGS feeds the C compiler include paths/defines, LDFLAGS feeds the linker libraries/paths, pkg-config auto-discovers both; needed to compile against a system C library.

advanced2 min read

How do you directly modify FastAPI's generated OpenAPI dictionary?

Tests deep FastAPI lifecycle knowledge. Override app.openapi: save the original, call it to get the dict, mutate it, cache on app.openapi_schema, and return. Red flag: rewriting /openapi.json in middleware or touching the schema cache directly.

easy1 min read

Socket.IO emit methods: socket, io, broadcast differences?

Socket.emit() sends to one client, broadcast.emit() to all except sender, io.emit() to all.

advanced1 min read

TSM-Tree vs LSM-Tree storage engines

Both buffer writes in memory and flush sorted immutable files, but TSM organizes by series and time with columnar, heavily compressed blocks tuned for ordered appends and range scans.

easy1 min read

Structuring a Go CLI that fetches a URL

Parse args with the flag package, http.Get the URL, check err and status, defer resp.Body.Close, copy body to stdout, exit non-zero on failure.

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