java获取mosquitto连接数,MQTT mosquitto linux的连接数限制

How are users getting past a 1024 connection limit in Linux in association with doing MQTT for push notification?

I am using Mosquitto server, which I think I read does not have a 1024 connection limit built into the linux version. So, can I use a single server (no bridging etc) and get 5,000, 10,000+ users?

Or, do I absolutely need bridging? I haven't seen a lot of writing on how this is setup other than the config settings man page for mosquitto.

Or, can I get by with just modify a few linux configuration settings and I'm good to go with a single mosquitto server?

My app is more or less an instant messaging app, so I expect to have ~10,000 maybe even 20,000 people using it with permanent 24/7 connections to mosquitto to alert them of messages.

Hmmm

解决方案

In theory you could up the Linux setting for max number of sockets for mosquitto to what you need. The question then is around performance. The key metric is number of messages per second total. If you have 20k clients connected, how many will be active and how many messages will each be sending?

As an example, if half of your clients are active and sending 1 message per second, there are 10k msps - incoming only of course. If each of those messages is 10 bytes, you're at a sustained 100kB/s or 800kbps.

Another aspect is how your topic hierarchy is arranged. I can't tell you what is best, but it will certainly have an effect.

My best suggestion would be to write a client that simulates a real person, then use it to so real testing of your scenario.

I have seen examples of extreme client count: http://bit.ly/HytRpK but have no more details.

One final point: IBM are currently producing a redbook on MQTT. It should be available 'in spring', i.e. soon. I think it will cover scaling issues.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值