Go developer releases open-source distributed rate limiter with zero memory allocation
A software developer has released distlimit, an open-source distributed rate-limiting library for Go, designed to address performance and reliability gaps in existing solutions. The library achieves sub-100 nanosecond evaluation speeds by eliminating heap memory allocations during request processing. To reduce lock contention, it splits in-memory data across 64 independent shards using FNV-1a hashing, enabling up to 64x higher concurrent throughput compared to single-mutex designs. The library includes a hybrid Redis-plus-memory fallback system with a circuit breaker to prevent service crashes or thundering herd spikes during Redis outages. Security features include CIDR-validated proxy trust rules to guard against IP spoofing via manipulated forwarding headers.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in