Webhooks vs API Pooling

Profile Pic of Pranit Bauva Pranit Bauva

If a reporting manager has two direct reports, which is more effective for communication:

  1. Ask what’s happening with individual tasks, the progress, the blockers, the risks, the nuances, and many more things now and then. Or,
  2. Help the direct reports understand what needs to be communicated and listen to those events as and when they happen.

The first approach has a lot of overhead and can often feel tiring. Sometimes even distrustful. It would certainly end up in a breakdown when there are many direct reports. One could also hear the whispers of micro-management in select cases.

The second approach feels more liberating for everyone involved. It reduces overhead, builds trust, and things move quicker in the right direction.

If the difference between the two approaches is clear, then one has understood the difference between API pooling and webhooks, which is how servers talk to one another. API pooling is the first approach while webhooks are the second approach.

Let’s say a customer is doing 10k payments a day and they keep pooling every half an hour for the entire day’s payment statuses. That’s 48 fetches i.e. 480k requests/day. For all the API fetches, there are going to be database calls, cache calls, and many more. Suddenly one needs a bigger DB, more servers. Suppose many customers start doing the same. Now the situation becomes such that the system has to handle 50x the amount of load. The problem is that the more number of customers you onboard, the worse it keeps getting.

One often hears about how to identify customers who are most likely to churn. If your business depends on either APIs or webhooks, understanding which customers are pooling and which customers trust your webhooks becomes paramount. They often serve as a smoke signal because there have been incidences of missing crucial information that the other party relied on. A sign that something needs to be fixed because they can get fed up and leave.

If ignored for too long, it ends up showing in all sorts of different places, the app feels laggy, and payments are not being confirmed, that CI builds are not initiating, there is an information mis-match between different systems, and many more.

If the webhook delivery is not reliable and secure, API pooling is how you get the job done.

BUT AT WHAT COST?