Polling
What is Polling?
Polling: repeatedly checking a resource at regular intervals to detect changes, as opposed to being notified (push). Polling is simpler to implement but less efficient. Polling means checking something repeatedly at an interval to see whether it changed: asking an API every minute whether an order shipped, or a browser asking the server every few seconds for new messages.
Frequently asked questions about Polling
How is Polling used in practice?
It is simple to build and works with almost any system, which is why it is common. The downsides are delay, because changes are only noticed at the next check, and waste, because most checks find nothing new.
What should you keep in mind with Polling?
The alternatives are push mechanisms. Webhooks let another system call you when something happens, and WebSockets or server-sent events let a server push updates to a browser. Polling is still fine for slow-changing data and simple integrations. Choose an interval that matches how fresh the data must be, and respect rate limits of the system you are polling.
At a glance
| Category | Core glossary |
|---|---|
| Explained by | Reinier de la Parra |
| Updated |