Hey John! Great article!
However, I noticed you are performing a bunch of operations before responding to the Shopify webhook(I assume the Next.JS application will be used as the URL endpoint for the shopify webhook)! The problem is that Shopify webhook times out after 5 seconds. Performing API requests before responding to the webhook would cause havoc! Typically, When working with webhooks, I use a service Hookdeck to manage all my webhook connections, It automatically responds to incoming webhooks(disclaimer: I work at hookdeck,) I think it is a really cool service! I am open to chatting more about webhooks/Hookdeck, Best
Hey there, thanks for the feedback! I'm curious - I've not run into issues with the webhook going any kind of havoc in my setup. What kind of problems are you referring to?
The Havoc -- Your Webhooks would get lost! When working with webhooks, especially Shopify's which has a very short timeout period, you would want to delay processing. Queue First, Ask Questions later! Shopify expects a 200 OK response within 5 seconds, You can’t be certain that your API call would be completed in less than five seconds. Hookdeck responds to your webhook provider immediately & forwards the payload to your destination(Local webserver) for futher processing. Here is a guide I wrote about Shopify webhooks
Hey, sorry for coming back late! I've tweaked around and observed for a while and also tried out Hookdeck! Awesome product, I must say. I like the idea.
Right now, the load on my Shopify instance and API is low (small shop) - responses are currently under 5 seconds and produce no issues so far. I might run into some at some point, though, and will certainly come back at Hookdeck in that case :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey John! Great article!
However, I noticed you are performing a bunch of operations before responding to the Shopify webhook(I assume the Next.JS application will be used as the URL endpoint for the shopify webhook)! The problem is that Shopify webhook times out after 5 seconds. Performing API requests before responding to the webhook would cause havoc! Typically, When working with webhooks, I use a service Hookdeck to manage all my webhook connections, It automatically responds to incoming webhooks(disclaimer: I work at hookdeck,) I think it is a really cool service! I am open to chatting more about webhooks/Hookdeck, Best
Hey there, thanks for the feedback! I'm curious - I've not run into issues with the webhook going any kind of havoc in my setup. What kind of problems are you referring to?
The Havoc -- Your Webhooks would get lost! When working with webhooks, especially Shopify's which has a very short timeout period, you would want to delay processing. Queue First, Ask Questions later! Shopify expects a 200 OK response within 5 seconds, You can’t be certain that your API call would be completed in less than five seconds. Hookdeck responds to your webhook provider immediately & forwards the payload to your destination(Local webserver) for futher processing. Here is a guide I wrote about Shopify webhooks
Hey, sorry for coming back late! I've tweaked around and observed for a while and also tried out Hookdeck! Awesome product, I must say. I like the idea.
Right now, the load on my Shopify instance and API is low (small shop) - responses are currently under 5 seconds and produce no issues so far. I might run into some at some point, though, and will certainly come back at Hookdeck in that case :)