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 19

intermediate2 min read

How do you test a FastAPI endpoint without real tokens?

Tests whether you know FastAPI's dependency override mechanism to isolate business logic from auth. A great answer describes using app.dependency_overrides to swap the auth Depends for a mock returning a fake user, then cleaning up after the test.

intermediate2 min read

Using reflect, iterate a pointer-to-struct's fields

Tests fluency with Go reflection for indirection and field traversal. Outline: ValueOf/TypeOf, guard IsValid, check Kind==Ptr, Elem to struct, loop NumField with Type for names and Value for values. Red flag: Field() on the pointer before Elem panics.

intermediate1 min read

Auditing and fixing vulnerable npm dependencies

Run npm audit (or yarn audit) to list advisories, npm audit fix to patch within semver, bump majors deliberately, and lock versions; wire audits into CI.

intermediate1 min read

Cache-aside pattern with Redis and RDS

App checks cache, on miss reads DB and populates, writes invalidate the key, and consistency is eventual.

intermediate1 min read

Rust references vs raw pointers

References are borrow-checked, always valid, aliasing-controlled, non-null; raw pointers carry no guarantees, can be null, dangling, or aliased, and dereferencing needs unsafe.

intermediate2 min read

How would you use pytest fixtures to manage TestClient and mock dependencies?

Tests FastAPI test isolation and dependency overrides. Strong answer: function-scoped fixture yielding TestClient, mock injection via app.dependency_overrides, and teardown cleanup to prevent state leaks.

advanced1 min read

Deploying a strict CSP for an Express SPA

Define directives, start in Report-Only to gather violations, then enforce; allow inline code via per-request nonces or hashes plus strict-dynamic instead of unsafe-inline.

intermediate1 min read

How Spanner achieves global external consistency

TrueTime gives bounded-uncertainty clocks via GPS and atomic sources, Spanner commit-waits out that uncertainty, and Paxos replicates each shard.

advanced2 min read

How do you test FastAPI background tasks are enqueued correctly?

This tests mocking framework hooks without firing side effects. A great answer: mock BackgroundTasks or override its dependency, assert add_task got the right function and payload, and test the sender separately.

intermediate2 min read

In Go's reflect package, what is settability and how is it obtained?

This tests whether you know reflection mutates only addressable storage. Settability means a Value points to actual memory; obtain it by calling reflect.ValueOf on a pointer then Elem, or on slice elements. Set panics when the Value is a copy, not an address.

advanced2 min read

Prototype pollution: how it works and prevention

Attacker writes to Object.prototype via __proto__ keys in merge/parse code, poisoning all objects; prevent by guarding keys, null-prototype objects, Object.freeze, Map, and patched deps.

advanced1 min read

Aurora vs Spanner architecture contrast

Aurora is single-writer with a shared distributed log-based storage and quorum, scaling reads; Spanner shards data with Paxos and TrueTime for global writes.

advanced2 min read

How do you test a FastAPI WebSocket endpoint and lifecycle with pytest?

Tests knowledge of FastAPI TestClient usage for async WebSocket lifecycles. Use a with statement for websocket_connect; assert send, receive_json, and close; tests use standard def because TestClient handles the async app.

intermediate2 min read

What are Rust's three procedural macros and derive's advantage over macro_rules?

Tests Rust macros and AST generation vs text macros. Lists derive, attribute-like, and function-like macros, then explains derive needs AST introspection for per-field impl unreachable with macro_rules. Red flag: that macro_rules can iterate struct fields.

advanced2 min read

JWT storage: localStorage versus HttpOnly cookie

LocalStorage is JS-readable so XSS steals the token; HttpOnly cookies resist XSS theft but reintroduce CSRF, mitigated by SameSite plus CSRF tokens.

advanced1 min read

Multi-region active-passive DR with Aurora

Async global replication to a passive region, promote and repoint traffic on failover, and fence the old primary to prevent split-brain.

advanced2 min read

How do router-level and app-level dependencies affect dependency override testing?

This tests FastAPI dependency hierarchy and test isolation. A strong answer states overrides are global to the app, so router-specific deps need scoped fixtures to prevent cross-test leaks. A red flag is claiming APIRouter has its own override registry.

advanced2 min read

Implement a custom derive macro for a Builder pattern

Tests proc-macro AST transformation. A strong answer lists: parse TokenStream with syn into DeriveInput, inspect fields, then quote builder code as TokenStream, noting the separate proc-macro crate. Red flag: treating tokens as strings instead of AST nodes.

easy1 min read

What is a Node.js Stream and why use one

A stream processes data in chunks over time, so memory stays bounded and work starts before all data arrives; ideal for large files and network IO.

easy1 min read

Data warehouse vs data lake

Warehouses store structured, schema-on-write data for BI; lakes store raw multi-format data with schema-on-read for exploration and ML.

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