I am trying to find the answer but SO.com search is not working
raydeo
yeah I think it uses the sendfile syscall to send it from the fs to the socket directly
Method__
cguardia: Ill give it a looksee
brodul joined the channel
moo-_-
I would assume Pyramid does the same, as its pretty much from the same authors
bind
which server would that be? is the zope server wsgi?
raydeo
waitress is based on zope server
I guess waitress doesn't actually use sendfile under the hood though... too bad
moo-_-
flag
@Mikko: I'd love to see benchmarks to show X-SendFile is actually going to be any faster. I am somewhat sceptical, since serving a blob file is very, very efficient in Zope. The original request thread is closed, and the file streaming is handled entirely by the underlying async polling implementation, Zope / Plone doesn't have to do anything anymore once the blob file has been located. Apache and nginx will do exactly the same. – Martijn Pieters♦ May
30 '11 at 6:12
kilodalton joined the channel
bind
waitress does currently no special sendfile stuff I read in the docs
raydeo
"The machinery which handles a file wrapper currently doesn't do anything particularly special using fancy system calls (it doesn't use sendfile for example); using it currently just prevents the system from needing to copy data to a temporary buffer in order to send it to the client."
bind
at least ... if i had the right version
moo-_-
raydeo: ah hah
bind
yeah that one raydeo
raydeo
it could though!
someone should write a PR
moo-_-
I wonder which is easier to implement, sendfile() or x-sendfile
bind
yes
raydeo
the issue is waitress is cross platform and sendfile is a linux thing
moo-_-
sendfile() is not that hard: take this file and stream it
kilodalton has quit
kilodalton joined the channel
bind
would be nice to have that option I guess when heavy file serving is needed
(may it be x-sendfile or sendfile)
kilodalton has quit
moo-_-
bind: yeah problem with x-sendfile is that you still need a front end web server to take care of the thing
file permissions, etc.
bind
yeah ... sendfile would make more sense
imho
raydeo
yeah the file has to be accessible to the nginx process
bind
dont want a globally used nginx to peek into my services homedir for example