With a 1 second sleep between requests, I can however complete the task. While I’m iterating on the chunks of 1000 profiles (using the `marker` parameter) I find that if I don’t rate limit my requests at all, I get a 429 (request throttled) after about 45 requests (out of the 50 I need). I’m trying to download the full content of a list containing about 50K profiles, using the “Get List Members” endpoint: I’ve also included some additional Community posts below that sound similar to the situation you are facing and hoping the discussions in them could help shed some additional light on your issue! In addition, I suggest including a one or two second pause made between each call as making these quick calls in succession can at times be known to cause a similar issue where these calls are being bunched together and potentially run into a race condition. To test this, I would suggest using a different network to make these calls such as through a VPN. However in the backend, it would be blocked and you’ll notice the user was not actually subscribed to the list. The call to the list endpoint will return a 200 code indicating the call was made successfully as it was understood correctly. When you hit the rate limit, you’ll receive a response code for a 429 error. Whereas you won’t receive any errors with our list bomb limit. One of the differences you’ll see between your calls being rate limited and hitting the list bombing limit is that you’ll actually receive an appropriate response code for the rate limit. This is to prevent malicious actors or bots from bloating and inflating your email lists. Although the API can handle these limits, Klaviyo is suspect of these calls as they all originate from the same source. I’ve seen this happen when users are self testing in an attempt to simulate live traffic through their own system. When Klaviyo detects a large number of calls originating from the same IP address attempting to hit our list endpoint, the system will prevent these calls from fully going through. In my experience, instead of hitting our API rate limit, I suspect you may actually be hitting Klaviyo’s list bomb limits since you’re hitting the list endpoint multiple times. When I am testing, I might use the service 5 times in 5 seconds, something like that - it’s a little more load than we would expect to receive from our organic traffic, but it only happens as fast as I can open links - there’s no bot that is running up hundreds of requests per second, or something like that.ĭoes it seem plausible to you that I would run up against the rate limits sending volume like this, which might amount to a handful of request per second? If not, then I guess we have a bug in our application and are sending many more than we realize.įrom your explanation, it certainly doesn’t sound like you should be hitting the API rate limit. Klaviyo’s rate limits are in line with industry standard limits similar to those of Google (2-20 calls per second) or Shopify (2-4 calls per second). So in total, there are perhaps 4 requests to the Klaviyo API per “usage”. We send an event with a small(maybe 200 characters in total) JSON payload - per usage of the service to the events endpoint.Because of the find-or-create pattern here, this involves 2 or 3 API calls to the list endpoint. If the relevant list does not exist, then we create the list and add them to it. A users clicks on our service - we add them to a list.Are there any optimizations to our flows that we could try?įor some more context, here is the flow of API requests:. Are there some tips/best practices on any particular kinds of API requests to avoid (because the rate-limit on that resource is smaller than the others)?.Are there pricing options offered that would increase our rate-limits?. What I saw in the documentation about this issue is to utilize exponential backoff - while a great suggestion, the necessity of this while our volume is still small would suggest that we are already bumping up against performance limits, that we would have to find some solution to this - which could look like paying more money to increase the rate limits, optimize our usage of the API/avoid duplicative requests, or something else. We are hitting the lists endpoint as well as the events endpoint each time we have a trigger event. The volume of usage of our service is pretty small, but we do envision scaling in the future. We’re using the node-klaviyo package in NPM. Hi! We’ve been getting some rate limiting errors in our logs.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |