Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That is the Token Bucket [1] algorithm. Variations can easily be coded to be distributed (use Redis), or account for multiple receivers etc.

[1]: https://en.m.wikipedia.org/wiki/Token_bucket




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: