0

I would like to know what is called Message throttling in Google FCM push notification? I am trying to implement a sample push notification using FCM, but didn't understand about message throttling mentioned in their steps. There is no documentation also found about it.

https://aerogear.org/docs/unifiedpush/aerogear-push-android/guides/#google-setup

Could someone clarify about this term?

AL.
  • 36,815
  • 10
  • 142
  • 281
user1953977
  • 163
  • 2
  • 12

1 Answers1

4

This documentation of Throttling by https://stuff.mit.edu explains it really well:

To prevent abuse (such as sending a flood of messages to a device) and to optimize for the overall network efficiency and battery life of devices, GCM implements throttling of messages using a token bucket scheme. Messages are throttled on a per application and per collapse key basis (including non-collapsible messages). Each application collapse key is granted some initial tokens, and new tokens are granted periodically therefter. Each token is valid for a single message sent to the device. If an application collapse key exhausts its supply of available tokens, new messages are buffered in a pending queue until new tokens become available at the time of the periodic grant. Thus throttling in between periodic grant intervals may add to the latency of message delivery for an application collapse key that sends a large number of messages within a short period of time. Messages in the pending queue of an application collapse key may be delivered before the time of the next periodic grant, if they are piggybacked with messages belonging to a non-throttled category by GCM for network and battery efficiency reasons.

On a simpler note, I guess you can simply see throttling like a funnel that prevents an overflow of messages (normally for downstream messaging), regulating the in-flow of messages to avoid flooding.

For example, you send 1000 messages to a single device (let's also say that all is sent successfully), there's a chance that GCM will throttle your messages so that only a few would actually push through OR each message will be delivered but not simultaneously to the device.

AL.
  • 36,815
  • 10
  • 142
  • 281
  • OP asked about FCM. You quoted from GCM doc. This may or may not be true for FCM. – Sourav Ghosh Nov 03 '16 at 14:58
  • @SouravGhosh FCM is a newer version that was built with GCM as it's core. Technically, there is no official GCM documentation that explicitly explains on how message throttling works under the hood for GCM and FCM. Therefore, I linked the one from stuff.mit.edu which provides a *clarification* (or an idea) about the term, as per the OP's question "*Could someone clarify about this term?*". I've also taken a look around for any official docs from Google before posting this answer, so I'm fairly sure that there wasn't any at the time. If I ever find one, I'll be sure to update here. Cheers! – AL. Nov 03 '16 at 21:08
  • I did a experiment my self.I created a tool which used to send 1000 push notifications and i did this using xmpp. Now i only received the delivery receipt for 658 messages.DId not get any delivery receipt after that. – Learner Sep 11 '17 at 05:28