Tutorials SignalR & Real-Time .NET Applications

Configuring the Connection: Transports and Retries

On this page

Connection Resiliency

In the real world, connections drop. A senior architect designs for failure by configuring robust retry and transport policies.

1. Automatic Reconnect

On the client side, use .WithAutomaticReconnect(). This tells the SignalR client to try and resume the connection if it drops. You can even pass a custom array of retry intervals (e.g., 0, 2, 10, 30 seconds) to implement an **Exponential Backoff** strategy.

2. Transport Constraints

Sometimes you want to force a specific transport. HttpTransportType.WebSockets ensures your app only works if high-speed duplex is available. This is useful for high-frequency gaming or trading apps where the latency of Long Polling is unacceptable.

3. Architect Insight

Q: "How do I handle 'Dead' connections?"

Architect Answer: "Configure the **ClientTimeoutInterval** and **KeepAliveInterval**. These settings control how often the server and client send 'heartbeat' packets. If a heartbeat is missed, the connection is considered dead, and you can trigger your UI's 'Reconnect' logic."

Questions on this lesson 0

Sign in to ask a question or upvote helpful answers.

No questions yet — be the first to ask!

SignalR & Real-Time .NET Applications
Course syllabus
1. SignalR Core
2. Managing Users & Groups
3. Scaling SignalR
4. Advanced Communication
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details