Skip to content
This repository was archived by the owner on Apr 13, 2026. It is now read-only.
This repository was archived by the owner on Apr 13, 2026. It is now read-only.

Transport client best practices #9

Description

@ESamir

The documentation only explain how to add a single transport address corresponding to one of the IP addresses returned when resolving the Elasticsearch cluster host name. but if the node IP changes, the application won't be able to contact the node anymore because Elastic Search client will never attempt to resolve again the host name to find a new IP address.

The ELB for a cluster have multiple IPs associted with it,
via a DNS resolution we can fetch all the IP addresses associated with the cluster ELB. add all the IP addresses as transport addresses in the ES transport client. The ES client should then automatically use a round-robin logic when contacting the different ips.

To make sure the client node pool is refreshed, we would have a thread periodically polling the client for the list of IPs and comparing it against the list of addresses returned via a DNS resolution on the cloud cluster hostname. Any IP that isn't part of the DNS response would be removed from the pool while new IPs would be added.

Can we add an example in the documentation

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions