21

Like many companies, the one I work for isn't comfortable in using Apple's APNS: No official library, stream that get cut-off randomly, etc... The same goes for Android's push system: Limited to small batches, completely different to Apple's APNS... That's why we are looking for an alternative and when Amazon claimed to be able to send millions of push notifications almost for free, we thought that SNS would be the perfect solution.

The issue is that we frequently have more than one million devices to address, and obviously our push campaigns rarely target the same devices. As far as we dug, the only solution is to use the AWS API that only provides a method to create the endpoints one at a time! That is a big deal for us because after some testing, we figured that in order to create 1 000 000 endpoints, it would take approximately 15h (~17 calls/sec).

Even after all the endpoints are created, in order to send all the pushes at once, the endpoints need to be added to a topic, and again, this has to be done one endpoint at a time (so 15 more hours). Event if we multithreaded our calls to let's say 30 threads, it would still take an hour!

So, could anyone tell us if there is anything that we missed? Is Amazon really expecting us to flood their webservices during 30 hours in order to create one push campaign? How can they pretend to send a million pushes in a second if it takes hours to prepare it? Are they working on a batch API for SNS? Is it possible to plug an Amazon DB containing the tokens to feed an SNS topic?

pimpreneil
  • 211
  • 1
  • 2
  • 3
  • Can I ask, were you doing all this work synchronously? Waiting for one EndpointArn to be created before creating the next? I will be doing similar to you, but plan on all calls being asynchronous. I am just trying to anticipate what I might experience based on what you have experienced. Thanks. – Eric Olson Oct 22 '14 at 14:51
  • 1
    Same problem here. Amazon have added my account to the feature request but we know this means little. Rather than bother subscribing our users to topics we just send the messages direct to the publish API as it amounts to the same thing. Still takes ages, we need to be able to drop 10,000 a minute. Crazy Amazon dont support a bulk request – Mike Miller Jan 22 '15 at 18:40
  • There is a specific request limit that you can do from an EC2 instance. But Amazon doesnt tell you how many it is... So you should launch about 15x t2.micro instances so each EC2 will have its own request limit. With this approach your process would end 15x times faster – Barbaros Alp Aug 19 '15 at 08:35
  • Incredibly, this is not supported by AWS - push on SNS is an afterthought and not usable in real-life scenarios – RunLoop Sep 29 '15 at 07:45

1 Answers1

5

It looks like Amazon provides a few methods of adding endpoints/tokens, including a CSV importer (but limited to 2MB csv files at a time). They also provide an API and sample java application for bulk uploading tokens (link).

The topic subscription point is addressed by an Amazon SNS employee here, essentially explaining that there is no batch API available for this unfortunately.

There are a few other 3rd party push notification providers that may better meet your needs when it comes to frequently creating custom segments/topics:

  1. OneSignal (Disclosure: I run this company)
  2. MixPanel
  3. Parse
Community
  • 1
  • 1
Gdeglin
  • 12,432
  • 5
  • 49
  • 65
  • Today, Mixpanel doesn't support Amazon messaging system (ADM). Not sure if Parse support ADM. – Tobliug Oct 22 '15 at 15:53
  • Hi Gdeglin, I also have similar problem and we are thinking of using onesignal. We are looking to send personalized notification to each user. How can I use onesignal to personalized notification to more then a million user base ? – pankaj Oct 14 '16 at 08:51
  • @pankaj Hi! Please open a new stackoverflow thread for this question or contact the OneSignal team at support@onesignal.com for guidance. – Gdeglin Oct 14 '16 at 23:19
  • @Gdeglin posted as a new question: http://stackoverflow.com/questions/40083914/sending-personalized-push-notifications-using-onesignal – pankaj Oct 17 '16 at 10:32
  • @Gdeglin - How can OneSignal offer all of that for free? How, as a client, I can depend that you will be around 2 years from now? Parse was free, was backed by FB and still had to close down. – Pritam Barhate Oct 19 '16 at 16:44
  • 1
    I am not worried about the "free" part, what worries me is **"We make money by using the data we aggregate to improve web and mobile experiences. We also offer custom solutions to enterprise clients."** I wonder what "improve web and mobile experiences" is and what you actually do with the data. –  Jul 23 '17 at 00:25