summaryrefslogtreecommitdiff
path: root/src/zmq_connecter.hpp
diff options
context:
space:
mode:
authorMartin Lucina <mato@kotelna.sk>2010-10-08 17:49:40 +0200
committerMartin Sustrik <sustrik@250bpm.com>2010-10-08 17:49:40 +0200
commitf90c8d957ea2a11c73a307aae2494a26d22c2f3b (patch)
tree8ead216f7f512394da0e50048bb03f7ed7a3c104 /src/zmq_connecter.hpp
parent7a685b0f88386b11c4c1fcbb45324aa28f4e2eac (diff)
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 <mato@kotelna.sk>
Diffstat (limited to 'src/zmq_connecter.hpp')
-rw-r--r--src/zmq_connecter.hpp3
1 files changed, 3 insertions, 0 deletions
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;