SDE2 prepConcurrencyProduction judgement

SDE2 Backend Interview Prep

At SDE2, backend rounds stop rewarding a fix that merely compiles. They probe production judgement: design tradeoffs, concurrency, failure handling, and idempotency. This hub explains what SDE2 rounds emphasise beyond SDE1 and gives you a suggested practice path through the harder challenges — real repositories with failing tests, not a blank editor.

SDE2 vs SDE1: what changes

SDE1 backend rounds

Get a well-scoped service correct on the happy path and the obvious edge cases. Read existing code, make the failing tests pass, and handle input validation. Correctness is the bar.

SDE2 backend rounds

The same, plus judgement under pressure: correct concurrency without over-locking, clean failure handling, idempotent operations by default, and an ability to defend your design tradeoffs out loud.

What SDE2 rounds emphasise

Design tradeoffs

SDE2 rounds expect you to justify choices — lock granularity, where a transaction boundary sits, what to make configurable — not just produce something that works.

Concurrency

Correctness when many requests hit the same resource at once, with the right locking rather than one global lock that serialises everything.

Failure handling

A failed operation leaves state and history clean. You reason about partial failure and what the caller sees.

Idempotency

Networks and queues retry. Operations must apply exactly once, which SDE2 candidates are expected to design for by default.

A suggested SDE2 practice path

Work these in order. Each is a real backend repository with a failing test suite; the difficulty and the concurrency demands ramp as you go. Open the brief and build — no signup required to read the full problem.

1

API Rate Limiter & Quota Enforcement

Warm up on atomic per-client accounting and concurrency. Get comfortable making refill-check-consume one critical section.

Open the challenge →
2

Message Queue Consumer Idempotency & Retry

Design for redelivery: exactly-once processing, dedupe keys, and safe retries — the idempotency SDE2 interviewers probe.

Open the challenge →
3

Bank Transfer & Deadlock Prevention

Combine atomicity, lock ordering, and idempotency in one service where getting concurrency wrong loses money.

Open the challenge →
4

Distributed Job Scheduler & Singleton Execution

Guarantee a job runs on exactly one worker under contention — leases, races, and failure handling.

Open the challenge →
5

Flash Sale Inventory Purchase System

High-contention correctness: never oversell when thousands buy the same item at the same instant.

Open the challenge →
6

Subscription Billing & Proration Engine

Model state transitions and edge cases precisely: mid-cycle changes, proration, and correct money math.

Open the challenge →

Guided walkthroughs

Concurrent Bank Transfer Coding Problem

Atomicity, deadlock prevention, and idempotency in one task — a favourite SDE2 round.

Read the walkthrough →

Rate Limiter Coding Interview

Correctness under concurrency and messy time — the kind of edge-case reasoning SDE2 rounds demand.

Read the walkthrough →

Prep for the SDE2 bar

The gap between SDE1 and SDE2 is judgement under concurrency and failure. Rehearse it on real repositories, then articulate your tradeoffs — exactly what you will do in the room.