GCM - How long does it take for push notifications

2019-01-25 23:38发布

问题:

I'm interested on the speed of receiving push notification messages (using GCM). How long does it take for sent push notifications to reach the device, specially when i send a message to a large number of devices (like 100,000 or even 1,000,000) ?

回答1:

GCM was designed to send the notification as soon as the device is available. As stated in the GCM Lifetime of a Message docs:

In the best-case scenario, if the device is connected to GCM, the screen is on and there are no throttling restrictions, the message will be delivered right away.

If you are referring to the average speed, it was mentioned back in Google IO '15 (01:57):

..50milliseconds on average if the devices are online..

There are also some factors which you can affect the delivery of the notification itself. One example of this is setting the delay_while_idle flag (refer to GCM Lifetime of a Message docs for more info). Hope this gives clarity to what you were asking. Cheers! :D

PS: As per the recent IO '16, they now have the Firebase Cloud Messaging, where it's core is based on GCM. Care to check it out. ;)