I have an app logic that requires me to segment user devices to groups which are subscribed to different types of "channels/topics".
I then want to send a broadcast message to all the subscribers of a specific topic or channel.
I can have as many as 500,000 topics or channels, and as many as 20,000 subscribers per channel.
since AWS SNS has a limit of 3,000 topics and 10,000 subscribers per channel their FAQ suggest you use direct addressing, meaning send one-by-one by myself. they suggest we also go this route if we have high volume..
AWS SNS has no batch publish function so I actually need to make one SNS publish request per subscriber, this can mount to tens of thousands requests..
So I found out that AWS-PHP-SDK is built on top of Guzzle and supports parallel request processing via multi curl, but even so, if I run 20 connections at the same time I still need to make so many requests... is that even efficient? why would that be the recommended way to go if I have large volumes?
and another question comes to mind, if I need to send the same message to each subscriber by itself, one by one, why use SNS at all?
Apple APNS service works by opening a TCP connection and writing bytes of requests, each with a different subscriber details, but I can just write the bytes without the overhead of building PHP requests and dealing with 20 processes. wouldn't that be much faster way of getting my message to all of the topic/channel subscribers?
I am a bit confused about the tradeoff and the added value of AWS SNS service in these type of cases. I would appreciate some insight from someone with past experience with this or from AWS staff.
thank you