-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
How to use Socket to write high-performance sending data in concurrent scenarios? #44182
Comments
Tagging subscribers to this area: @dotnet/ncl |
There may not be simple answer to the simple question. I strongly recommend to build prototypes using different strategies and measuring perf - if you really care. Also API performing well on one platform may show different characteristic on different OS (or version) even if we try to minimize such behavior. |
@wfurt Thank you for your answer. I'm trying the "sendfile" solution, and I'm also following .NET 5 System.Net.Connections API. I don't know how to make the right choice between them. I am learning this example: https://github.com/davidfowl/CommunityStandUpNet5/blob/master/APIPlayground/Program.cs, and this is not a very simple example. I am confused, this should not be easy to use in a short period of time. :) |
@NMSAzulX System.Net.Connections has been removed from the final version of .NET 5, for explanation see #41648 (comment). I would use plain sockets. What's most performant also depends on the application. I'm not sure if |
@antonfirsov Oh! Thank you very much. Through your and wfurt's description, I think these feature will have an answer in .NET 6.0. I had to use another approach, such as Kestrel or httpClient. :) |
If I want to write a high-performance Socket communication program, should I use mmap and socket.sendfile?
How to use Socket to write high-performance sending data in concurrent scenarios?
The text was updated successfully, but these errors were encountered: