How can multiple webhooks operate at the same time with rate limits?

Solved

How can multiple webhooks operate at the same time with rate limits?

appstarter123
Shopify Partner
13 0 0

Hello,

 

I know sites where you can connect your shop and then it creates webhooks. (www.myshop.de/admin/2023-04/webhooks.json). So when 100x people connect their shop at the same time at the rate limit are 2 request per second ? how the site owner can create 100x webhooks at the same time ? Or maybe you recieve 75 concurrent webhooks maybe a product was created then you recieve it on your webhook is the rate limit now 2 request per seconds ? So whats the sense of the webhook then ? Thats normal that you recieve more than 10 webhook actions per second if you have 10k users who connected their shop and listen for events maybe product created or sold.

Accepted Solution (1)

PaulNewton
Shopify Partner
6360 583 1357

This is an accepted solution.

From the shopify dev docs:

REST Admin API rate limits are based on the combination of the app and store.


Concept clarification the rate is a leak rate of 2 per second 

https://shopify.dev/docs/api/usage/rate-limits#rest-admin-api-rate-limits  

The "Bucket" size is 40 requests/app/store per app per store per minute aka the burst rate which can be found through in the response header(s).

https://shopify.dev/docs/api/usage/rate-limits#rate-limits-header 

That's for requests your app makes, not for what shopify may send out.

 

 

To handle incoming webhooks use a message queue to schedule jobs instead of real time processing when the message is received.

Getting flooded is a common discussion on forums you can research.

Example https://community.shopify.com/c/shopify-apis-and-sdks/rate-limiting-shopify-webhook-events-on-import... 

Save time & money ,Ask Questions The Smart Way


Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Buy Paul a Coffee for more answers or donate to eff.org


View solution in original post

Reply 1 (1)

PaulNewton
Shopify Partner
6360 583 1357

This is an accepted solution.

From the shopify dev docs:

REST Admin API rate limits are based on the combination of the app and store.


Concept clarification the rate is a leak rate of 2 per second 

https://shopify.dev/docs/api/usage/rate-limits#rest-admin-api-rate-limits  

The "Bucket" size is 40 requests/app/store per app per store per minute aka the burst rate which can be found through in the response header(s).

https://shopify.dev/docs/api/usage/rate-limits#rate-limits-header 

That's for requests your app makes, not for what shopify may send out.

 

 

To handle incoming webhooks use a message queue to schedule jobs instead of real time processing when the message is received.

Getting flooded is a common discussion on forums you can research.

Example https://community.shopify.com/c/shopify-apis-and-sdks/rate-limiting-shopify-webhook-events-on-import... 

Save time & money ,Ask Questions The Smart Way


Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Buy Paul a Coffee for more answers or donate to eff.org