7 · The front door: APIs, CDNs, rate limits · API styles

API styles

StyleUse when
REST (JSON over HTTP)Default public API; resources + verbs; cacheable GETs
gRPCService-to-service; fast binary, typed contracts, streaming
GraphQLMany clients needing different shapes of data; avoids over-fetching
WebSocket / SSEServer pushes to client in real time (chat, live scores)

Good API habits: pagination (cursor > offset at scale), idempotency keys on POSTs that create money/orders, versioning (/v1), and consistent error shapes.