Your code works.
Until production
breaks it.
A practice harness for the patterns senior engineers ship every day — idempotency, rate limiting, distributed locks, retry-safe workflows. Write against real Postgres and Redis. The harness hits your code with concurrent requests, timeouts, and partial failures, then shows you exactly which invariants held.
› running 7 scenarios against your implementation…PASSbasic_request_handling12msPASSconcurrent_requests· 5 concurrent, exactly_once145msPASSduplicate_submission_handling89msPASSdatabase_connection_recovery203msFAILpartial_failure_recovery340msexpected: transaction rolled back on downstream failureactual: partial write committed, no rollbackPASStimeout_handling156msSKIPhidden_scenario_3--5 passed, 1 failed, 1 hidden · score 71/100
Real infrastructure.
Per submission.
Every run gets its own isolated docker network with real Postgres and Redis sidecars. No mocks. No shared state. The scenario harness runs adjacent to your code, drives it over HTTP, and asserts on behavioural properties — not string equality.
- sandboxhardened docker container
- networkisolated, fresh per run
- sidecarspostgres 16 · redis 7
- timeouts120s hard cap
- observationhttp + process signals
┌─────────────────────────────┐ ┌─────────────────────────────┐
│ │ │ │
│ YOUR IMPLEMENTATION │◀────────│ SCENARIO HARNESS │
│ │ :3000 │ │
│ POST /api/payments │ │ ▸ concurrent_x5 │
│ GET /api/payments/:id │ │ ▸ timeout_injection │
│ │────────▶│ ▸ partial_failure │
│ (your code, your image) │ asserts│ (platform-controlled) │
│ │ │ │
└──────┬──────────────┬───────┘ └─────────────────────────────┘
│ │
:5432│ │:6379
▼ ▼
┌──────────────┐ ┌──────────────┐
│ │ │ │
│ POSTGRES │ │ REDIS │
│ (per-run) │ │ (per-run) │
│ │ │ │
└──────────────┘ └──────────────┘
isolated docker network · fresh every submission
Three steps, and then the failures find you.
Pick a pattern
Idempotent endpoints, rate limiters, circuit breakers, graceful shutdown. Each challenge is scoped to one behavioural property you can name in a code review.
Write real code
Your implementation runs as an HTTP server in an isolated container, alongside real Postgres and Redis. No mocks. Your code, your choices.
app.post('/api/payments', async (req, res) => {
const { idempotencyKey, amount } = req.body
// your implementation
})Face the failures
A scenario harness hits the running server with concurrent duplicates, network partitions, timeouts mid-transaction. You see which invariants held — and which didn't.
scenarios:
- name: concurrent_duplicate_requests
concurrent: 5
expect: exactly_one_chargeNot string comparison.
Behavioural testing.
Other platforms check if your output matches an expected string. We spin up real infrastructure and observe whether your code survives production failure modes.
| Feature | SystemTrials | LeetCode | CodeCrafters |
|---|---|---|---|
| Real database per run | — | — | |
| Failure injection | — | — | |
| Concurrent request testing | — | — | |
| Behavioural property tests | — | partial | |
| Debug & refactor formats | — | — |
From your first REST endpoint to incident response.
Fundamentals
REST APIs, database connections, error handling, request validation.
Patterns you reach for
Idempotent endpoints, rate limiting, circuit breakers, graceful shutdown.
Three-in-the-morning
Cache stampedes, distributed locking, load shedding, cascading failure recovery.
Backend patterns library
Guided readings with a practice challenge for each concept. Idempotency, rate limiting, distributed locks, retry semantics.
Interview prep, by format
Debug, refactor, take-home, and pair-programming challenges in the shapes real engineering interviews take. Not algorithm puzzles.
Write code that holds.
Prove it under load.
Free during beta. No credit card. Ships with TypeScript, Go, and Python starters.