Nodejs and socket.io for push notifications

ⅰ亾dé卋堺 提交于 2020-01-04 01:57:54

问题


I'm currently looking to offer push notifications to an iphone and android app I'm working on. I took a look at the push notification services and they are very expensive so, I'm looking to run my own using socket.io.

I guess my question is, how demanding on the server are push notifications? Do I need a ton of bandwidth or some specific server setup?

I haven't used push notifications before to estimate the amount I would need sadly.

Currently I'm using Nodejitsu for my nodejs app and plan to have it host the push server too for what its worth.

Any help to point me in the right direction will help a lot.


回答1:


The required bandwidth depends on the number of notifications you are planning to push every day. Each notification is relatively small (for Apple Push Notifications - up to 256 bytes payload + some overhead < 400 bytes per message; for Google Cloud Messaging - up to 4K bytes payload + some overhead < 5K bytes per message). You can do the math.

In addition, for Apple Push Notifications your server must allow connection to outgoing ports 2195 & 2196. I'm not familiar with Nodejitsu, so I can't give you more specific information.



来源:https://stackoverflow.com/questions/19978884/nodejs-and-socket-io-for-push-notifications

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!