Backend Engineer Interview Prep
OverviewBuilds and operates product services, owning APIs, data flows, reliability, and production diagnosis across databases, queues, caches, and downstream dependencies.
Curated: · Written: · Reviewed:
- Interview Q&A
- 101
- Practice MCQs
- 102
Top 100 Backend Engineer Interview Questions and Answers
The questions most likely to actually be asked, ranked by likelihood, with pro-level model answers.101 Q&ATop 100 Backend Engineer Practice MCQs
Quick multiple-choice self-checks covering the same high-value ground, with an explanation for every answer.102 MCQsThe role in one line
Backend engineers own the product services behind the APIs: their contracts, the data flows between them, and how they behave when a dependency fails in production.
The interview loop
Rounds vary by company. This is the usual shape.
| Round | What it scores |
|---|---|
| Recruiter screen | Scope, level, and past ownership |
| Coding (data structures) | Correct solution, complexity, edge cases |
| SQL and data modelling | Query correctness, schema and index reasoning |
| API and service design | Requirements to contracts, boundaries, idempotency |
| Failure and reliability | Timeouts, retries, backpressure, diagnosis |
| Behavioural (STAR) | Ownership, incidents, trade-off decisions |
Five must-know areas
- API contracts: validation, idempotency keys, pagination, versioning, and object-level authorization. Clients depend on these once shipped.
- Transactions and isolation: what commits atomically and which anomalies the chosen isolation level still allows. This is where double writes and lost updates come from.
- Messaging and webhooks: at-least-once delivery, idempotent consumers, and where ordering is not guaranteed. Duplicates and reordering are the default, not the exception.
- Timeouts, retries, and backpressure: budgets per hop, jittered backoff, bounded queues. Retries multiply load during an outage.
- Cache and replica consistency: invalidation on write, read-after-write, and replication lag. Stale reads look like bugs to the user.
Numbers and formulas to have ready
The figures below depend on your system. Say what they depend on before quoting one.
With retries at each layer, the load reaching the bottom layer is the product of attempts per layer:
Three layers each making 3 attempts send up to $3^3 = 27$ requests per user action. Set retries at one layer only.
The timeout at the top must cover the work below it plus a margin:
Consumers needed to keep up, using Little's law with arrival rate $\lambda$ and mean service time $s$:
Time to drain a backlog of $B$ messages, where consumer rate $\mu$ must exceed producer rate $\lambda$:
If $\mu \le \lambda$, the backlog never drains and the fix is more consumers or less work per message.
Reference architecture
- The outbox row is written in the same transaction as the order, so an event exists if and only if the order commits.
- The worker retries with exponential backoff and moves messages to a dead-letter queue after a fixed number of attempts.
- The gateway enforces coarse rate limits; the service enforces per-object authorization.
- Cache entries are invalidated on write and never trusted after a failed retry.
Strong vs weak answers
| Question | Strong answer sounds like | Weak answer sounds like |
|---|---|---|
| Double charge after timeout | The client sends an Idempotency-Key. I store the key with the response in the same transaction as the charge, and a replay returns the stored result. | I'd add a check in the code to avoid duplicates. |
| Valid JSON, unknown customer | I return 422 with a field error on customer_id, since the body is well formed but refers to nothing valid. I'd document that choice. | I'd return an error. |
| Slow dependency | Timeout at 300 ms (hypothetical, set from the dependency's p99), one retry with jitter, and a circuit breaker that opens on a failure-rate threshold. | I'd add retries so it recovers. |
| Consumer lag growing | I check whether the bottleneck is per-message work or partition count, then scale consumers up to the partition count and measure the drain rate. | I'd add more servers. |
Interview tips
- Start from requirements: name the client, the expected volume, and the consistency promise before you draw endpoints.
- State the invariant each design protects, for example at most one charge per idempotency key.
- For every hop, say what the caller sees on timeout and whether a retry is safe.
- Attach a source to every number: the dependency's measured p99, your load test, or the vendor's documented limit.
- Say what you would not build and why. A scoped refusal reads as judgment.
Last-week checklist:
- Answer three Top 100 questions aloud in the order requirements, trade-offs, failure modes.
- Redo the aggregation and isolation-level exercises in the SQL and Transactions concepts.
- Write the timeout budget for one call chain from a project you have worked on.
- Prepare one incident in STAR with a measured outcome.
- Check that your idempotency and pagination answers do not contradict each other.
Feedback on this overview
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.