# ElasticSearch Synchronization on Cluster Server Setup

**URL:** <https://discuss.elastic.co/t/elasticsearch-synchronization-on-cluster-server-setup/43983>\
**Category:** Elasticsearch\
**Created:** [March 10, 2016, 6:53am UTC](https://discuss.elastic.co/t/elasticsearch-synchronization-on-cluster-server-setup/43983 "2016-03-10T06:53:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nitin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nitin/32/20151_2.png) [@nitin](https://discuss.elastic.co/u/nitin)\
**Post date:** [March 10, 2016, 6:53am UTC](https://discuss.elastic.co/t/elasticsearch-synchronization-on-cluster-server-setup/43983/1 "2016-03-10T06:53:26Z")

</div>

I am starting to implement elastic search in my project. The project is J2EE application deployed on Weblogic Clustered environment. Which means my java classes would be present at different locations/nodes in a cluster. If I use Elastic search Java api to put/get data , will it look only for the ES nodes on that particular node or throughout my Weblogic Cluster setup. If only local node , then what should I do to make sure all the logs from my Applications Server nodes are in sync.  
Should I go for one single node at a location and use that location in all my classes to put/get data? If yes, then a small code snippet would be helpful.

Regards

---

<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:** [March 10, 2016, 7:31am UTC](https://discuss.elastic.co/t/elasticsearch-synchronization-on-cluster-server-setup/43983/2 "2016-03-10T07:31:53Z")

</div>

You can imagine launching an elasticsearch node local to every single weblogic instance but with:

```auto
node.data: false
node.master: false

```

in `elasticsearch.yml` file. You will have a client node.

Then in your application, just use a [TransportClient](https://www.elastic.co/guide/en/elasticsearch/client/java-api/master/transport-client.html) which connects locally to the local elasticsearch node (basically to `127.0.0.1:9300`).

All client nodes will write/read to/from your elasticsearch cluster which will run on its own on other machines.

Make sense?

---

<div class="post-metadata">

**Author:** ![nitin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nitin/32/20151_2.png) [@nitin](https://discuss.elastic.co/u/nitin)\
**Post date:** [March 10, 2016, 8:37am UTC](https://discuss.elastic.co/t/elasticsearch-synchronization-on-cluster-server-setup/43983/3 "2016-03-10T08:37:41Z")

</div>

Yes makes sense David.  
Just one thing : You say- "in elasticsearch.yml file. You will have a client node."  
I understand, I will have to set the IP address and port of ES data cluster.  
Which property to be set in yaml to do this?  
Forgive my ignorance, I am just a beginner in the area.

Regards

---

<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:** [March 10, 2016, 8:54am UTC](https://discuss.elastic.co/t/elasticsearch-synchronization-on-cluster-server-setup/43983/4 "2016-03-10T08:54:57Z")

</div>

I meant that you download elasticsearch, unzip, then modify the existing `config/elasticsearch.yml` file and set in it:

```auto
node.data: false
node.master: false

# And probably:
cluster.name: yourclustername
network.host: _eth0_
discovery.zen.ping.unicast.hosts: ["x.x.x.x:9300", "x.x.x.y:9300", "x.x.x.z:9300"]

```

Where `x.x.x.*` are the IP of your cluster.

Then launch your local node with `bin/elasticsearch`. It will join the cluster (which is running at `x.x.x.*`).

Then in your java code, use the transport client as I described.

---

<div class="post-metadata">

**Author:** ![nitin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nitin/32/20151_2.png) [@nitin](https://discuss.elastic.co/u/nitin)\
**Post date:** [March 10, 2016, 11:14am UTC](https://discuss.elastic.co/t/elasticsearch-synchronization-on-cluster-server-setup/43983/5 "2016-03-10T11:14:52Z")

</div>

Got iT.. Will try the same Thanks 👍

---

<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, 11:09pm UTC](https://discuss.elastic.co/t/elasticsearch-synchronization-on-cluster-server-setup/43983/6 "2017-07-05T23:09:33Z")

</div>


