High Server CPU after sending GCM

2019-09-09 23:31发布

I have a little problem with my server and Google Cloud Messaging.

I've recently launched an application that sends push notifications each time we publish new posts (1 each 30 minutes). It use /topics/global, so I don't keep in the client registration in memory.

The problem is that when server sends notifications (trough CURL, PHP or Shell) the server CPU goes high and other operations slow down.

This has happened for some days, maybe because we have more than 4,000 smart phones with the application installed.

I've tried to simulate requests from ssh with curl. The response returns in 1 second, however CPU load is still high.

Sorry for my english. Thanks in advance for your support!

1条回答
冷血范
2楼-- · 2019-09-10 00:02

If you're sending a message to all users (more than 1000 users), you should be placing these users into groups and just sending a message to the group.

First, create a group, and whenever a new user registers then, add them to the group. You can easily just send a group message.

查看更多
登录 后发表回答