← All pins

GCRA: a simple and elegant rate-limiting algorithm

A clear guide to the Generic Cell Rate Algorithm (GCRA), which is used for leaky bucket rate limiting. Instead of tracking a counter and refilling it on a timer, GCRA stores one timestamp and uses a simple calculation to decide whether to allow a request. The post explains the idea step by step and shows why it needs little memory and is easy to build.

rate-limitingalgorithmsnetworking

Visit the original →