The author built Trypema, a Rust rate limiting library, while developing a realtime-as-a-service platform. Existing solutions like redis-cell lacked throughput or graceful degradation support. After optimizing a local provider to outperform governor (9.64M vs 6.28M ops/s on uniform-key workloads), the author invented a hybrid provider that buffers counts locally and syncs to Redis at a configurable flush interval, achieving ~170x higher throughput than redis-cell (11.36M ops/s vs 64k ops/s). Trypema ships with local, Redis, and hybrid providers, plus two strategies: Absolute (sliding window) and Suppressed (graceful degradation near capacity).

Sort: