高服务器CPU发送GCM后 [英] High Server CPU after sending GCM

查看:113
本文介绍了高服务器CPU发送GCM后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的服务器和Google Cloud Messaging有点问题。

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

我最近推出了一个应用程序,每当我们发布新帖子时发送推送通知每30分钟)。它使用 / topics / global ,所以我不保留在内存中的客户端注册。

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.

是服务器发送通知(通过CURL,PHP或Shell),服务器CPU变高,其他操作变慢。

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

这发生了几天,也许是因为我们已经安装了4000多个智能手机。

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

我试图用curl模拟ssh的请求。响应在1秒内返回,但CPU负载仍然很高。

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!

推荐答案

如果您向所有用户(超过1000个用户)发送消息,应将这些用户分成群组,并向群组发送邮件。

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.

这篇关于高服务器CPU发送GCM后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆