API and System Design Reviews
Evaluate an API or system design against a checklist of correctness, security, scale and operability before it ships.
Advanced · about 4 hours · difficulty 3/5
Learn first: API Contracts with OpenAPI, Common Vulnerabilities: OWASP Top 10, Timeouts, Retries and Circuit Breakers, Metrics, Dashboards and Alerting
Much of senior backend work is not writing code but reviewing designs: catching the missing index, the unauthenticated endpoint or the breaking change before it reaches production. It is also exactly what system design interviews test.
Write the design down first
A short design doc (context, goals and non-goals, API sketch, data model, alternatives considered, rollout plan) lets reviewers find problems while they are cheap to fix. Many teams use a lightweight RFC or ADR (architecture decision record) format.
A review checklist
- Contract: consistent naming, correct methods and status codes, one error format, pagination on every list, idempotency for retried writes, a versioning and deprecation plan. Compare against a public style guide such as Google's AIPs or Zalando's guidelines.
- Security: authentication on every route, object-level authorization checks, input validation, rate limits, no secrets or personal data in logs.
- Data: schema fits the access patterns, indexes for each query, migrations are backwards compatible, transactions where invariants span rows.
- Scale: expected traffic and data growth, caching strategy, what happens at 10x load, which component saturates first.
- Failure: timeouts, retries, fallbacks, what the user sees when each dependency is down.
- Operability: logs, metrics, traces and alerts; a runbook; a rollback plan.
Estimation
Do back-of-the-envelope math: requests per second at peak, storage per year, bandwidth. Order-of-magnitude answers are enough to spot designs that cannot work.
Giving feedback
Separate blocking issues from suggestions, explain the risk behind each comment, and propose an alternative rather than only saying no.
You are ready to move on when you can review a design doc for a feature like "shareable file links" and produce a prioritized list of risks with concrete fixes.
Key concepts
- Design docs, RFCs and ADRs
- API contract checklist
- Security review
- Data model and index review
- Failure mode analysis
- Back-of-the-envelope estimation
- Public API style guides
- Giving constructive review feedback
Mini project
Write a two-page design doc for a URL shortener with analytics, then review it yourself against the checklist and revise it, keeping the list of issues you found and fixed.
Check yourself
Name five questions you would ask in a review of a new public endpoint that lists a user's invoices.
Free resources
- Google API Improvement Proposals (Google)
- Zalando RESTful API Guidelines (Zalando)
- Architecture decision records (adr.github.io)