Unless you are using a version of sendfile that does TLS in the kernel, most of 
the benefits of sendfile disappear as soon as you enable TLS. All of the 
encryption is done in userspace and you can't use sendfile for that.

Even if you use sendfile to send it to a reverse proxy, at some point it leaves 
the kernel and ends up in userspace for encryption. It's unlikely that you are 
really getting much performance benefit at all these days.

There are some patches against FreeBSD that I am aware of that move TLS to the 
kernel so that sendfile is done in kernel rather than switching from kernel to 
userspace and back.

Bert

> On Sep 16, 2019, at 01:56, Hynek Schlawack <h...@ox.cx> wrote:
> 
> - The argument that you need a sidecar for static files is mostly obsolete 
> since we got sendfile http://man7.org/linux/man-pages/man2/sendfile.2.html 
> <http://man7.org/linux/man-pages/man2/sendfile.2.html>> and can be usually 
> disregarded given the complexity it entails. I like using whitenoise for it 
> because it allows for nice 
> re-mappings etc: http://whitenoise.evans.io/ <http://whitenoise.evans.io/> 
> (see also 
> http://whitenoise.evans.io/en/stable/#isn-t-serving-static-files-from-python-horribly-inefficient
>  
> <http://whitenoise.evans.io/en/stable/#isn-t-serving-static-files-from-python-horribly-inefficient>)

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/426440B8-61A7-47C2-BF1F-876B52EF184A%400x58.com.

Reply via email to