Q19: What is the difference between synchronous and asynchronous communication?
Synchronous communication, such as a direct HTTP request, lets the caller wait for a response and is straightforward for immediate queries. Asynchronous communication, often through a queue or event bus, decouples producer and consumer timing and absorbs bursts, but adds delivery, ordering, retry, and observability concerns. Use synchronous calls for immediate results and asynchronous workflows for background work or loose coupling.
Key Takeaways
- Synchronous calls are direct; asynchronous messaging decouples time and availability.
- Async does not eliminate failures—it changes how they are handled.