[英]Custom setting Pusher rate limit
I'm using a Rails after_save callback in one of my ActiveRecord models to send push notifications to the client, which then triggers a partial refresh. 我在一个ActiveRecord模型中使用Rails after_save回调向客户端发送推送通知,然后触发部分刷新。 I'm using Pusher.
我正在使用Pusher。 Problem that I have is that I might be creating or updating up to 50 records over 5-10 seconds or whatever, which sends a lot of push notifications and ultimately refreshes.
我遇到的问题是,我可能会在5到10秒之内(最多)创建或更新多达50条记录,这会发送大量推送通知并最终刷新。 I know pusher has a rate limit of no more than 10 messages per second per client (connection).
我知道推送器的速率限制为每个客户端(连接)每秒不超过10条消息。 Is there any way to adjust that rate limit to say no more than 1 message per minute per client (connection)?
有什么办法可以调整速率限制,以使每个客户端(连接)每分钟不超过1条消息?
Note: I used to work for Pusher 注意:我曾经为Pusher工作
The rate limit you mention is actually when sending events between clients. 您提到的速率限制实际上是在客户端之间发送事件时。 It doesn't affect sending messages via their REST API.
它不会影响通过其REST API发送消息。
Client event docs can be found here: http://pusher.com/docs/client_api_guide/client_events#trigger-events 客户端事件文档可在以下位置找到: http : //pusher.com/docs/client_api_guide/client_events#trigger-events
The server docs don't say anything about a rate limit: http://pusher.com/docs/server_api_guide/interact_rest_api#publishing-events 服务器文档未说明速率限制: http : //pusher.com/docs/server_api_guide/interact_rest_api#publishing-events
You appear to have four options: 您似乎有四个选择:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.