Back to Journal
#17 Jun 01, 2025 notes

Understanding Sockets and Async Architectures

How sockets work and the difference between sync and async connections

![[Pasted image 20250601073604.png]] Everytime a client connects, a new socket is created. Usually each connection/socket is a seperate thread/process in the case of synchronous connections.

Async architectures are more event-driven, an event loop (single thread or multiple few ones) will handle a large number of sockets or connections, and delegate long running tasks and IO to background workers.