news.volyx.in

Give me /events, not webhooks (blog.syncinc.so)

568 points by todsacerdoti · 1900 days ago · 313 comments on HN

Article summary

The article discusses the trade-offs between using webhooks and polling for retrieving events from an API. While the article's content is not available, the comments suggest that the author may be advocating for polling over webhooks. The discussion revolves around the pros and cons of each approach, including considerations of complexity, scalability, and latency. The comments also touch on the role of long-polling, websockets, and server-sent events as alternative solutions.

Main themes

  • webhooks vs polling
  • long-polling
  • websockets and server-sent events
  • event retrieval strategies
  • latency and scalability
  • API design and complexity

What commenters say

  • Polling can be more complex to set up than webhooks, but it provides more control over event retrieval.
  • Webhooks can be more efficient than polling for frequent events, but may not be suitable for infrequent or latency-sensitive events.
  • Long-polling can be a viable alternative to webhooks, but it may not be scalable or efficient in all situations.
  • The choice between webhooks and polling depends on the specific use case and requirements, including considerations of latency, scalability, and complexity.
  • Some argue that websockets or server-sent events are better solutions than long-polling for real-time event retrieval.
  • Firewalls and network issues can cause problems with persistent connections, making webhooks or polling more reliable in some cases.
  • The cost of maintaining a persistent connection can be negligible compared to the cost of repeatedly establishing a connection and TLS.
  • Infrequent but latency-sensitive events are a common use case where webhooks or long polling may be necessary.