[zeromq-dev] ROUTER-DEALER missing connects/messages.
Chuck Remes
lists at chuckremes.com
Wed Sep 26 17:11:14 CEST 2012
On Sep 25, 2012, at 11:06 AM, Dowd, Brian wrote:
> Two final questions :
> 1. What is a reasonable timeout, I've seen 1 second arbitrarily use, I assume that is ample time unless
> client/server are opposite sides of the globe ?
> 2. Will this always be the case ? or is there support planned for this to be handled internally to the pattern in time ?
1. The timeout needs to take into account your particular setup. If it's all on one machine, a timeout of 10ms might be a good start. Across multiple machines on a single LAN, start with 100ms. Across a WAN, take the longest RTT and double it for the timeout. No need to go to multiple seconds unless a) the machines are very far apart, b) the processes might swap, c) the processes may block for a variant amount of time, etc.
2. There has been talk about creating a queue during bind but no one has written the code. The semantics of such a thing are difficult to puzzle through so we may not ever see it.
Of course, for any non-trivial application you will likely want to build your application on top of one of the patterns defined in the guide (clone, majordomo, suicidal snail, etc.). You can encompass whatever handshake, timeout and/or retry logic that you like within those patterns.
cr
More information about the zeromq-dev
mailing list