/plushcap/analysis/ably/webhooks-vs-websub

Webhooks vs WebSub - A comparison

What's this blog post about?

Webhooks and WebSub are both used for real-time updates but serve different purposes. Webhooks are user-defined Callback-URLs registered at a service provider's platform to receive information about events. They are generally used when there is one subscriber (company or a domain) that needs to be notified of events related to their business/domain playing out on different providers. Webhooks function in near real-time, are loosely coupled, and can handle downtime well. However, they can be difficult to debug and are susceptible to DDoS attacks. WebSub, on the other hand, is a network of Publishers, Subscribers, and Hubs that make it possible to share content over the internet securely. The Publisher is the content producer, the Subscriber the content consumer, and the Hub the content distributor. WebSub has an in-built security mechanism for sharing, accepting, and distributing content more securely between publishers and subscribers. It's ideal for broadcasting public information/data from a single publisher to millions of subscribers via hub. The choice between Webhooks and WebSub depends on the use case. Webhooks are better for event-driven notification systems where the consumer needs to be notified on every event occurrence with their account at the providers' platform. Examples include payment gateways, email providers, SMS & calling service provider, analytics platforms, and microservices. WebSub is better for use-cases such as broadcasting public information/data from a single publisher (or small number of publishers) to millions of subscribers via hub. It's ideal for platforms that frequently generate or update new content, like news aggregators, podcast networks, publishers, streaming services, etc.

Company
Ably

Date published
Jan. 28, 2020

Author(s)
Eve Martin

Word count
2216

Language
English

Hacker News points
None found.


By Matt Makai. 2021-2024.