Implementing SignalR for Real-Time Notifications with Offline Fallback
I'm exploring how to implement SignalR for push notifications and evaluating two connection management strategies:
User Base: 100–200 users (with potential growth).
Performance: Notifications should be delivered instantly.
Offline Handling: If the app is closed, fallback to Firebase Cloud Messaging (FCM).
Self-Hosting: I want to self-host SignalR and am open to exploring both self-hosted SignalR with Kestrel and SignalR with a reverse proxy like Nginx or Apache instead of using Azure SignalR Service.
I need reliable resources or guidance to implement this effectively. I have searched online but want to ensure I don’t miss anything. Any recommendations?
- In-memory tracking with ConcurrentDictionary – Simple but does not persist connections if the server restarts.
- Storing connections in Redis or a database – More scalable and persistent, suitable for future growth.
User Base: 100–200 users (with potential growth).
Performance: Notifications should be delivered instantly.
Offline Handling: If the app is closed, fallback to Firebase Cloud Messaging (FCM).
Self-Hosting: I want to self-host SignalR and am open to exploring both self-hosted SignalR with Kestrel and SignalR with a reverse proxy like Nginx or Apache instead of using Azure SignalR Service.
I need reliable resources or guidance to implement this effectively. I have searched online but want to ensure I don’t miss anything. Any recommendations?