Plate III · Filed under
API Design
API Design
3 entries
- 001
Fixed window vs sliding window vs token bucket rate limiting
A 100 per minute counter will pass 200 requests in two seconds at the window boundary. What a sliding window and a token bucket cost, and which to ship.
Rate LimitingRedisAPI DesignBackend - 002
Idempotency keys: how to stop a retry double charging
A timeout never tells you whether the write landed. How an idempotency key settles it, and why the key has to commit in the same transaction as the work.
API DesignIdempotencyReliabilityBackend - 003
Keyset pagination vs OFFSET in PostgreSQL
OFFSET reads and discards every row it skips, and silently duplicates records when data shifts. Keyset pagination fixes both, at a price worth knowing.
PostgreSQLDatabasesAPI DesignPagination