Matt
Matt

Reputation: 334

SNS Push Notification Service Multi threading Publish API to publish 100,000 messages in 2 seconds

I was reading the following blogpost ( https://aws.amazon.com/blogs/aws/push-notifications-to-mobile-devices-using-amazon-sns/ ) about SNS and it states that you can "Send messages directly to a specific device by calling the Publish function with the device’s ARN. You can easily scale this to handle millions of users by storing the endpoint ARNs in Amazon DynamoDB and using multi-threaded code on the server."

I'm having issues understanding how we can scale to 1 million users. Each call is taking 500-800ms for me. this would be way too many parallel connections if i wanted to send a notification to a million users in like a 10 second span.

My goal is to be able to hit 100,000 users with a push notif using the Publish API using the device ARN directly (not topics) in about 2 seconds. Do you have any suggestions at how to achieve this?

Thanks,

Matt

Upvotes: 0

Views: 1199

Answers (1)

Vor
Vor

Reputation: 35149

If you want to send the same message to all your clients then you will benefit from subscribing all "consumers" to the same SNS topic. This way you will only need to send 1 message and SNS will automatically fanout it to all it's subscribers.

From SNS FAQ Q: Are there limits to the number of topics or number of subscribers per topic?

By default, SNS offers 10 million subscriptions per topic, and 100,000 topics per account. To request a higher limit, please contact us at at http://aws.amazon.com/support

Upvotes: 3

Related Questions