# Elasticsearch Cluster Setup using public ip on aws and google cloud

**URL:** <https://discuss.elastic.co/t/elasticsearch-cluster-setup-using-public-ip-on-aws-and-google-cloud/62031>\
**Category:** Elasticsearch\
**Created:** [October 3, 2016, 7:33am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-setup-using-public-ip-on-aws-and-google-cloud/62031 "2016-10-03T07:33:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harsha\_Reddy](https://avatars.discourse-cdn.com/v4/letter/h/22d042/32.png) [@Harsha\_Reddy](https://discuss.elastic.co/u/Harsha_Reddy)\
**Post date:** [October 3, 2016, 7:33am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-setup-using-public-ip-on-aws-and-google-cloud/62031/1 "2016-10-03T07:33:34Z")

</div>

I have 1 instance in aws and 1 instance in google cloud. I am trying to make 2 node cluster between them. I am using following configuration on both nodes  
Node-1:(aws):  
[cluster.name](http://cluster.name): abc  
[node.name](http://node.name): node1  
network.host: 0.0.0.0 (unable to bind public ip)  
discovery.zen.ping.unicast.hosts: ["node1 public ip", "node2 public ip"]  
discovery.zen.ping.multicast.enabled: false

Node-2:(gcloud):  
[cluster.name](http://cluster.name): abc  
[node.name](http://node.name): node2  
network.host: 0.0.0.0 (unable to bind public ip)  
discovery.zen.ping.unicast.hosts: ["node1 public ip", "node2 public ip"]  
discovery.zen.ping.multicast.enabled: false

But they are not detecting each other. please help me

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 3, 2016, 8:18am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-setup-using-public-ip-on-aws-and-google-cloud/62031/2 "2016-10-03T08:18:22Z")

</div>

First, I would definitely not do this. Having a cluster in 2 different data centers is a bad idea IMO.  
Not sure what you want to do such a thing.

That being said, you need to make sure that ports 9300 are opened to the public (or to your other public IP).

And you did not give the version.

---

<div class="post-metadata">

**Author:** ![Harsha\_Reddy](https://avatars.discourse-cdn.com/v4/letter/h/22d042/32.png) [@Harsha\_Reddy](https://discuss.elastic.co/u/Harsha_Reddy)\
**Post date:** [October 3, 2016, 8:30am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-setup-using-public-ip-on-aws-and-google-cloud/62031/3 "2016-10-03T08:30:39Z")

</div>

Thanks david for your reply. Actually we are moving out of aws . i want to replicate the data on google cloud instance. so i am trying to add this(google instance node) to my 1 node cluster which is on aws. I am using 2.3.4 version and I opened 9300 port. Still doesn't works.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 3, 2016, 8:43am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-setup-using-public-ip-on-aws-and-google-cloud/62031/4 "2016-10-03T08:43:25Z")

</div>

Use snapshot and restore.

That's definitely better to move your data from one cluster to another.

So backup on S3 with `cloud-aws` plugin. Install the same plugin on your gcloud instance and restore from there.

Better than opening ports IMO.

---

<div class="post-metadata">

**Author:** ![Harsha\_Reddy](https://avatars.discourse-cdn.com/v4/letter/h/22d042/32.png) [@Harsha\_Reddy](https://discuss.elastic.co/u/Harsha_Reddy)\
**Post date:** [October 3, 2016, 8:45am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-setup-using-public-ip-on-aws-and-google-cloud/62031/5 "2016-10-03T08:45:56Z")

</div>

I will loose some data right?? I mean First i will take the snapshot of the cluster.Meanwhile some documents might get indexed. For that data again i have to take snapshot?? I am confused .please help me

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 3, 2016, 12:59pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-setup-using-public-ip-on-aws-and-google-cloud/62031/6 "2016-10-03T12:59:43Z")

</div>

Ideally you should stop injecting on AWS cluster.

That said, you can always snapshot after the first snapshot and restore again from GCloud cluster. Only new segments will be copied over.

A solution could be:

- snapshot `old` index from AWS cluster to S3
- restore `old` index in Google cluster from S3
- send your write traffic to Google cluster instead of AWS in index named `new`
- search in both indices `new` and `old` (note that you can use an alias)
- snapshot `old` index again from AWS cluster to S3
- restore `old` index again in Google cluster from S3

Then you will have a new cluster mixing old and new data on google cloud.

My 2 cents. I hope this helps.

---

<div class="post-metadata">

**Author:** ![Harsha\_Reddy](https://avatars.discourse-cdn.com/v4/letter/h/22d042/32.png) [@Harsha\_Reddy](https://discuss.elastic.co/u/Harsha_Reddy)\
**Post date:** [October 3, 2016, 1:19pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-setup-using-public-ip-on-aws-and-google-cloud/62031/7 "2016-10-03T13:19:29Z")

</div>

Thank you very much David

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:15pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-setup-using-public-ip-on-aws-and-google-cloud/62031/8 "2017-07-05T22:15:25Z")

</div>


