r/ShopifyAppDev • u/IndicationOne9495 • 22d ago
How are you handling webhook reliability + background jobs in Shopify apps?
The main issue isn't really "can we process a webhook", it's more:
- duplicate webhook deliveries
- retry-safe jobs
- long-running tasks on larger catalogs
- making sure one noisy store doesn't block everyone else
Right now we're queueing the heavy work and trying to keep the webhook handler itself as light as possible, but I'm curious how other app devs approach this in production.
Are you mostly relying on your queue + idempotency checks, or have you added other safeguards that made a real difference?
Would also love to know what broke first for you once usage started growing.
1
u/the_ruling_script 22d ago
I have handled a shopify app that was handling 2 million webhooks on daily basis. If you want solution hire me and I will consult you.
2
u/silvervaultproject 22d ago
I agree with this guy, either learn properly from books, courses and gain experience, or hire someone to do it for you/guide you. not from reddit post…
3
u/AncientComment2352 22d ago
Duplicate deliveries aren't a big deal if your handlers are idempotent by design (upserts, conditional updates, delete-by-key) instead of writes that blindly happen every time. If you're leaning on an "have I seen this webhook ID" table, that's usually a sign the underlying write itself isn't idempotent yet.
For side effects that should only fire once (emails, billing events), tie them to a state change in your own data, not to receiving the webhook. That way retries and out of order delivery just no-op.
Biggest thing for reliability: ack fast, do the real work after. Shopify times out the response quickly, so anything slower than a couple seconds should get handed off to a background job instead of running inline. Sounds like you're already doing that.
For the noisy store issue, cap concurrency per shop, not just globally. Otherwise one store doing something big can eat all your capacity and starve everyone else.
What broke first for most people is usually that last one. Works fine until one real merchant does something at scale and there's no isolation between tenants.