Fastest way to send non-broadcast push with FCM?

Viewed 219

I need to send a large number of web push notifications via FCM, all which are personalized (so I can't use broadcast messages. It's 1 push per token). Let's say the number of subscribers is 500K-2M, so that means 500K-2M API requests I think?

I've read several articles about the topic, such as how discord does it. They use the XMPP API which I would love to use, but currently I'm doing this in ruby and I don't think any of the current libraries support what's discussed in that article (100 requests at a time, connection draining, etc), and I don't want to build something from scratch.

So I think I'm stuck with the HTTP API for now.

The thing I'm having difficulty with is how to actually run the requests asynchronously... I've tried using Typhoeus gem with 2000 connections at once, and many of the connections timed out.

I've tried researching FCM docs for HTTP API rate limits and connection limits but can't find anything...

What is the fastest strategy to send 1M non-broadcast FCM messages using the HTTP API?

0 Answers
Related