-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Further performance improvements #474
Comments
In Kestrel we have the Transport first (unencrypted) and then SSL on top as a Middleware via SslDuplexPipe. They create an SslStream from this pipe so we can re-use our logic with authentication I guess. Have to dig into this but this seems promising. |
First benchmarks show that this is even a little bit slower but yet comparable to the traditional, way easier approach - so it seems that the implementation of the .NET framework already runs I/O asynchronously or we are missing something else that limits the performance. |
Will close this for now, #488 will probably bring the JSON test on par with ASP.NET. |
As an operator of a web application written with GenHTTP, I would like my application to provide high throughput, low latency and low memory allocations so I do not need to care about scaling that much.
Example
The current implementation of the
ClientHandler
wraps the socket obtained for the client into aNetworkStream
that is then passed to aPipeReader
for parsing purposes.As all work is currently scheduled on the
ThreadPool
and the various streams inbetween the socket and the application framework cause a lot of allocations, the performance of the server cannot be improved without fundamentally changing this architecture.Looking at Kestrel, we should:
ThreadPool
to actually handle requests in the applicationSee this reference for a potential starting point: https://github.com/aykutalparslan/high-perfomance-tcp-server/
Main question would be how to handle SSL connections without the functionality provided by
SslStream
.Acceptance criteria
The text was updated successfully, but these errors were encountered: