🔄 System Design · System Building Blocks
Synchronous vs Asynchronous
Synchronous work waits for a result; asynchronous work can continue independently.
Choose based on whether the next step needs the result immediately.
Payment authorization is synchronous; sending a receipt email can be asynchronous.
💡 Synchronous is waiting on hold until the agent answers; asynchronous is leaving a message and getting on with your day.
💡 Why it matters
Some steps truly need their answer before anything else can happen, while others can safely run later. Choosing wrongly makes users wait for things that could have waited, or lets important checks slip by unconfirmed. Getting this choice right is the key to apps that feel fast without losing correctness.
🛠️ How to achieve it
⚠️ Signs of trouble
- •Users wait for tasks whose result they do not need yet.
- •A critical check is done async and failures go unnoticed.
- •The interface freezes while a slow call completes.
- •Background work finishes but the user is never told.
🎯 Quick check
Score: 0/3Three questions to test the idea.
1. How do you decide between synchronous and asynchronous?
Answer: Whether the next step needs the result immediately
If the result is needed to continue, do it synchronously; otherwise it can run asynchronously.
2. Which task is best done synchronously?
Answer: Payment authorization before confirming an order
You must know the payment succeeded before telling the user, so it has to be synchronous.
3. What is the risk of making a critical check asynchronous?
Answer: You may tell the user it succeeded before it actually did
Deferring a must-have check means failures can slip by after you already confirmed success.
