The Backend Revolution or Why io_uring Is So Important.

Sergiy Yevtushenko
7 min readJun 3, 2020

Not so many backend (and application in general) developers watching development of Linux kernel. But those who do, definitely noticed appearance and rapid development of io_uring. For those who is not aware what it is I’ll provide brief introduction below. But main topic of this post not the io_uring itself. Instead I want to show you that we are watching the beginning of the real revolution in backend development.

I/O Anatomy of The Backend

As I’ve explained in the article dedicated to Data Dependency Graph, each backend application at very high level has only three parts — set of inputs, set of outputs and set of transformations from inputs to outputs:

This is rather logical view, since it presents logical meaning of inputs and outputs from the point of view of the architecture of the application. In other words, it preserves inputs and outputs as we see them while designing and implementing the application. Nevertheless, if we look at the same application from the low level I/O perspective, we quickly realize that every input, output or internal communication (calls to other services located outside our application) in fact consists of both, input and output. How this happens? Lets take a look at, for example, REST entry point: it receives request from client (input part), processes it and sends response (output part). Same is true for every other point where we interacting with world outside the application.
Lets try to draw a diagram with I/O which happens during processing of request of very simple REST entry point. This entry point prepares arguments from incoming request, calls external service, formats response and sends it back. All I/O inputs (i.e. where data received) I’ll keep pointing to left and all I/O outputs (i.e. where data sent) will point to right:

Vertical lines depict interaction between application and external world, i.e. I/O operations.
Now lets ignore for the moment that all steps in this diagram are logically belong to same request and focus only on the I/O:

Some important observations:

  • From the point of view of I/O application has much more inputs and outputs that we usually taking into account at logical…

--

--