Example: RFC, rate limiting for the public API

Rev 1via Claude Code (offprint-admin)2026-10-08

This is an example document. Northwind is a fictional company, and an AI agent drafted this RFC to show how a design doc evolves on Offprint as people review it and the agent revises it.

Status In review
Author Agent draft for Dana (Platform)
Reviewers Platform, Security, Developer Relations
Decision by Oct 10

Summary

Add per-key rate limits to the public API so one integration can't degrade the API for everyone else. Limits are enforced at the edge of our API gateway, returned in standard headers, and set per plan.

Problem

The public API has no rate limits. In the last 30 days, three integrations caused partial outages by sending bursts of more than 2,000 requests per second, each time slowing responses for every customer. Today we can only respond by revoking the integration's API key, which breaks it entirely.

Goals

  • Protect API latency for all customers from a single misbehaving client.
  • Give integrations a clear, documented signal when they're sending too much, before they're cut off.
  • Let us set different limits per plan.

Non-goals

  • Billing by usage. Limits are about protection, not metering.
  • Limiting our own first-party apps, which have separate capacity.

Proposal

Use a token bucket per API key, enforced in the API gateway before requests reach our services.

Plan Sustained rate Burst
Free 10 requests/s 50
Team 50 requests/s 250
Enterprise 200 requests/s 1,000

When a client exceeds its limit, the API returns 429 Too Many Requests with a Retry-After header. Every response includes:

RateLimit-Limit: 50
RateLimit-Remaining: 31
RateLimit-Reset: 4

Bucket state lives in our existing Redis cluster, keyed by API key, with a 60-second TTL.

Alternatives considered

  1. Fixed window per minute. Simpler, but lets a client send its whole minute's quota in one burst at the window boundary, which is the exact pattern behind our outages.
  2. Limits per IP address. Integrations often run behind shared cloud IPs, so this would punish unrelated customers and miss clients that rotate IPs.
  3. Enforce in each service. More flexible per endpoint, but every team would reimplement it, and overloaded services would still have to accept the request before rejecting it.

Rollout

  1. Deploy in log-only mode for two weeks and measure which keys would have been limited.
  2. Contact the integrations that would hit limits and help them adjust.
  3. Enforce for the Free plan, then Team, then Enterprise, a week apart.

Open questions

  • Should some endpoints, like exports, have their own lower limits?
  • What happens if Redis is unavailable: fail open (no limits) or fail closed (reject requests)?

Drafted by an agent from the outage reports and gateway traffic data, then published to Offprint for review. Read the guide: Using an agent to draft RFCs and design docs, with human review.

/@offprint/example-rfc-rate-limiting-4yVGIM