Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

All these benchmarking utilities like wrk are notorious for not supporting HTTP/2. Why would you serve static content and not use HTTP/2?


At least one reason could be that `sendfile` is useless when using HTTP/2 or HTTP/3, as you can no longer just dump the contents directly onto a socket. Whether that actually makes a practical difference on modern hardware remains to be seen of course.


There is nothing that prevents you from using sendfile and HTTP/2 at the same time. You still dump the contents directly into the socket.


Yes there is: HTTP/2's and HTTP/3's framing of messages is such that you can't reliably dump a file as-is onto an HTTP/2 connection, as it may exceed the maximum size allowed by a frame.


You can dump only the necessary part of the file. It does not have to be the whole file at once.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: