Apr 18, 2022
Hi Mukarram,
What you're approaching is a specific form of Fixed Window rate limiting on the user level. You can also increase the efficiency of the algorithm you explained using callbacks. You can follow this article to read more about it.
https://dev.to/satrobit/rate-limiting-using-the-fixed-window-algorithm-2hgm