diff --git a/docs/config/network.en.md b/docs/config/network.en.md index 502238bd..bc9424b8 100644 --- a/docs/config/network.en.md +++ b/docs/config/network.en.md @@ -248,7 +248,7 @@ etcd_report_interval to guarantee that keepalive actually works. ## etcd_ws_keepalive_interval - Type: seconds -- Default: 30 +- Default: 5 - Can be changed online: yes etcd websocket ping interval required to keep the connection alive and diff --git a/docs/config/network.ru.md b/docs/config/network.ru.md index 677446a6..b26e58fa 100644 --- a/docs/config/network.ru.md +++ b/docs/config/network.ru.md @@ -259,7 +259,7 @@ etcd_report_interval, чтобы keepalive гарантированно рабо ## etcd_ws_keepalive_interval - Тип: секунды -- Значение по умолчанию: 30 +- Значение по умолчанию: 5 - Можно менять на лету: да Интервал проверки живости вебсокет-подключений к etcd. diff --git a/docs/config/src/network.yml b/docs/config/src/network.yml index a49a4063..3a3e9c56 100644 --- a/docs/config/src/network.yml +++ b/docs/config/src/network.yml @@ -282,7 +282,7 @@ etcd_report_interval, чтобы keepalive гарантированно работал. - name: etcd_ws_keepalive_interval type: sec - default: 30 + default: 5 online: true info: | etcd websocket ping interval required to keep the connection alive and diff --git a/mon/etcd_adapter.js b/mon/etcd_adapter.js index 00c7bd5e..0c8d57ee 100644 --- a/mon/etcd_adapter.js +++ b/mon/etcd_adapter.js @@ -175,7 +175,7 @@ class EtcdAdapter console.log('etcd websocket timed out, restarting it'); this.restart_watcher(cur_addr); } - }, (Number(this.mon.config.etcd_ws_keepalive_interval) || 30)*1000); + }, (Number(this.mon.config.etcd_ws_keepalive_interval) || 5)*1000); this.ws.on('error', () => this.restart_watcher(cur_addr)); this.ws.send(JSON.stringify({ create_request: { diff --git a/mon/etcd_schema.js b/mon/etcd_schema.js index b7c5579e..1034cc14 100644 --- a/mon/etcd_schema.js +++ b/mon/etcd_schema.js @@ -91,7 +91,7 @@ const etcd_tree = { etcd_quick_timeout: 1000, // ms etcd_slow_timeout: 5000, // ms etcd_keepalive_timeout: 30, // seconds, default is max(30, etcd_report_interval*2) - etcd_ws_keepalive_interval: 30, // seconds + etcd_ws_keepalive_interval: 5, // seconds // osd etcd_report_interval: 5, // seconds etcd_stats_interval: 30, // seconds diff --git a/src/client/etcd_state_client.cpp b/src/client/etcd_state_client.cpp index 04b1297d..503d294b 100644 --- a/src/client/etcd_state_client.cpp +++ b/src/client/etcd_state_client.cpp @@ -253,7 +253,7 @@ void etcd_state_client_t::parse_config(const json11::Json & config) this->etcd_ws_keepalive_interval = config["etcd_ws_keepalive_interval"].uint64_value(); if (this->etcd_ws_keepalive_interval <= 0) { - this->etcd_ws_keepalive_interval = 30; + this->etcd_ws_keepalive_interval = 5; } this->max_etcd_attempts = config["max_etcd_attempts"].uint64_value(); if (this->max_etcd_attempts <= 0) diff --git a/src/client/etcd_state_client.h b/src/client/etcd_state_client.h index 3b0300d7..5fcbc3ec 100644 --- a/src/client/etcd_state_client.h +++ b/src/client/etcd_state_client.h @@ -103,7 +103,7 @@ protected: void pick_next_etcd(); public: int etcd_keepalive_timeout = 30; - int etcd_ws_keepalive_interval = 30; + int etcd_ws_keepalive_interval = 5; int max_etcd_attempts = 5; int etcd_quick_timeout = 1000; int etcd_slow_timeout = 5000;