I remember a story about a solo founder.
He was sitting in a coffee shop on a Tuesday morning. He had just ordered a coffee and was waiting for an important email. It was from the company whose data he'd been pulling for a week.
Your account will be suspended in 24 hours.
He had built a small thing. A flow that checked a website every five seconds to see if anything new had shown up. Just in case. Just to be safe. He'd left it running.
By the time he got the email, his flow had asked the same question seventeen million times in seven days. Almost every answer was "nothing new." The company noticed. They were not pleased.
He sat there with his coffee going cold and the inside of his stomach going hot. He had done nothing wrong, in a way. He had just picked the wrong way for his app to talk to theirs.
This post is about how to not be that guy.
There are three ways one app can communicate with another app. A lot of posts only talk about two of them. That is why people get it wrong.
Here are all three ways explained, along with a way to choose between them.
If you only have a minute, here are the three options:
The rest of this post explains each of these options in more detail.
The Restaurant Trick
Imagine you are in a restaurant. You are hungry. You want to know when your food is ready. There are three ways to find out:
You walk up to the counter and order. You wait. Then they hand you your food. This is like an API.
You walk up to the counter to order. Then walk back every two minutes to ask if your food is ready. You keep doing this until your food's ready. This is like polling.
You walk up to the order, and they give you a little buzzer. The buzzer rings when your food is ready. This is like a webhook.
All three ways can work. Which one is best depends on the situation. Does the restaurant have buzzers? Are you in a hurry? How often are you going to be hungry?
What Happens When You Choose the Wrong Option
If you choose the option, it can cost you time and money. You might not even realise what is happening until it is too late.
Asking the app for something too often can get you blocked. This is what happened to the founder. He asked the question seventeen million times in seven days, and the company blocked him.
Asking the app for something too rarely can mean you miss important information. If you only check every five minutes, you might miss something that happens during that time.
Relying on the buzzer can be risky. What if the buzzer fails? You might miss information.
Most of the time, the damage is hidden until it is too late.
Two Cases Where You Do Not Get to Choose
There are two cases where you do not get to choose between the three options.
Reddit does not have a buzzer. If you want to know when someone posts something on Reddit, you have to keep asking.
Stripe payments require a buzzer. If you handle payments through Stripe, you need to use a webhook.
Most of the time you can choose between the three options.. In these two cases, the choice is made for you.
How to Decide
Here are six questions to help you decide which option to use:
1. Does the other app have a buzzer? If not, you might need to use polling.
2. Do you need to know something away? If yes and a buzzer exists, use the buzzer.
3. How often does the information you need change? If it changes rarely, a buzzer might be the choice.
4. What does it cost you to miss some information? If it costs a lot, you might need to use both a buzzer and polling.
5. Do you only need to look something up? If yes, you can just use an API.
6. Are you happy to set up the stuff for a buzzer? If not, you might need to use polling.
If you need to know something away and a buzzer exists, use the buzzer.. If you also need to make sure you do not miss anything, you might need to use both a buzzer and polling.
A Pattern Beginners Miss
If the other app does not have a buzzer and asking for something often is too expensive, there is a third option. You can have the other app put information in a shared place like a Google Sheet. Then you can check that shared place on a schedule.
This way, you can build an automation that survives downtime on either side. It is also a way to build a paper trail because the shared place becomes your log.
Some Questions You Might Have
Is a buzzer an API? Not exactly. A buzzer uses the technology as an API, but it works in the opposite direction.
Should I check every minute? Use a buzzer? If a buzzer. You need to know something right away: use the buzzer. If not, the choice between checking every minute or every fifteen minutes is about money.
When is asking the app for something the only way? There are two cases. When there is no buzzer. When you need to control exactly when each question gets asked.
Can I use both a buzzer and polling at the same time? Yes you can. For anything that involves money, you probably should. The buzzer handles real-time information, and the polling catches anything the buzzer might miss.
The Truth
Most comparison posts you read are written by companies that sell one of the three options. They might not give you the story. Now you know the truth. You can choose the option for your situation.
There is a company called Svix that sells buzzer plumbing. The things they post about are mostly about buzzers. Then there are two companies called Merge and Unified that sell a mix of both.. Their posts are mostly about that too.
There is also a website called GeeksforGeeks where people can learn things to help them get a job.. It is not for someone who is trying to get a customer to sign up for something in a spreadsheet.
We do not sell any of the things that these companies sell.. We use all of them. When one of them stops working, we use the others to get things done. That is why this post has three rows in the table.
It is also why we made a decision tree based on what happens with our customers, not just what a book says. And that is why when people ask us "which one should I use?" we say "it depends." Then we help them figure out how to choose.
Most of the time, these choices seem like simple yes or no answers.. When you see one of them fail, it gets more complicated. They start to look like trade-offs. We have seen enough of them fail that we can advise about the trade-offs.
If you want to learn more, you can look at how to use webhooks for the buzzer side.. You can look at what an API is from the other side.
If something cannot be undone, like payments or deleting things, needs a human approval step in front. It does not matter how you do it; you just need to make sure you do not make a mistake that cannot be fixed.
So pick the one that works best for what you need to do. If it involves money, use two of them.
