
6 min read
Rate Limiting: Token Bucket vs Sliding Window
Rate limiting isn't one algorithm choice — it's three decisions: where you enforce it, what key you use, and only then which algorithm to run.
Tag

Rate limiting isn't one algorithm choice — it's three decisions: where you enforce it, what key you use, and only then which algorithm to run.

A payment request timed out, the mobile app retried automatically, and the customer got charged twice. Here's how idempotency keys and UPSERT prevent that.

Field notes on getting reliable JSON from an LLM: schema modes vs tool-calling, Zod/Pydantic validation at the boundary, and the failure modes that still bite.

Most developers still treat REST vs GraphQL as a two-horse race. As of July 2026 that framing is stale. Here is the honest comparison, with tRPC and gRPC in the picture.