diff options
author | Martin Lucina <mato@kotelna.sk> | 2010-10-08 17:49:40 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2010-10-08 17:49:40 +0200 |
commit | f90c8d957ea2a11c73a307aae2494a26d22c2f3b (patch) | |
tree | 8ead216f7f512394da0e50048bb03f7ed7a3c104 /src/config.hpp | |
parent | 7a685b0f88386b11c4c1fcbb45324aa28f4e2eac (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/config.hpp')
-rw-r--r-- | src/config.hpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/config.hpp b/src/config.hpp index 57c2373..0d24d40 100644 --- a/src/config.hpp +++ b/src/config.hpp @@ -39,6 +39,10 @@ namespace zmq // using a single system call. signal_buffer_size = 8, + // Socketpair send buffer size used by signaler. The default value of + // zero means leave it at the system default. + signaler_sndbuf_size = 0, + // Determines how often does socket poll for new commands when it // still has unprocessed messages to handle. Thus, if it is set to 100, // socket will process 100 inbound messages before doing the poll. @@ -72,6 +76,9 @@ namespace zmq // How long to wait (milliseconds) till reattempting to connect. reconnect_period = 100, + // Should initial connection attempts be delayed? + wait_before_connect = false, + // Maximal delay to process command in API thread (in CPU ticks). // 3,000,000 ticks equals to 1 - 2 milliseconds on current CPUs. // Note that delay is only applied when there is continuous stream of @@ -87,7 +94,7 @@ namespace zmq // Maximal number of non-accepted connections that can be held by // TCP listener object. - tcp_connection_backlog = 10, + tcp_connection_backlog = 100, // Maximum transport data unit size for PGM (TPDU). pgm_max_tpdu = 1500 |