API key issuance and revocation

DesignMedium40 minStripe style

Your task

Design a token and API-key issuance and revocation system for a developer platform with 5M API keys in circulation. Keys carry scopes, expirations, and per-key rate-tier metadata; validation happens on every API call (600k validations/sec, p99 under 8ms). A leaked key must be revocable globally within seconds, and the system must let developers rotate keys with zero downtime. Cover how keys are stored and validated, the revocation mechanism, and the trade-off between fast validation and instant revocation.

It covers

  • Token revocation
  • Scoping
  • Key lifecycle