7 ms·
> I wonder if io_uring could be used to issue a single syscall that would read data from disk (actually using page cache) and send it on the network. Only if y
by Matthias247 4y ago
> I wonder if io_uring could be used to issue a single syscall that would read data from disk (actually using page cache) and send it on the network.
Only if you don't care about HTTP/2 and TLS. And if you don't care about those, you can as well do sendfile() from a thread.
- xena 4y agoMy site does serve itself out of a UNIX socket, so sendfile() may actually work. But most of the data is served with handler functions though.
- toast0 4y agoYou can do kernel TLS for sendfile at least, maybe for io_uring too? Probably not for HTTP/2, but I'm not convinced multiplexed tcp in tcp is a good protocol for the public internet anyway.
- Matthias247 4y agoThat's indeed possible, if one has a TLS stack which supports KTLS. I however don't think there's not too many of those yet, and probably even less so in Rust where both the library and a potential Rust wrapper would need to support it.