How Storefront API limit works ?

TheCodeLover
Shopify Partner
15 0 0

Hello, I am working Storefront API. But I am little confused about Storefront API rate limit. 

From Shopify:

Storefront API uses aleaky bucket algorithmto enforce itsrate limit. Unlike most Shopify APIs, however, this limit is enforced on the IP address of the buyer, not the ID of the merchant’s shop.

 

Storefront APITime-based limitminimum 0.5s per request, 60s per user IPminimum 0.5s per request, 120s per user IP

 

Here, I understand It's time based limit. Minimum 0.5s per request and 60s per user IP. What that means ? User can't send 120(120x0.5) request for 1 day or 1 minute ?

Can anyone explain what is the limit ? 

Thank you

http://shopifydevs.com
0 Likes
Jason
Shopify Expert
10354 155 1990

There's a bucket example in that page you linked to:

 

Bucket limit example

Suppose the client makes several parallel API requests when a user loads your app:

  • 20 simple queries that each take 0.5 seconds or less
  • 15 more complex queries that take 1 second each
  • 10 highly complex queries that take 2 seconds each

The total cost would be: (20 ⨉ 0.5) + (15 ⨉ 1.0) + (10 ⨉ 2.0) = 45 seconds.

In this scenario you would still have 15 seconds’ worth of queries available.

The bucket leaks giving you more time to make further calls so this isn't a blocker on a day level or anything that extreme. Does that help?

I jump on these forums to help and share some insights. Not looking to be hired, and not looking for work.

Don't hand out staff invites or give admin password to forum members unless absolutely needed. In most cases the help you need can be handled without that.


★ http://freakdesign.com.au ★
0 Likes