I am having a strange issue with SignalR through different load balancers (I have tried elastic load balancer and HAProxy).
My setup is as follows:
C# client -> HAProxy --> (SignalR Host 1 or SignalR Host 2)
The HAProxy is configured to roundrobin with cookies to ensure session stickiness
balance roundrobin
cookie SERVERID insert indirect nocache
When I have a single SignalR host behind the proxy (using Long Polling or Server Send Event) everything works fine. I can connect, invoke methods and handle callbacks.
As soon as I add a 2nd SignalR server things start to go poorly. I can connect fine and the connections properly load balance. I can send messages and they properly stick to the server. The problem is that callbacks just never make it back to my client through the proxy.
What is perplexing is this works fine with a single host configured on the load balancer.
Another note: I am not looking to scale out SignalR with a backplane. My signalr hosts don't need to know about each other or care about clients connected. In my architecture SignalR is the frontend to an application layer tier that handles communication service wide. I am essentially using Signlar to support push notifications from the application.
Thoughts?