Backend & API Design
Resource modelling and REST, API styles (GraphQL, gRPC, webhooks), validation, errors, pagination, versioning, authentication from sessions to OAuth 2.1/OIDC and passkeys, authorization models, rate limiting, idempotency keys, retries and circuit breakers, concurrency control, API security (OWASP) and production readiness.
This track is about building APIs that are correct, safe, evolvable and operable. It's the knowledge tested in backend interviews ("design the API for…", "how do you make this endpoint idempotent?", "how would you rate limit?", "JWT vs sessions?") and the foundation for every system design.
Chapters
- REST & resource modelling — resources, URIs, methods, status codes, HATEOAS, and modelling real domains.
- API styles — REST vs GraphQL vs gRPC vs async/event APIs; when to use which.
- Request design — validation, error format (RFC 9457), pagination (offset, cursor, keyset), filtering, sorting, versioning, bulk and long-running operations.
- Authentication basics — passwords and hashing, sessions vs tokens, cookies, JWT anatomy and pitfalls, refresh tokens.
- Advanced authentication — OAuth 2.0/2.1 flows, OpenID Connect, SSO/SAML, MFA, passkeys/WebAuthn, API keys, service-to-service auth.
- Authorization — RBAC, ABAC, ReBAC (Zanzibar), policy engines, multi-tenant isolation, IDOR prevention.
- Rate limiting — token bucket, leaky bucket, fixed/sliding windows, distributed implementations, headers.
- Idempotency & resilience — idempotency keys, retries with backoff and jitter, timeouts, circuit breakers, bulkheads.
- Concurrency & consistency in backends — race conditions, optimistic locking with ETags, pessimistic locks, distributed locks and fencing tokens, the outbox pattern.
- API security — OWASP API Top 10, injection, XSS, CSRF, SSRF, mass assignment, secrets management.
- Production readiness — observability, health checks, configuration, graceful shutdown, deployment strategies, documentation and testing.
Chapters
In recommended orderFielding's REST constraints, modelling a domain as resources and sub-resources, URI design rules, mapping operations to methods and status codes, actions that don't fit CRUD, HATEOAS and the Richardson maturity model, plus a complete worked API design.
6 Q
When to choose REST, GraphQL, gRPC, plain RPC, webhooks or event-driven async APIs; GraphQL schemas, resolvers, N+1 and DataLoader, query cost limits and caching; gRPC/protobuf schema evolution; Backend-for-Frontend; and AsyncAPI/event contracts.
5 Q
Input validation layers, a consistent error model (RFC 9457 problem details), offset vs cursor vs keyset pagination with SQL, filtering/sorting/field selection, partial responses, bulk operations, long-running operations (202 + polling), file uploads, and API versioning strategies.
6 Q
Authentication vs authorization, storing passwords (Argon2id/bcrypt, salts, peppers), login flows and account security, server-side sessions vs stateless tokens, cookie security, JWT structure, signing algorithms and pitfalls, access and refresh tokens with rotation, and logout/revocation.
7 Q
OAuth 2.0 roles and flows (authorization code + PKCE, client credentials, device code, refresh), what OAuth 2.1 and the RFC 9700 security BCP changed, OpenID Connect and ID tokens, SSO with OIDC and SAML, MFA methods, passkeys/WebAuthn, API keys, service-to-service and workload identity, token exchange and sender-constrained tokens.
8 Q
Where authorization checks belong, object-level authorization and IDOR/BOLA, role-based, attribute-based and relationship-based access control (Google Zanzibar), scopes vs permissions, policy engines (OPA, Cedar), multi-tenant isolation, and filtering lists by permission.
5 Q
Why and where to rate limit, the five classic algorithms (fixed window, sliding log, sliding window counter, token bucket, leaky bucket/GCRA) with code, distributed rate limiting with Redis and Lua, response headers, client behaviour, quotas and fairness.
5 Q
Why networks force retries, idempotency keys implemented end to end (storage, concurrency, response replay), natural idempotency, retries with exponential backoff and jitter, retry budgets, timeouts and deadline propagation, circuit breakers, bulkheads, fallbacks and graceful degradation.
6 Q
Race conditions in web systems (double submit, oversell, double spend, lost updates), fixing them with atomic SQL, constraints, optimistic locking via version columns and ETag/If-Match, pessimistic row locks, distributed locks with leases and fencing tokens, the transactional outbox and inbox patterns, and ordering guarantees.
6 Q
The OWASP API Security Top 10 (2023) explained with fixes, plus SQL injection, XSS, CSRF, SSRF, mass assignment, insecure deserialization, secrets management, security headers, supply-chain risk, and security logging.
7 Q
Logs, metrics and traces with OpenTelemetry, RED/USE/golden signals, correlation IDs, health checks (liveness, readiness, startup), twelve-factor configuration, graceful shutdown, deployment strategies (rolling, blue-green, canary, feature flags), testing strategy, API documentation, and a production-readiness checklist.
6 Q