Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent 'thundering herd' issue with the scale preset #42329

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions libbeat/outputs/elasticsearch/config_presets.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ var presetConfigs = map[string]*config.C{
"queue.mem.flush.timeout": 20 * time.Second,
"compression_level": 1,
"idle_connection_timeout": 1 * time.Second,
"backoff.init": 5 * time.Second,
"backoff.max": 300 * time.Second,
}),
presetLatency: config.MustNewConfigFrom(map[string]interface{}{
"bulk_max_size": 50,
Expand Down
17 changes: 16 additions & 1 deletion libbeat/outputs/elasticsearch/docs/elasticsearch.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,8 @@ Setting `bulk_max_size` to values less than or equal to 0 disables the
splitting of batches. When splitting is disabled, the queue decides on the
number of events to be contained in a batch.


[[backoff-init-option]]
===== `backoff.init`

The number of seconds to wait before trying to reconnect to Elasticsearch after
Expand All @@ -689,6 +691,7 @@ to `backoff.max`. After a successful connection, the backoff timer is reset. The
default is `1s`.


[[backoff-max-option]]
===== `backoff.max`

The maximum number of seconds to wait before attempting to connect to
Expand Down Expand Up @@ -774,7 +777,7 @@ output.elasticsearch:
preset: balanced
------------------------------------------------------------------------------

Performance presets apply a set of configuration overrides based on a desired performance goal. If set, a performance preset will override other configuration flags to match the recommended settings for that preset. Valid options are:
Performance presets apply a set of configuration overrides based on a desired performance goal. If set, a performance preset will override other configuration flags to match the recommended settings for that preset. If a preset doesn't set a value for a particular field, the user-specified value will be used if present, otherwise the default. Valid options are:
* `balanced`: good starting point for general efficiency
* `throughput`: good for high data volumes, may increase cpu and memory requirements
* `scale`: reduces ambient resource use in large low-throughput deployments
Expand Down Expand Up @@ -830,6 +833,18 @@ Presets represent current recommendations based on the intended goal; their effe
|`15s`
|`1s`
|`60s`

|<<backoff-init-option,`backoff.init`>>
|none
|none
|`5s`
|none

|<<backoff-max-option,`backoff.max`>>
|none
|none
|`300s`
|none
|===

[[es-apis]]
Expand Down
Loading