Someone is always getting blocked

· Source: Hussein Nasser · Field: Technology & Digital — Software Development & Engineering, Cloud Computing & IT Infrastructure · Depth: Intermediate, quick

Summary

The asynchronous I/O model fundamentally involves offloading blocking read operations to another entity, typically the kernel, which ultimately performs the synchronous task. This means that while an application might appear asynchronous, the underlying system still handles synchronous operations, effectively "paying the price" for blocking. NodeJS is noted for supporting I/O ranging, a concept relevant to managing these operations. Prior to version 18, PostgreSQL handled client connections by spinning up a dedicated process, referred to as a "backend" in PostgreSQL terminology, for each new client session. This "backend" is a specific process created upon connection, distinct from an application's backend.

Key takeaway

For software engineers optimizing backend infrastructure, understanding that asynchronous I/O merely offloads synchronous blocking operations to the kernel is crucial for debugging performance bottlenecks. If you are working with PostgreSQL, be aware that prior to version 18, each client connection created a dedicated "backend" process. This distinction is vital for correctly interpreting resource usage and scaling strategies, especially when integrating with systems like NodeJS that manage I/O ranging.

Key insights

True asynchronous I/O offloads blocking tasks to a lower layer, like the kernel, which still performs synchronous operations.

Principles

In practice

Topics

Best for: Software Engineer, Data Engineer, DevOps Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Hussein Nasser.