AspNetCore.Docs icon indicating copy to clipboard operation
AspNetCore.Docs copied to clipboard

SignalR Reconnect documentation

Open analogrelay opened this issue 8 years ago • 7 comments

We need to provide a sample and some guidance for reconnecting SignalR clients when they disconnect. See https://github.com/davidfowl/UT3/blob/dac409886c1bb7aec7c150b74d4ce9a3e246f03c/UTT/wwwroot/js/utt.js#L141-L153 for an example. The general idea is that you need to reconnect if 1) connection.start fails or 2) connection.onclose fires.

Reconnection should be limited to only a set number of retries so that the application doesn't keep trying to reconnect a broken connection forever.

analogrelay avatar May 31 '18 19:05 analogrelay

@anurse Add this to the clients docs?

rachelappel avatar Jun 04 '18 10:06 rachelappel

Yes

analogrelay avatar Jun 04 '18 16:06 analogrelay

I actually think this would be best as a new document: "Connection reliability in SignalR". We want to talk about:

  • How to reconnect
  • Reconnect backoff (trying to avoid reconnect storms by having the client reconnect at some random interval)
  • Restoring state (groups, other metadata)
  • Tracking a "logical" connection across different "physical" connections (session IDs, etc.)

analogrelay avatar Jun 28 '18 16:06 analogrelay

Any news on this article?

KirilRusev avatar Sep 06 '18 16:09 KirilRusev

@bradygaster can you assign someone to do this?

Rick-Anderson avatar Jan 19 '19 03:01 Rick-Anderson

@Rick-Anderson assigning the new-and-awesome SignalR label so we can triage these during our regular team triage.

bradygaster avatar Jan 22 '19 23:01 bradygaster

closing this as a duplicate of #9280, which would represent a superset of the desires of this particular issue.

bradygaster avatar Feb 07 '19 09:02 bradygaster