Hacker News new | ask | show | jobs
by sc68cal 300 days ago
> The implementation saturates CPU before reaching I/O limits

So, I did look over the code and the thing that I walked away asking was "isn't this sort of the reason why sendfile(2) was developed?"

1 comments

Axon generates dynamic multipart responses with boundaries and headers to bundle files specified via query parameters. sendfile handles "serve this specific file" but does not handle "bundle these N files into a multipart response."

For static file serving, sendfile would be the better choice.

Reading the manpage for sendfile leads me to believe that it can be used for that purpose
I might be wrong then! I'll make a note to take a look. Thanks for pointing this out.