jargon

Comparison

Long pollingvsWebhook

Long polling

the client makes a request and you hold it open for thirty seconds, only answering when something actually happens.

Holding a request open until data is available or a timeout expires, then having the client immediately reconnect. It gives near-real-time delivery over plain HTTP with no protocol upgrade. It consumes a connection and often a server thread per waiting client, which is why it scales far better on async runtimes than on thread-per-request ones.

Full entry →

Webhook

instead of your client polling for changes, you POST to a URL they gave you whenever something happens.

A server-to-server HTTP callback delivered on an event. It removes polling latency and load. It makes you a client of an endpoint you do not control, so you need retries with backoff, a signature so the receiver can verify the payload, and at-least-once semantics that receivers must deduplicate.

Full entry →

Related comparisons