Architecture

Webhooks, polling or a nightly sync? How to choose how your systems talk

Every integration has to decide how one system finds out that another has changed. Webhooks, polling and nightly syncs each fit different jobs, and the ones that hold up in production usually combine two.

A delivered parcel waiting by a front door. Headline: Doorbell, mailbox or the morning drop?

Every integration answers one question before it answers anything else: when something changes in one system, how does the other system find out? There are three common answers, and most broken integrations picked the wrong one, or picked only one when they needed two.

Here they are in plain English, with when each one fits and what goes wrong with it.

Timeline diagram: four orders placed between 9 am and 5 pm. Webhooks deliver each within seconds, polling every 30 minutes delivers each at the next check, and a nightly sync delivers all four at 2 am.
The same four orders, three ways to sync them. The difference is how long the other system waits, and how much work it does to find out.

Webhooks: the doorbell

With a webhook, the system where something happened tells the other system, within seconds. Shopify, Stripe, QuickBooks Online and most modern tools can send one when an order is placed, a payment clears or a record changes.

  • Strengths: close to real time, and no wasted work checking for changes that didn’t happen.
  • Weaknesses: the receiving end has to be online to answer the door, and providers don’t promise every message arrives exactly once, or in order.
The detail most builds miss

Webhook providers retry when they don’t get a quick reply, which means the same event can arrive twice. Every handler must be idempotent: processing the same event a second time has to change nothing. Otherwise a retry creates a duplicate invoice or charges a fee twice.

Polling: checking the mailbox

With polling, your integration asks the other system on a schedule: “anything new since 2:30?” It’s what you use when a system doesn’t send webhooks, or doesn’t send them for the record you care about.

  • Strengths: simple, predictable, and nothing is lost if your side was offline for a while; the next check catches up.
  • Weaknesses: there’s always a delay, and frequent polling eats into API rate limits even when nothing has changed.

Good polling remembers a cursor, usually the last “modified at” timestamp it saw, and asks only for records changed since then. Bad polling downloads everything every time and slowly gets throttled.

Nightly sync: the weekly delivery

A batch job runs once, usually overnight, and moves everything that changed that day in one go. Many accounting and reporting connections should work this way.

  • Strengths: the simplest to build and run, gentle on API limits, and easy to rerun if something goes wrong.
  • Weaknesses: nobody sees today’s changes until tomorrow, and one bad record can hold up a whole batch if errors aren’t handled per record.

Side by side

Webhook Polling Nightly sync
How fast Seconds Minutes, set by you Next morning
Load on the API Low Medium to high Low, in one burst
If your side is down Retries, then lost Catches up next run Rerun the batch
Main risk Duplicates and missed events Rate limits Stale data
Good for Orders, payments, new leads Systems without webhooks Accounting, reporting, bulk updates

The answer is usually two of them

The integrations that hold up in practice combine a fast path with a safety net: webhooks for speed, plus a scheduled sweep that catches anything the webhooks missed.

  1. Webhooks handle the normal case within seconds.
  2. Every few hours, or nightly, a sweep asks “what changed since the last sweep?” and fills any gaps.
  3. Because both paths are idempotent, an event that arrives through both changes nothing the second time.

That design survives the realities of production: a webhook endpoint that was down during a deploy, a provider outage, a message that arrived out of order.

How to decide quickly

Ask one question per record type: how long can a person wait before a stale copy causes a real problem? Seconds means webhooks plus a sweep. An hour means polling. Tomorrow is fine means a nightly sync.

Questions to ask about any existing integration

  • If the receiving system is down for an hour, what happens to the changes made during that hour?
  • If the same event arrives twice, do you get two records?
  • Where can a person see what synced, what failed and why?
  • How close are you to the API’s rate limits on your busiest day?

If nobody can answer these, the integration works until the day it doesn’t, and nobody will know which records went missing.

Tell us where the work gets stuck.

Send a few lines about the systems you use and the part that keeps breaking. We read every message and reply within one business day.

Talk to usOr book a call

Based in the Quad Cities. Working with teams here and further away.

Privacy preferences

You make the call.

Browsing and contacting us work with analytics switched off. Your choice applies to this browser for 180 days; you can change it at any time.

Essential functions

Security, form protection, and saving your privacy choice. The motion control also remembers your preference.

Always available

Privacy policy · Cookie details