elasticsearch - Elastic Search Multiple Publish Host -


is possible set different ips cluster discovery , external connectivity

like this:

es cluster setup

i want cluster auto discovery happen via 172.16.1.1x ips, , external sources, logstash, fluentd or couchbase connect cluster using 192.168.1.10 ip.

is possible? how configure this

note: i'm running es docker containers, in network.publish_host i'm using host machine's ip (172.16.1.1x) , auto discovery doing good. can connect cluster using 1 of 172.16.1.1x ips, want connect cluster using 192.168.1.10.

thanks in advance

you need change network.bind_host 192.168.1.10. means externally can connect cluster ip.

but better approach have proxy using nginx , give 3 nodes load balanced. can deploy nginx @ server "192.168.1.10" , use nodes load balanced upstream servers.

upstream elasticsearch {     server 172.16.1.10:9200 weight=1;     server 172.16.1.11:9200 weight=1;     server 172.16.1.12:9200 weight=1;     keepalive 15; } 

read more using nginx proxy here.

in scenario need set network.bind_host 172.16.1.10, 172.16.1.11 , 172.16.1.12 respectively or alternatively set network.host 172.16.1.10, 172.16.1.11 , 172.16.1.12. using nginx secure cluster also.

the external tools logstash can connect cluster using http://192.168.1.10:yournginxport