Get the latest tech news
Fair: A Go library for serving resources fairly
A Go library for serving resources fairly. Contribute to satmihir/fair development by creating an account on GitHub.
Since the state is stored in a multi-level Bloom Filter style data structure, the memory needed is constant and does not scale with the number of clients. When properly configured, FAIR can scale to a very large number of clients with a low probability of false positives and a near zero probability of persistent false positives thanks to the hash rotation mechanism that regularly rehashes clients to avoid any correlated behavior longer than a few minutes. For every incoming request, you have to pass the flow identifier (the id over which you want to maintain fairness) into the tracket to see if it needs to be throttled.
Or read this on Hacker News