Skip to content
tezvyn:

⚙️Backend Dev

Backend engineering, APIs, and databases

136 bites

Test yourself: Top 30 advanced Backend Dev interview questionsMultiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.

Advanced interview questions in Backend Dev, page 5

advanced1 min read

JWT storage: localStorage versus httpOnly cookies

LocalStorage is readable by JS so XSS can steal the token but no CSRF; httpOnly cookies block XSS theft but are auto-sent, enabling CSRF unless mitigated.

advanced1 min read

Split-brain, consensus, and quorum

Split-brain is two nodes both believing they are leader during a partition; Raft/Paxos require a majority quorum to elect a leader and commit, so the minority side cannot make progress.

advanced1 min read

Mitigating a database shard hot spot

Short-term, add read replicas or cache the hot keys; long-term, fix the partition key with hashing, salting, or finer-grained splitting.

advanced1 min read

Revoking stateless JWTs on logout

A server-side denylist of revoked token IDs checked per request, or short-lived access tokens paired with revocable refresh tokens.

advanced1 min read

Network read/write timeouts in Go vs Rust stdlib

Go uses SetReadDeadline/SetWriteDeadline as absolute times; Rust uses set_read_timeout/set_write_timeout as durations on TcpStream.

advanced1 min read

Handling uncaughtException and unhandledRejection

Listen on process for uncaughtException and unhandledRejection, log the error, stop accepting new work, drain in-flight requests, then exit non-zero for a supervisor to restart.

advanced1 min read

Diagnosing degradation with normal CPU and memory

When CPU and memory look fine, sessions are waiting, not computing; examine wait statistics, lock and latch contention, I/O waits, and buffer pool hit ratio.

advanced1 min read

Cancellation: Go context vs Rust sync stdlib

Go's context.Context threads a Done channel and deadline through call chains; Rust std has no built-in cancellation, so you wire an AtomicBool or channel and check it.

advanced2 min read

What JWT claims must you validate beyond the signature?

This tests whether you understand token misuse beyond crypto: time validity, audience and issuer binding, algorithm whitelisting, and required claims enforcement. Red flag: only checking signature and ignoring exp or aud.

advanced1 min read

Defense-in-depth against SQL injection

Beyond parameterization, apply least-privilege accounts, stored procedures, input allowlisting, and monitoring to shrink blast radius.

advanced1 min read

Managing clean test state across API integration tests

Compare seed-and-truncate, per-test transaction rollback, and in-memory or containerized databases, weighing fidelity, speed, and isolation.

advanced1 min read

Testing code that calls a third-party API

Intercept at the HTTP boundary (nock) or run a local mock server; cover success, errors, timeouts, and assert request shape.

advanced1 min read

Unit of Work / Session pattern in ORMs

The Unit of Work tracks new, dirty, and deleted objects, then flushes them as one batched transaction at commit.

advanced1 min read

Diagnosing Go memory leaks with pprof heap profiles

Expose net/http/pprof, grab /debug/pprof/heap, analyze inuse_space for live retention versus alloc_space for cumulative allocation; rising inuse over time points to a leak.

advanced1 min read

Testing an async workflow that spans DB and message queue

Assert the DB row, then verify the queue message via a test consumer or spy, polling with a timeout rather than fixed sleeps.

advanced1 min read

Fixing an ORM's inefficient aggregation query

Drop to raw SQL or a view for the heavy report, or restructure the ORM query and add indexes. Raw SQL is fast but couples to the schema; tuning keeps portability.

advanced1 min read

Profiling a Rust hot loop with perf

Build with debuginfo, perf record cycles or cache-misses, perf report then perf annotate to map counters to source/asm; flamegraph for hotspots.

advanced2 min read

Why is FastAPI BackgroundTasks poor for multi-minute PDF generation?

Tests whether you know BackgroundTasks is same-process and for seconds, not minutes. Answer: propose a task queue with broker, workers, and result backend; return HTTP 202 with a job ID. Red flag: suggesting FastAPI workers instead of persistence and retries.

Design DB transaction middleware and identify the background-task pitfall
advanced2 min read

Design DB transaction middleware and identify the background-task pitfall

Tests request-scoped DB lifecycle awareness. Strong answer: middleware closes the session on response, yet BackgroundTasks run afterward, so sharing that session causes crashes or leaks. Red flag: saying background tasks can reuse the request transaction.

advanced2 min read

Compare Go and Rust approaches to exposing profiling data

Contrast Go's pprof import with Rust crates or profilers, noting runtime versus OS-level sampling.

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