Next level is to queue up jobs to process each webhook. You could exhaust the http connection pool if you get hammered with webhooks. Also, Stripe webhooks timeout (and retry!) if it takes a couple of seconds to process them.
I tend to persist the webhook payload in the DB and process it async. It makes debugging and replaying way easier.
Thank you for sharing!
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.
This is better indeed.
Next level is to queue up jobs to process each webhook. You could exhaust the http connection pool if you get hammered with webhooks. Also, Stripe webhooks timeout (and retry!) if it takes a couple of seconds to process them.
I tend to persist the webhook payload in the DB and process it async. It makes debugging and replaying way easier.
Thank you for sharing!