From f90c8d957ea2a11c73a307aae2494a26d22c2f3b Mon Sep 17 00:00:00 2001 From: Martin Lucina Date: Fri, 8 Oct 2010 17:49:40 +0200 Subject: Scalability improvements for large amounts of connections Add signaler_sndbuf_size option to config.hpp which allows the user to increase the size of the send buffer used by the signalling socketpair. Implement random backoff for reconnection attempts using a primitive pseudo-random generation to prevent reconnection storms. Add wait_before_connect option to config.hpp to allow the user to enable random delay even on initial connect. Default is false for low latency. Signed-off-by: Martin Lucina --- src/zmq_connecter.hpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/zmq_connecter.hpp') diff --git a/src/zmq_connecter.hpp b/src/zmq_connecter.hpp index 16bfc31..7a516f0 100644 --- a/src/zmq_connecter.hpp +++ b/src/zmq_connecter.hpp @@ -56,6 +56,9 @@ namespace zmq // Internal function to start the actual connection establishment. void start_connecting (); + // Internal function to return the reconnect backoff delay. + int get_reconnect_period (); + // Actual connecting socket. tcp_connecter_t tcp_connecter; -- cgit v1.2.3