Lower listen/connect retry intervals in Broker and the cluster framework to 1sec

The former defaults (30sec, 1min) can slow down cluster startup and recovery
considerably, and other systems have more aggressive intervals still.

(cherry picked from commit 68fadd0464)
This commit is contained in:
Christian Kreibich 2025-04-24 16:22:17 -07:00
parent 446f49e6bc
commit 458b887df1
4 changed files with 3 additions and 8 deletions

View file

@ -19,7 +19,7 @@ export {
## use already. Use of the ZEEK_DEFAULT_LISTEN_RETRY environment variable ## use already. Use of the ZEEK_DEFAULT_LISTEN_RETRY environment variable
## (set as a number of seconds) will override this option and also ## (set as a number of seconds) will override this option and also
## any values given to :zeek:see:`Broker::listen`. ## any values given to :zeek:see:`Broker::listen`.
const default_listen_retry = 30sec &redef; const default_listen_retry = 1sec &redef;
## Default address on which to listen. ## Default address on which to listen.
## ##
@ -36,7 +36,7 @@ export {
## ZEEK_DEFAULT_CONNECT_RETRY environment variable (set as number of ## ZEEK_DEFAULT_CONNECT_RETRY environment variable (set as number of
## seconds) will override this option and also any values given to ## seconds) will override this option and also any values given to
## :zeek:see:`Broker::peer`. ## :zeek:see:`Broker::peer`.
const default_connect_retry = 30sec &redef; const default_connect_retry = 1sec &redef;
## If true, do not use SSL for network connections. By default, SSL will ## If true, do not use SSL for network connections. By default, SSL will
## even be used if no certificates / CAs have been configured. In that case ## even be used if no certificates / CAs have been configured. In that case

View file

@ -260,7 +260,7 @@ export {
## Interval for retrying failed connections between cluster nodes. ## Interval for retrying failed connections between cluster nodes.
## If set, the ZEEK_DEFAULT_CONNECT_RETRY (given in number of seconds) ## If set, the ZEEK_DEFAULT_CONNECT_RETRY (given in number of seconds)
## environment variable overrides this option. ## environment variable overrides this option.
const retry_interval = 1min &redef; const retry_interval = 1sec &redef;
## When using broker-enabled cluster framework, nodes broadcast this event ## When using broker-enabled cluster framework, nodes broadcast this event
## to exchange their user-defined name along with a string that uniquely ## to exchange their user-defined name along with a string that uniquely

View file

@ -23,7 +23,6 @@ redef Cluster::nodes = {
redef exit_only_after_terminate = T; redef exit_only_after_terminate = T;
redef Log::enable_local_logging = T; redef Log::enable_local_logging = T;
redef Log::default_rotation_interval = 0secs; redef Log::default_rotation_interval = 0secs;
redef Cluster::retry_interval = 1sec;
function print_metrics(metrics: vector of Telemetry::Metric) function print_metrics(metrics: vector of Telemetry::Metric)
{ {

View file

@ -20,10 +20,6 @@ redef Cluster::nodes = {
@load misc/weird-stats @load misc/weird-stats
@load policy/frameworks/cluster/experimental @load policy/frameworks/cluster/experimental
redef Cluster::retry_interval = 1sec;
redef Broker::default_listen_retry = 1sec;
redef Broker::default_connect_retry = 1sec;
redef Log::enable_local_logging = T; redef Log::enable_local_logging = T;
redef Log::default_rotation_interval = 0secs; redef Log::default_rotation_interval = 0secs;
redef WeirdStats::weird_stat_interval = 5secs; redef WeirdStats::weird_stat_interval = 5secs;