[zeromq-dev] Default PUBSUB behavior
Martin Sustrik
sustrik at 250bpm.com
Wed Jan 12 08:33:09 CET 2011
Hi Chris,
> 1. This behavior implies that aggregate transmission rate is governed by
> the slowest subscriber; is that a correct assumption? If true, I assume
> this means the subscriber pool shares a global queuing mechanism. Correct?
> Anyway to avoid the problem of extremely slow subscribers from stopping
> the entire subscription base?
No. The distribution is not governed by the slowest consumer. The drop
in the throughput is cause by using unicast. With unicast such as tcp or
ipc you have to send every message to each subscriber, which means the
throughput will decrease linearly with number of subscribers. If you
want publisher to perform the same no matter what number of subscribers
there is you'll have to move to multicast such as pgm.
As for the slow consumers 0mq queues messages for those that are not
keeping up with publisher. If the resources dedicated for the queueing
are depleted (HWM, SWAP) it start dropping messages for that particular
consumer.
> 2. On the second test, there appeared at times that the process was
> stalled for several seconds at a time. It didn't appear that other
> activities on my system were affected by sluggish internet. What might
> account for these stalls? Again test2 involved 1 pub, 1 forwarder and 1
> subscriber all on the localhost and 1 subscriber sitting across the
> internet.
No idea. It can be anything from the hardware up to the OS or 0MQ. If
you can create a minimal reproducible test case, please do report the
problem.
Martin
More information about the zeromq-dev
mailing list