How can I ensure instant push notifications for a large user base?

0
7
Asked By TechyWizard87 On

I've developed an app for clients that requires immediate delivery of notifications. It worked flawlessly during our testing phase with just 5 users, but as we've expanded to around 30,000 users, we're facing significant delays, with notifications arriving 5 to 10 minutes late. Currently, I'm using Firebase Cloud Messaging (FCM) for the notification system, which limits us to OS-level push solutions (FCM for Android and APNs for iOS). I'm curious how apps like Telegram manage to deliver notifications instantly, even when the app is not running. What strategies can I employ to achieve similar speed and reliability in my app? By the way, I've set the highest priority in my current FCM requests: android.priority = "HIGH" and apns-priority: 10.

2 Answers

Answered By CodeJunkie33 On

Batching notifications is a smart approach. You can use something like NATS to queue and process messages in batches, pushing them out through a specialized service written in a language like Go. This way, you can send multiple messages concurrently, which should help cut down on those annoying delays. Remember, efficiency is key!

Answered By DevGuru92 On

You might want to consider using a message queue system like Kafka or NATS, which can help improve delivery speed by handling push notifications in parallel. These systems can maintain an open connection and listen for incoming notifications without being hindered by the OS-level push infrastructure. If you want to cover all bases, integrating SMS or email could also be a fallback for critical alerts.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.