![]() ![]() When a message from the throttled queue is processed, and it doesn’t face a 429 error, the queue for that particular integration is resumed at a normal processing rate immediately. If the queue remains throttled for 36 hrs continuously, we flush all the messages that are older than 36 hrs. If the error continues to appear after 30 min, we keep retrying after every 30 mins. 2 min, 4 min, 8 min, 16 min up until 30 min. If the 429 error still appears after 1 min, we keep throttling the queue based on powers of 2 i.e. If the Retry-After header doesn’t appear, the queue is still throttled for 1 min. This means that the requests waiting on the queue of this specific integration are not sent out for execution for 1 min. If it is present, we throttle the queue of that specific integration by the value of the header e.g. If the rate limit is reached and the server responds with a 429 (Too Many Requests) status code, we check whether the Retry-After header is also present on the response. So that when one job is being executed, the rest of them wait in the queue. It is important to know that each integration on Integry gets a separate queue which is used to execute all of its jobs so that it does not negatively affect the processing rate of any other integration on the system. Integry implements request throttling in response to API rate limits when they are reached. How we Throttle Requests in Response to API Rate Limits It also helps in enhancing performance and improving the end-user experience by making sure that a single user is not suffocating your applications. Throttling offers an extra layer of protection for your backend resources to which APIs are a gateway. You can define throttling at the application level and API level. Throttling is a process that is used to control the usage of APIs by consumers during a given time period. Usually, this error is a response with a 429 status code which is for “Too Many Requests”. For example, if an API rate limit is set to be 100 requests per minute and if that number is ever exceeded, it will generate an error response that the API limit for a time period is reached and ask the requester to retry after a specific time period. Rate limits control the amount of incoming or outgoing traffic to or from a network. Rate limiting also helps make your API scalable, otherwise, there can be unexpected spikes in traffic, causing severe lag time. They can protect you against slow performance and denial of service attacks. This is called throttling.ĪPI rate limits ensure the safety of the API. So in order to follow the rate limit, we need to slow down the rate at which we send requests. If we ignore these limits, the server might ignore our requests or our API calls may altogether fail. Let’s brush up on some basic information before getting into how Integry responds to API rate limits by request throttling.ĪPIs have rate limits that determine the number of API calls that can be sent to them in a certain amount of time. ![]()
0 Comments
Leave a Reply. |