3 ms·
I also prefer events over a persistent connection for efficiency, but webhooks are far better when the client is using a function as a service model.
by TheCycoONE 3y ago
I also prefer events over a persistent connection for efficiency, but webhooks are far better when the client is using a function as a service model.
- strken 3y agoMy experience is that if your server doesn't retry webhooks then you could be doing something more efficient, and if it does retry webhooks then that indicates it's important not to miss anything and you should use persistent events rather than relying on bug-prone "if there's a 200, drop the event from the DB" webhook retries from the server. I do think there's an argument for the interoperability of webhooks for integrating different services. I'm skeptical that they're the best choice from a purely technical perspective.
- simonw 3y agoRight: in this day and age there are an almost unlimited array of inexpensive, easy ways to spin up an HTTP endpoint that can receive a POST request. We have a lot of experience scaling those kinds of endpoints (and making them redundant) too. Spinning up an always-on server that can maintain a persistent connection - and reconnect automatically if it drops, and if the server is rebooted with an update and suchlike - is a whole lot harder. Possible, but not nearly as easy.