SpaceyaTech / mastori

Mastori is a community-driven open-source project that aims to provide a simple and efficient blogging platform built for the Dev Community
https://www.spaceyatech.com/
22 stars 54 forks source link

Api Throttling #77

Closed JimmyTron closed 1 year ago

JimmyTron commented 1 year ago

API throttling is the process of limiting the number of API requests a user can make in a certain period. An application programming interface (API) functions as a gateway between a user and a software application.

While there are various algorithms for API throttling, here are the basic steps in any API throttling algorithm:

A client/user calls an API that interfaces with a web service or application. The API throttling logic checks if the current request exceeds the allowed number of API calls. If the request is within limits, the API performs as usual and completes the user’s task. If the request exceeds the limit, the API returns an error response to the user. The user will have to wait for a pre-agreed time period, or pay to make any more API calls.