Skip to content
This repository was archived by the owner on Sep 21, 2023. It is now read-only.
This repository was archived by the owner on Sep 21, 2023. It is now read-only.

Allow the Elasticsearch output to load balance between multiple hosts #152

@cmacknz

Description

@cmacknz

Support load balancing when multiple Elasticsearch hosts are configured. The behaviour should be the same as the existing Elasticsearch output. See the hosts documentation:

The list of Elasticsearch nodes to connect to. The events are distributed to these nodes in round robin order. If one node becomes unreachable, the event is automatically sent to another node. Each Elasticsearch node can be defined as a URL or IP:PORT. For example: http://192.15.3.2, https://es.found.io:9230 or 192.24.3.2:9300. If no port is specified, 9200 is used.

The go-elasticsearch client accepts multiple host addresses per its configuration, which it uses with the elastictransport which claims to have this behaviour by default:

When multiple addresses are passed in configuration, the package will use them in a round-robin fashion, and will keep track of live and dead nodes. The status of dead nodes is checked periodically.

The scope of this issue should just be testing that the configuration works as desired without requiring any specific code changes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions