How about to add splice
luky-37 at hotmail.com
Thu Dec 10 14:31:23 UTC 2015
>>> It only can be useful for proxying big amounts of data without any
>>> processing. But if you need compression, or TLS, or SSI, or even some
>>> simple substitution, then splice() cannot be used.
>> It should fit in our stream quite nicely.
> Not really, as stream is able to do SSL encoding and decoding.
We also have sendfile() in nginx despite the fact that it can't be used
in every single occasion, such as TLS sessions or when gzipping.
I am aware that sendfile() is extremely useful in some configurations, I'm
just saying the fact that it isn't able to work with TLS wasn't showstopper
for it, so at the very least it shouldn't be the only showstopper for
splice() would do something similar than sendfile(). HAProxy doesn't always
splice() either, but when it makes sense .
There are some efforts in both linux  and FreeBSD  to implement
TLS in-kernel; leveraging kernel features like sendfile() while sending
it through a in-kernel crypto stack.
I'm not saying splice() is a must-have; I certainly don't need it
personally, but there are use-cases out there.
More information about the nginx