Backend Engineering
brian | Published: Feb. 22, 2024, 12:41 p.m. | Updated: May 25, 2025, 8:01 p.m.
Synchronous vs Asynchronous Workloads
In short, Synchronous workloads are executed in a sequential manner, and Asynchronous workloads allow tasks to be performed independently.
Synchronus Workloads
In synchronous workloads, when the caller makes request to the receiver, the client is blocked from making more requests until the receiver is done processing their original request and has sent back the response.
Example: In django, when you make a request to the application, you're blocked from making more requests until the requests is processed and you receive a response back. By default this is how django works, they are synchronus. One thing to mention is that you can use third party libraries to be able to use asynchronous views and achieve asynchronous workloads.
Benefits: Simple to use, predictable, and resource efficent
Asynchronus Workloads
In asynchronous worloads, when the caller makes a request to the receiver, the caller can do other things while it waits for a response back. For example, let's say that you want to fetch something from the database, and so you make that request and then while you're waiting to get a response, you can do other things.
Example: lets say that you're using a mesaging app, and you send a message. When you send that message you're free to do other things, and you are able to send more messages and also receive messages because you were not blocked from doing so.