Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Switch default transport to sockets #2360

Closed
natemcmaster opened this issue Mar 5, 2018 · 9 comments
Closed

Switch default transport to sockets #2360

natemcmaster opened this issue Mar 5, 2018 · 9 comments

Comments

@natemcmaster
Copy link
Contributor

Currently, it is our goal by 2.1.0 to make sockets the default transport. We made the switch in early builds of 2.1.0 but reverted that for preview1 (#2220) due to performance issues.

Motivations:

  • broad platform support. Wherever managed sockets are supported, Kestrel should work. Doesn't require recompiling libuv to bring up a new OS.
  • source-build. (https://github.com/dotnet/source-build). In current form, Kestrel packages can't be produced in a source-build environment
  • ecosystem. Helps to drive improvement to the .NET sockets implementation, which benefits anyone else using managed sockets.

/cc @halter73 @davidfowl @muratg

@Suchiman
Copy link

Suchiman commented Mar 14, 2018

@halter73 shouldn't the announcement prefer Microsoft.AspNetCore.App over Microsoft.AspNetCore.All? EDIT: Oh looks like i can't read properly, so App won't contain Libuv but All does.

@halter73
Copy link
Member

@Suchiman Your edit is correct. That's the main thing that makes the change breaking.

@ondravondra
Copy link

Do the managed sockets have similar performance compared to libuv?

@NinoFloris
Copy link

@ondravondra yes that was the prerequisite for the switch and why preview1 still ships with libuv. I think it might even be.a little faster already

@davidfowl
Copy link
Member

@halter73 this is done, can you close this issue?

@nickalbrecht
Copy link

Just a heads up, the announcement has the tag 2.0.0-preview2, not 2.1.0-preview2

@natemcmaster
Copy link
Contributor Author

@nickalbrecht thanks for spotting that. I updated the milestone on the announcement.

@ghost
Copy link

ghost commented Apr 3, 2018

Do the managed sockets have similar performance compared to libuv?

@ondravondra yes that was the prerequisite for the switch and why preview1 still ships with libuv. I think it might even be.a little faster already

Couple of months ago, it was indicated that performance regressed when switching to sockets #2220. Are there any before/after performance measurements to bring about concreteness to the mix?

@Suchiman
Copy link

Suchiman commented Apr 3, 2018

@kasper3
There is http://aka.ms/aspnet/benchmarks
If you navigate to page 1 with the pager at the bottom, there's a graph that shows Socket I/O by over a million RPS ahead of Libuv.
If you go to page 2 it looks differently so i don't really understand how to read them.

EDIT: Ah i think i see my mistake. Sockets PlainText Platform is a bit faster than LibUv PlainText Platform and both are ~1.5 million RPS faster than Kestrel LibUv PlainText which is a bit faster than Sockets PlainText. Interesting that only the Platform Level Benchmark of Sockets beats LibUv.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants