[zeromq-dev] cleaning up TCP sockets

Joel Lauener Joel.Lauener at cern.ch
Thu Mar 21 14:27:38 CET 2013


Hi Pieter, thanks for your quick answer.

> What does "get stuck" mean? If clients keep their connections open,
> this will use up resources on the server. However unless you're talking
> about very large numbers of clients it's not going to cause problems.

We are migrating an infrastructure with ~3500 active servers and ~1500 active clients from CORBA to ZMQ. We only provide the library, our users implement the clients/servers on top of it and deploy were/how they want. We also have many combinations of hardware/OS: low level front-ends, middle tier servers and workstations. As you can see our system is quite open and complex :/

By "stuck client" I mean a client for which the process is blocked (deadlock, OS problem, hardware problem) but for which the TCP stack is still alive. Of course this is very unlikely to happen, but from our experience it can happen. For example a virtual machine going into hibernation can have very nasty  behaviour.

This is not an hard requirement, just a nice to have. I guess the only (clean) way is to have one ZMQ socket per client instead of a single ROUTER.

Joel.

-----Original Message-----
From: zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-bounces at lists.zeromq.org] On Behalf Of Pieter Hintjens
Sent: 21 March 2013 12:03
To: ZeroMQ development list
Subject: Re: [zeromq-dev] cleaning up TCP sockets

On Thu, Mar 21, 2013 at 11:34 AM, Joel Lauener <Joel.Lauener at cern.ch> wrote:

> When, through heartbeat, the client detects that a server is not 
> responding I close the corresponding DEALER socket. This in turns 
> should close the underlying TCP socket.

Yes.

> I'm afraid that this could be a potential problem in production if 
> several clients got stuck and they pile up.

What does "get stuck" mean? If clients keep their connections open, this will use up resources on the server. However unless you're talking about very large numbers of clients it's not going to cause problems.

-Pieter
_______________________________________________
zeromq-dev mailing list
zeromq-dev at lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev



More information about the zeromq-dev mailing list