[zeromq-dev] High CPU load on polling timeout
Luca Boccassi
luca.boccassi at gmail.com
Wed Nov 8 19:59:24 CET 2017
On Wed, 2017-11-08 at 19:59 +0200, Mykola Ostrovskyy via zeromq-dev
wrote:
> 2017-11-08 15:54 GMT+02:00 Luca Boccassi <luca.boccassi at gmail.com>:
>
> >
> > Heartbeats are now included in the protocol, check the various
> > ZMQ_HEARTBEAT_* socket options
> >
> > --
> > Kind regards,
> > Luca Boccassi
> >
> >
>
> Luca,
>
> Thanks for the quick reply.
>
> From the first look ZMQ_HEARTBEAT_* stuff is quite different from
> what I
> have now. I will investigate more, but it looks like I would need
> substantial redesign to switch to that.
>
> Is there a way to get the pattern described in the guide to work? Or
> is it
> explicitly not supposed to work anymore?
>
> After all, heart beat implementation is just one use case.
> Hypothetically,
> there can be different scenarios where you try to send some data to
> REP
> socket, time out waiting for reply, and eventually retrying to send
> it
> again.
>
>
> Regards,
> Mykola
It can work - but don't continuously create and delete sockets, that's
a known anti-pattern. They are all async operation that happen in the
background. With such a small poll timeout, the connection might not
even have been attempted when you destroy the socket.
--
Kind regards,
Luca Boccassi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20171108/0f31f7c8/attachment.sig>
More information about the zeromq-dev
mailing list