I am working on an application which requires to send push notifications to the user. I tried expo push notification, I was able to integrate it with my app very easily. Kudos to the team.
Now, I am done with my MVP. Now moving to production. So can you guys tell me, how reliable is this expo push notification system in production.
Has anyone done benchmarking?
How many push notification per second we can send?
It’s social application. It’s binary product. It might need more than 1 million push notification if it gets viral, otherwise it will be less than that. I just want to confirm, is it free for unlimited usage? If not then is there any pricing table?
Hi notbrent, my server did response Timeout error when I try to send PUSH notification to ~2000 devices. Below is my code:
const msg = createPushNotificationMessage(null, title, description, data);
let messages = [];
for (var i = 0, len = tokens.length; i < len; i++) {
let token = tokens[i];
if (token != null && token != '') {
messages.push(Object.assign({}, msg, { to: token }));
}
}
/**@type {Array} */
const chunks = expo.chunkPushNotifications(messages);
const promises = chunks.map(items => {
return expo.sendPushNotificationsAsync(items);
});
return Promise.all(promises);
It take a while(2-3 minutes) to send notifications to 2000 devices using this code so I think It’s impossible to send to ~1 million devices. Is there any better solution to do that ?
I also have a large number of users in one project that I’m working for and I would like to know if its possible to send hundred thousands of push notifications with expo or if is better to use another solution.
If you plan on sending a million push notifications at once, currently it might be better to detach and send notifications through your own server. We’re working on increasing the peak capacity of our push services amongst many other projects but you’ll always inherently have more control over a server you run yourself.
I suspect you’ll see issues right now if you send 100k at once but things should be fine if you space out your requests and have retry policies. And also be sure to use the batched API (our Node and Python SDKs use it by default) and to remove tokens for which you get DeviceNotRegistered errors.
A couple days ago we also deployed a change to the Expo servers to fix an issue that could cause push notifications to time out if a couple thousand were received at once. We still recommend throttling the notifications and having retry logic (we could add this to the Node SDK perhaps) but push notification performance and reliability should be better now.
it is only allow to send notification to only max 2 users or can I add unlimited?
How long it will take to send 1000 users notification at a time ?
Will it possible ?