[web-devel] Content-Length on sendFile

Kazu Yamamoto ( 山本和彦 ) kazu at iij.ad.jp
Wed Jun 15 05:51:46 CEST 2011

> I'm really starting to think that the correct solution for this use
> case really is embedded files[1]. It avoids any kind of system call
> overhead, doesn't touch the hard drive at all, and doesn't allow for
> modification of the files after compile time. It would be interesting
> to see if it ends up faster than sendfile.

This is just my idea. Not confirmed.

The server saves all embedded files to the file sytem on boot time and
obtains file descriptors for them. And it *unlink* files so that
nobody but the server can touch. Then the server can send the file
with sendfile. (sendfile API should take FD not FilePath)


More information about the web-devel mailing list