Answer the question
In order to leave comments, you need to log in
How to implement a limit on the number of requests to the API?
Good afternoon. I was interested in one question in terms of creating an API web server. How is the limit on the number of requests (per minute, per hour) from one client to the API most often implemented. In which direction to dig and where can I find information on this issue?
Answer the question
In order to leave comments, you need to log in
Everything is simple here:
Each request is recorded in a database table (preferably in Redis): [IP], [login], [timestamp], [number of requests per hour].
Exceeding the required threshold - blocking access to the API by making an entry in the BAN table: [login / IP], [time to allow access]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question