-
Notifications
You must be signed in to change notification settings - Fork 522
Implement IHttpSendFileFeature #1593
Comments
Breaks with SSL that's why we don't do it today |
On Linux, true sendfile (i.e. kernel copying fd to fd), doesn't support encryption. Don't know how it is on Windows. |
On Windows SendFile with a raw socket doesn't get you encryption either, but Http.Sys does have an implementation that support encryption. |
So does BSD. Go look up how Netflix got HTTP working, inserting crypto in the sendfile pipe. TBH it is a non goal anyway. You can lift the buffers into userspace with technologies like RIO and PD, encrypt in userspace and cache in userspace. |
Doesn't need the actual SendFile api; just doesn't need to go through the full stack. Frame implements Currently up stack it reads from file into an array, then passes the array to Kestrel which then copies it to the output buffers. Implementing |
It can be optimized at different levels.
|
We don't plan to do this. Eventually the middleware could be made to expose pipelines. |
This could be done by reading from a file pipeline and appending the buffers to the output pipeline? (Cutting out most of the stream busy work)
/cc @davidfowl
The text was updated successfully, but these errors were encountered: