Backend · core

API Design

REST, gRPC, versioning, pagination.

backendapi-design

Mental model

An API is a contract you cannot easily change. Design for evolution: version it, paginate every list, make errors machine-readable, and keep resources consistent.

How to study API Design

Begin by restating the mental model in your own words, then connect it to a concrete system you have built or operated. Name the mechanism, the constraint it addresses, and the trade-off it introduces. Use API design guide (Google Cloud) to check details, but close the source before writing your explanation. Retrieval is the learning step; rereading is only preparation.

Next, compare API Design with Auth Systems, Idempotency. Ask what changes in correctness, latency, resource use, operability, and failure recovery. Complete Design cursor pagination and preserve the command, input, output, and one failed attempt as evidence. Finish by explaining the idea without jargon to someone who has not studied the track.

Proof of understanding

  • Explain the mechanism from first principles and identify the state it reads or changes.
  • Give one situation where the concept is the right choice and one where it is not.
  • Predict a realistic failure mode before running the drill, then compare the prediction with evidence.
  • Connect the result to a roadmap or build artifact instead of treating the concept as isolated trivia.

Where it matters

Every backend; the Codevetter and HighSignal public surfaces.

Common mistakes

  • Unpaginated list endpoints that fall over at scale
  • Breaking changes without a version bump
  • Inconsistent error shapes across endpoints

Learn from primary sources

Practice and explain it back

Design cursor pagination

List endpoint returns 10M rows. Why offset pagination fails? Sketch cursor on (created_at, id).

Expected evidence: Offset scans skip rows; cursor is stable under inserts.

Open the interactive drill →

Review prompts

  • Why should every list endpoint be paginated from day one?

Build evidence

Synthesize: Application Engineering

Turn backend, client, UX, real-time, interactive, analytics, and distribution skills into one complete product. Produce one working system, benchmark, or evidence-backed design that integrates the path.

  • Implements or precisely models the core mechanisms from all three milestones
  • Includes at least one injected failure or adversarial case and demonstrates recovery
  • Reports quality, latency, resource, reliability, or usability measurements relevant to the domain
  • Ships a concise architecture note explaining decisions, trade-offs, and remaining risks

Prerequisites

Related concepts

Learning paths