-
Notifications
You must be signed in to change notification settings - Fork 95
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
A server node cannot send messages to clients before Azure SignalR assigns the first client connection to it #1937
Comments
Hello, We have implemented a
The backend servers are in a cluster. SignalR is used by the backend to forward events to frontend clients. We have noticed some unexpected behaviour. After backend application launch we are able to accept new client connections and everything works as expected once at least one client connects to each backend instance. Once the first inbound client connection is made the instance can then send messages to any connected client, even if that client never connected to this instance. However, a backend server is unable to send messages to any clients until it has received at least one incoming client connection. Until a client connection is received, the This is a problem for us as under light load following a deployment, a backend instance may need to react to external events and send messages to one or more connected clients before having received any client connection requests. We have chosen Azure SignalR in order to abstract the management of client connections and allow any backend instance to communicate with any client. Is our observed behaviour expected? If so, are there any recommended mitigations? |
@engmarknabil in simple words:
|
sample PR: engmarknabil/SignalRTester#1 |
Thanks @vwxyzh and @terencefan. That solved our issue. |
Description
When having multiple server nodes, each node cannot send messages to clients until Azure SignalR assigns the first client connection to it. Before that, Hub.Clients is null.
To Reproduce
Clone this repo and follow the readme
Exceptions (if any)
Further technical details
The text was updated successfully, but these errors were encountered: