I’ve built an app for my clients, and it’s crucial that its notifications are delivered very quickly. During testing, when there were about 5 of us, notifications were instant. But as our user base grew to around 30,000 users, we started noticing serious delays: notifications can now arrive 5, sometimes even 10 minutes late.
Right now, the entire notification system is built using Firebase Cloud Messaging (FCM). I understand that we’re limited to using the OS-level push systems (FCM for Android, APNs for iOS), but I can’t help wondering: how do apps like Telegram achieve such real-time delivery?
For example, when I send a message to a friend on Telegram, even if the app is completely closed and not running in the background, the notification still appears almost instantly.
How can I achieve this same level of speed and reliability in my own app?
Edit: In my current FCM requests, I've already included the highest priority settings:
android.priority = "HIGH" apns-priority: 10