Hacker News new | ask | show | jobs
by Matthias247 1374 days 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.

2 comments

You 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.
That'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.
My 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.