© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
1 reply
Pan!cKk

Multi-Instance Application with SignalR and Redis as backplane

Hello :)

I have an application that I want to have multi-instances of. The application communicates with the frontend via SignalR for various use-cases, but when I launch another instance of the application, the client often fails to connect to the SignalR Hub.

This is how I set Redis as the backplane:
services.AddSignalR()
        .AddStackExchangeRedis(builder.Configuration.GetValue<string>("SignalR:RedisBackbone"),
                       options =>
                       {
                           options.Configuration.ChannelPrefix = redisChannel.Literal("Some:Prefix");
                       });
services.AddSignalR()
        .AddStackExchangeRedis(builder.Configuration.GetValue<string>("SignalR:RedisBackbone"),
                       options =>
                       {
                           options.Configuration.ChannelPrefix = redisChannel.Literal("Some:Prefix");
                       });


With a single instance it works perfectly fine, but when another instance is introduced, it fails to connect (not always, but quite often).

This is the error I get on the client side:

Unable to connect to the server with any of the available transports. Error: WebSockets failed: Error: WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled. Error: ServerSentEvents failed: Error: EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled. Error: LongPolling failed: Error: No Connection with that ID: Status code '404'
Unable to connect to the server with any of the available transports. Error: WebSockets failed: Error: WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled. Error: ServerSentEvents failed: Error: EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled. Error: LongPolling failed: Error: No Connection with that ID: Status code '404'


I also tried using stateful-set for the deployment, but still no luck.

Is there some specific configuration that needs to be set?

NOTE: Redis is a single instance
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

SignalR Backplane with ElastiCache Serverless
C#CC# / help
2y ago
❔ Trying to use Azure SignalR Service as Backplane and for client affinity (Sticky sessions)
C#CC# / help
3y ago
SignalR
C#CC# / help
11mo ago
✅ SignalR
C#CC# / help
13mo ago