Unlimited Design & Technology

APIs and Integration

Choose polling or webhooks from operational needs

Polling and webhooks move cost and failure handling to different places. Choose from freshness requirements, sender capabilities, network constraints, and the recovery process your operations team can actually support.

UDT InsightsJan 14, 2021
A colleague compares a polling clock with an incoming webhook above a balance. A colleague considers the scene with folded arms.

A dashboard does not always need an immediate update. A dispatch decision might. Choosing an integration pattern without this distinction can create unnecessary traffic or hidden delays. Begin with the business decision that needs fresh data and the maximum delay that decision can tolerate.

Compare responsibilities, not fashion

Polling means the consumer asks for changes on a schedule. A webhook means the producer sends a notification to a receiving endpoint. GitHub recommends webhooks instead of polling for its API, while providing efficiency guidance when polling remains necessary.[6] Treat that as GitHub-specific advice, not a rule for every integration.

Polling gives your team control over request timing, but someone must manage intervals, paging, and checkpoints. Webhooks require a reachable receiving path and a way to authenticate notifications. The right choice depends on provider features and operational constraints, not whether one pattern sounds more modern.

Plan for missed and repeated observations

Stripe documents duplicate webhook deliveries and delivery without a guaranteed event order.[4] Those properties require a suitable consumer design for that provider. Do not assume a webhook channel is a complete, ordered business ledger unless the producer explicitly provides that contract.

Recommend reconciliation when missing a change would harm operations. A scheduled comparison can detect a difference between local and source state. Define the authoritative source and the repair process. Conversely, a polling design must explain whether its query can find changes that happen between polls, including deletions or transitions that disappear from current-state results.

For reconciliation, define the comparison window and escalation rule before a discrepancy appears. Otherwise the secondary path may collect differences without giving anyone authority to repair them.

Use a concrete selection checklist

Estimate normal volume and catch-up volume after an outage. Evaluate the team that will own failures, not only the development team. A hybrid can improve recoverability, but it also creates two paths that must share identifiers and avoid duplicate business actions.

  • Specify acceptable data age for each business decision.
  • Check webhook authentication, retry rules, event identity, and retention.
  • Check polling filters, pagination, rate limits, and deletion visibility.
  • Define outage catch-up, reconciliation ownership, and alert thresholds.

Hypothetical example: a service appointment board

Hypothetical example: a service company refreshes a planning board periodically because dispatchers do not act on second-by-second changes. It chooses polling with a saved checkpoint and displays the last successful refresh. Urgent cancellations use a webhook channel where the provider supports one.

A reconciliation job compares upcoming appointments and flags disagreements. This design needs both paths to use the same appointment identity. It does not promise instant updates when either provider access or connectivity fails. The next action is to write the tolerated delay beside each workflow, then test recovery after a deliberately interrupted connection before committing to the pattern.

References

Discuss your next project

Talk with UDT about your needs and the next practical step.

Contact UDT
Zalo