API Design · Senior · Question 51 of 75
How do you choose between webhooks, SSE, WebSockets and polling for delivering updates?
- 1Always polling
- 2Always WebSockets
- ✓Correct answer: Webhooks for server-to-server events, SSE for one-way updates to browsers, WebSockets for two-way interaction, polling when simplicity matters and delays are fine
Explanation
Consider infrastructure too: SSE works through most proxies as plain HTTP; WebSockets need connection-aware load balancing.