dotnet / dotnet/aspnetcore

ASP.NET Core SignalR - SkipNegotiation by default and use Negotiation if WebSocket connection fails.

Open
#38,300 10 comments 9 reactions 0 assignees View on GitHub
area-signalr
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

We are using ASP.NET Core SingalR for real time communication in our application.
90% of our web clients use WebSocket transport. By default, we don't SkipNegotiation.
If a client cannot connect using WebSocket then it can fall back to other protocols
for which Negotiate request is required. Even for the 90% percent of the clients
using WebSocket transport, two requests, negotiate, connect are required to establish a WebSocket connection.
We can improve the experience of these clients by establishing the connection in one request
by skipping negotiate request.

It will be nice if the libraries can provide the feature where by default they SkipNegotiation
and use WebSocket transport. If the connection is established, then we are good.
If the connection fails, then library can try to create new connection without skipping Negotiation.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.