我们目前正在尝试基于 ejabberd 为我们当前的产品进行实时聊天,因此我们正在根据一些用例测试 ejabberd。
现在我们遇到了一个问题,当我们使用 rtb 向单个 MUC 订阅超过 20K(我们的目标是至少 100K 订阅到单个 MUC)用户时,在该 MUC 中发送消息将有非常大的延迟(10~ 15 秒),发生这种情况是否有任何可能的原因,或者我们做错了什么?
我们已经尝试打开
user_mucsub_from_muc_archive
和 use_mam_for_storage
来减轻我们 mysql 的加载,但它似乎并没有那么大的帮助
以下是我们的设定
mod_mam:
## Mnesia is limited to 2GB, better to use an SQL backend
## For small servers SQLite is a good fit and is very easy
## to configure. Uncomment this when you have SQL configured:
##db_type: sql
assume_mam_usage: true
default: always
clear_archive_on_room_destroy: true
user_mucsub_from_muc_archive: true
mod_muc:
access:
- allow
access_admin:
- allow: admin
access_create: muc_create
access_persistent: muc_create
access_mam:
- allow
default_room_options:
mam: true
persistent: true
allow_subscription: true
max_users: 5000
history_size: 0
mod_offline:
access_max_user_messages: max_user_offline_messages
use_mam_for_storage: true