9

We are planning to implement Topic Messaging via FCM to send PN to our base, I want to know how much time FCM takes to deliver PN to apps via topic:

  1. with 10 million subscribed to a topic
  2. with 50 million subscribed to a topic
  3. with 100 million subscribed to a topic

I understand delivery will depend on apps being online, however we can assume here hypothetical case of every one being online. In other words, I want to understand how does FCM processes sending PN to a topic and how much delay it will/might introduce?

Saurabh
  • 71,488
  • 40
  • 181
  • 244

2 Answers2

6

The messages are enqueue and they will be deliver user by user from Firebase cloud messaging server, you can know the status of those messages at your Firebase Notifications console.

https://firebase.google.com/docs/cloud-messaging/understand-delivery

This video ensures that 95% of your messages will deliver with an average time of 250ms

https://youtu.be/sioEY4tWmLI

From this documentation

Maximum payload for both message types is 4KB, except when sending messages from the Firebase console, which enforces a 1024 character limit.

Another important thing you can find at this documentation

FCM does not guarantee the order of delivery.

Throttling and scaling

Our goal is to always deliver every message sent via FCM. However, delivering every message sometimes results in a poor overall user experience. In other cases, we need to provide boundaries to ensure that FCM provides a scalable service for all senders.

Maximum message rate to a single device

You can send up to 240 messages/minute and 5,000 messages/hour to a single device. This high threshold is meant to allow for short term bursts of traffic, such as when users are interacting rapidly over chat. This limit prevents errors in sending logic from inadvertently draining the battery on a device.

Upstream message limit

We limit upstream messages at 1,500,000/minute per project to avoid overloading upstream destination servers.

We limit upstream messages per device at 1,000/minute to protect against battery drain from bad app behavior.

Fanout throttling

Message fanout is the process of sending a message to multiple devices, such as when you target topics and groups, or use the Notifications composer in the Firebase console.

We limit the number of in-progress message fanouts per project to 1,000. After that, we may reject additional fanout requests until some of the fanouts complete.

The actual achievable fanout rate is influenced by the number of projects requesting fanouts at the same time. A fanout rate of 10,000 QPS for an individual project is not uncommon, but that number is not a guarantee and is a result of the total load on the system. It is important to note that the available fanout capacity is divided among projects and not across fanout requests. So, if your project has two fanouts in progress, then each fanout will only see half of the available fanout rate. The recommended way to maximize your fanout speed is to only have one active fanout in progress at a time.

If you need more information, you can find it at those links I provide.

Gastón Saillén
  • 12,319
  • 5
  • 67
  • 77
1

According to the following answers:

How long does it take for a message from Google Cloud Messaging to arrive on device

GCM - How long does it take for push notifications to reach the device?

The push notification should appear instantly when delivered, but you need to take into account the internet connection of the user.

Peter Haddad
  • 78,874
  • 25
  • 140
  • 134
  • These questions talks about general push notification being sent to individual devices, I was interested how will it work in case of topic, as in topic FCM will have to do broadcasting of one message to n number of devices. – Saurabh May 02 '19 at 11:06
  • GCM was changed into FCM and it doesn't matter if you use topics or you don't, when you need to send a push notification, first the user needs to subscribed to the topic then cloud function will be executed and then FCM will be executed and ur message will reach the phone. If you are sending to n number of users the message will be reached immediately but it also depends on the internet connection, so for some users it might take time to see the notification – Peter Haddad May 02 '19 at 11:18
  • So are you trying to say if a topics has 50 Million users subscribed, and assuming if all are connected to internet, If I send a push notification to that topic, all 50 million users will get it immediately(say, within a minute)? – Saurabh May 02 '19 at 18:16
  • Do you know how much it would cost you if you actually send a topic message to 50 million users? – Peter Haddad May 02 '19 at 18:38
  • @PeterHaddad Saurabh Did we manage to find out an answer for the time it takes for the majority of the devices (hypothetically all online) to receive push notifications for a topic having 50/100/500 million users subscribed ? Very interested to learn more about this. – Harsh Shah Apr 04 '20 at 09:04