zoukankan      html  css  js  c++  java
  • tigase单个连接消息量限制配置(三)

    tigase的每个连接消息量限制配置

    现象:

    一个客户端一次循环发送了10000多条;tigase会断线,断线一段时间后,客户端自动重连;

    每个连接限制值:

    tigase.server.ConnectionManager里有很多限制值,跟其中有2个限制值有关;

    last_minute_packets_limit:一分钟消息数限制

    total_packets_limit:总数限制,默认是0,不限制

    last_minute_bin_limit:每分钟字节数限制,内容长度超限;默认20000000L bytes;

    ##超限处理: packet数超限:

    第一种丢弃包,不做其他处理;

    第二种丢弃包,断开连接;(默认)

    字节数超限:

    丢弃包,断开连接;

    ##修改配置: --cm-traffic-throttling = xmpp:2500:0:disc,bin:20m:0:disc

    xmpp:报文;2500个每分钟,超了关连接或者drop丢弃 bin:报文总大小(bytes),20m每分钟,超了关连接,或者drop丢弃

    Default value: 
    xmpp:2500:0:disc,bin:20m:0:disc
    Example: 
    --cm-traffic-throttling = xmpp:2500:0:disc,bin:20m:0:disc
    Possible values: 
    comma separated list of traffic limits settings
    Description: 
    The property allows you to limit traffic on user connections. These limits are applied to each user connection and if a limit is exceeded then a specified action is applied.
    The property value is a comma separated list of traffic limits settings. For example the first part: xmpp:2500:0:disc specifies traffic limits for XMPP data to 2,500 packets allowed within last minute either sent to or received from a user and unlimited (0) total traffic on the user connection, in case any limit is exceeded the action is to disconnect the user.
    [xmpp|bin] traffic type, xmpp - XMPP traffic, that is limits refer to a number of XMPP packets transmitted, bin - binary traffic, that is limits refer to a number of bytes transmitted.
    2500 maximum traffic allowed within 1 minute. 0 means unlimited, or no limits.
    0 maximum traffic allowed for the life span of the connection. 0 means unlimited or no limits.
    [disc|drop] action performed on the connection if limits are exceeded. disc - means disconnect, drop - means drop data.
    学海无涯、何时是岸
  • 相关阅读:
    监控系统
    RocketMQ入门介绍
    Linux的虚拟内存详解(MMU、页表结构) 转
    快速排序
    如何选择分布式事务解决方案? 转
    java 基本数据类型相关思考
    互联网项目中mysql应该选什么事务隔离级别 转
    线上服务的FGC问题排查,看这篇就够了! 转
    什么是Base64? 转
    业界难题-“跨库分页”的四种方案 转
  • 原文地址:https://www.cnblogs.com/veblen/p/14703633.html
Copyright © 2011-2022 走看看