DEV Community

Discussion on: Efficent webhook handling with Ruby on Rails

pcreux profile image
Philippe Creux

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!