[zeromq-dev] Need 100K+ IPC sockets

Ivan Pechorin ivan.pechorin at gmail.com
Tue Feb 25 22:16:10 CET 2014


Correct me if I'm wrong here, but I suspect you can't create more than 64K
of ZeroMQ sockets on a single non-Linux box just because every ZeroMQ
socket has a socketpair, which occupies one ephemeral port. Total number
ports is limited to 64K on any single box.

On Linux ZeroMQ uses eventfd instead of socketpair, so this limit is not
applicable.



2014-02-26 9:08 GMT+13:00 Joe Lin <jlin at peaxy.net>:

> I'm building a server that should support 100K+ concurrent users. A user
> belongs to one or more groups and the number of groups would be around 1/10
> of the total users. Therefore there will be about 10K groups. A user needs
> to be notified by the events that occur in the groups that he/she belong
> and the events occur at a  frequency 10/sec/group.
>
> My idea is to create a 0MQ broker per group. A user will be connected to
> one or more brokers via 0MQ IPC socket (maybe a ROUTER socket). When an
> event is sent to a broker the broker then route the event to the connected
> clients. Let's say that a user usually belong to 5 groups. It means that,
> for 100K users and 10K groups I will need to bind 10K IPC sockets and will
> need 500K IPC socket connection in the server.
>
>
> So I have two questions regarding this:
>
> 1. Does this sound like a reasonable use case to use 0MQ IPC socket? Any
> alternative design?
>
> 2. Does ZeroMq limit the number of sockets per context? It seems that I
> get a failure of "too many open files" although my system has ulimit of
> "unlmited"
>
>
> Thanks for any help.
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140226/d9c7dcb3/attachment.htm>


More information about the zeromq-dev mailing list