📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

📚 Interview question

How do you scale ASP.NET Core SignalR across several instances, and when would you choose Azure SignalR Service over a Redis backplane?

Covers scaling ASP.NET Core SignalR across instances: sticky sessions, Redis backplane and Azure SignalR Service, and how to choose between them.

Mid-Level Theory Intermediate aspnet-core azure-signalr-service devops redis scale-out signalr

🎯 Key points

  • Each client's persistent connection lives on one server
  • Sticky sessions are needed because negotiate and the follow-up connect must reach the same server; WebSockets-only clients with SkipNegotiation avoid this
  • Redis backplane relays messages between servers via pub/sub; each server still holds its own connections and needs affinity
  • Azure SignalR Service holds client connections and routes messages itself; no affinity or backplane to run
  • Rough guide: a few hundred connections on 2–3 self-hosted instances suits Redis; thousands of connections or autoscaling suits Azure SignalR Service

⏱ 30-second answer

SignalR keeps each client's persistent connection on one server. With several instances you need sticky sessions (negotiate and connect must hit the same server, unless clients use WebSockets only with SkipNegotiation) and a backplane so a message sent from one server reaches clients connected to the others. A Redis backplane (AddStackExchangeRedis) relays messages through Redis pub/sub; it is cheap, but each server still holds its own clients' connections, you still need affinity, and Redis becomes a dependency to run. Azure SignalR Service (AddAzureSignalR) takes client connections off your servers: clients connect to the service, your app keeps a few server connections to it, and no affinity is needed. Choose the service for many connections or autoscaling; Redis when you must self-host or have few connections.

🔍 What the interviewer is checking

Checks understanding of SignalR scale-out: affinity, backplanes and the managed service

↩ Usually asked after

More in Reverse Proxy and Gateway

Last updated 23 Nov 2026.

🌐 Sangam's Webring

⏪ Previous 🏠 Main Next ⏩
💬 Chat with me