Network resilience patterns for a TypeScript app — retry with exponential backoff and jitter, circuit breakers, timeouts, rate limiting, idempotency keys for safe mutation retries, and atomic contention handling for a limited resource (the "last seat" problem — N users racing to claim the same unit of inventory). Covers Cockatiel for in-process resilience, @upstash/ratelimit for edge/serverless rate limiting, and why a naive retry loop causes a thundering herd instead of recovery.