# Scaling problem

**URL:** <https://discuss.elastic.co/t/scaling-problem/23525>\
**Category:** Elasticsearch\
**Created:** [May 4, 2015, 6:12am UTC](https://discuss.elastic.co/t/scaling-problem/23525 "2015-05-04T06:12:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shohedul\_Hasan](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@Shohedul\_Hasan](https://discuss.elastic.co/u/Shohedul_Hasan)\
**Post date:** [May 4, 2015, 6:12am UTC](https://discuss.elastic.co/t/scaling-problem/23525/1 "2015-05-04T06:12:40Z")

</div>

Hi,  
I have installed ES in one server. I want to create 3-4 servers for my ES  
cluster. But when i send request in which server i should send from my  
java code and how? I have read once, putting one user's data in one primary  
shard helps to improve performance. I have also read that using Nginx as  
load balancer also improve performance. Now my question is, how can i put  
these two things together? Also how one ES server knows about other ES  
servers ? Finally can you give me some useful links by which i can try to  
scale ES in multiple server.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/345f86bd-bf6d-4f10-9ef3-7f429b0b17f5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/345f86bd-bf6d-4f10-9ef3-7f429b0b17f5%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Jason\_Wee](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jason\_Wee](https://discuss.elastic.co/u/Jason_Wee)\
**Post date:** [May 4, 2015, 6:35am UTC](https://discuss.elastic.co/t/scaling-problem/23525/2 "2015-05-04T06:35:01Z")

</div>

If you are using java transport client in elasticsearch, you just add one  
of the elasticsearch node with setting sniff to on. The the transport  
client should have all the information it needed. When the transport client  
index, iirc, it is in round robin fashion. The es cluster node is  
intelligent enough to replicate the write to the other es nodes.

hth

jason

On Mon, May 4, 2015 at 2:12 PM, Shohedul Hasan [shakil@qianalysis.com](mailto:shakil@qianalysis.com)  
wrote:

> Hi,  
> I have installed ES in one server. I want to create 3-4 servers for my ES  
> cluster. But when i send request in which server i should send from my  
> java code and how? I have read once, putting one user's data in one primary  
> shard helps to improve performance. I have also read that using Nginx as  
> load balancer also improve performance. Now my question is, how can i put  
> these two things together? Also how one ES server knows about other ES  
> servers ? Finally can you give me some useful links by which i can try to  
> scale ES in multiple server.
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/345f86bd-bf6d-4f10-9ef3-7f429b0b17f5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/345f86bd-bf6d-4f10-9ef3-7f429b0b17f5%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/345f86bd-bf6d-4f10-9ef3-7f429b0b17f5%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/345f86bd-bf6d-4f10-9ef3-7f429b0b17f5%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAHO4itw1iP9QHX%2BYxgAJEf2mQ0%2Bgu6-myX6g-EbmEwDUc2VjEg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHO4itw1iP9QHX%2BYxgAJEf2mQ0%2Bgu6-myX6g-EbmEwDUc2VjEg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Shohedul\_Hasan](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@Shohedul\_Hasan](https://discuss.elastic.co/u/Shohedul_Hasan)\
**Post date:** [May 4, 2015, 6:45am UTC](https://discuss.elastic.co/t/scaling-problem/23525/3 "2015-05-04T06:45:12Z")

</div>

Yes i am using transport client, i can add the all servers' address in  
transport client instantiation. But how do ES server will know each other  
?? And are you telling me that i don't need to use Nginx as load balancer,  
ES transport client will automatically do it for me ??

On Monday, May 4, 2015 at 12:35:10 PM UTC+6, Jason Wee wrote:

> If you are using java transport client in elasticsearch, you just add one  
> of the elasticsearch node with setting sniff to on. The the transport  
> client should have all the information it needed. When the transport client  
> index, iirc, it is in round robin fashion. The es cluster node is  
> intelligent enough to replicate the write to the other es nodes.
> 
> hth
> 
> jason
> 
> On Mon, May 4, 2015 at 2:12 PM, Shohedul Hasan \<[sha...@qianalysis.com](mailto:sha...@qianalysis.com)  
> \<javascript:\>\> wrote:
> 
> > Hi,  
> > I have installed ES in one server. I want to create 3-4 servers for my ES  
> > cluster. But when i send request in which server i should send from my  
> > java code and how? I have read once, putting one user's data in one primary  
> > shard helps to improve performance. I have also read that using Nginx as  
> > load balancer also improve performance. Now my question is, how can i put  
> > these two things together? Also how one ES server knows about other ES  
> > servers ? Finally can you give me some useful links by which i can try to  
> > scale ES in multiple server.
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/345f86bd-bf6d-4f10-9ef3-7f429b0b17f5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/345f86bd-bf6d-4f10-9ef3-7f429b0b17f5%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/345f86bd-bf6d-4f10-9ef3-7f429b0b17f5%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/345f86bd-bf6d-4f10-9ef3-7f429b0b17f5%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/c6b6562c-c01d-449c-a9e3-705d4ffadfd0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c6b6562c-c01d-449c-a9e3-705d4ffadfd0%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Jason\_Wee](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jason\_Wee](https://discuss.elastic.co/u/Jason_Wee)\
**Post date:** [May 4, 2015, 7:29am UTC](https://discuss.elastic.co/t/scaling-problem/23525/4 "2015-05-04T07:29:27Z")

</div>

read these links, it should answer your question.

[http://www.elastic.co/guide/en/elasticsearch/client/java-api/1.x/client.html#transport-client](http://www.elastic.co/guide/en/elasticsearch/client/java-api/1.x/client.html#transport-client)

> **[Transport Client Versus Node Client | Elasticsearch: The Definitive Guide...](https://www.elastic.co/guide/en/elasticsearch/guide/current/_transport_client_versus_node_client.html)**

jason

On Mon, May 4, 2015 at 2:45 PM, Shohedul Hasan [shakil@qianalysis.com](mailto:shakil@qianalysis.com)  
wrote:

> Yes i am using transport client, i can add the all servers' address in  
> transport client instantiation. But how do ES server will know each other  
> ?? And are you telling me that i don't need to use Nginx as load balancer,  
> ES transport client will automatically do it for me ??
> 
> On Monday, May 4, 2015 at 12:35:10 PM UTC+6, Jason Wee wrote:
> 
> > If you are using java transport client in elasticsearch, you just add one  
> > of the elasticsearch node with setting sniff to on. The the transport  
> > client should have all the information it needed. When the transport client  
> > index, iirc, it is in round robin fashion. The es cluster node is  
> > intelligent enough to replicate the write to the other es nodes.
> > 
> > hth
> > 
> > jason
> > 
> > On Mon, May 4, 2015 at 2:12 PM, Shohedul Hasan [sha...@qianalysis.com](mailto:sha...@qianalysis.com)  
> > wrote:
> > 
> > > Hi,  
> > > I have installed ES in one server. I want to create 3-4 servers for my  
> > > ES cluster. But when i send request in which server i should send from my  
> > > java code and how? I have read once, putting one user's data in one primary  
> > > shard helps to improve performance. I have also read that using Nginx as  
> > > load balancer also improve performance. Now my question is, how can i put  
> > > these two things together? Also how one ES server knows about other ES  
> > > servers ? Finally can you give me some useful links by which i can try to  
> > > scale ES in multiple server.
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/345f86bd-bf6d-4f10-9ef3-7f429b0b17f5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/345f86bd-bf6d-4f10-9ef3-7f429b0b17f5%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/345f86bd-bf6d-4f10-9ef3-7f429b0b17f5%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/345f86bd-bf6d-4f10-9ef3-7f429b0b17f5%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/c6b6562c-c01d-449c-a9e3-705d4ffadfd0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c6b6562c-c01d-449c-a9e3-705d4ffadfd0%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/c6b6562c-c01d-449c-a9e3-705d4ffadfd0%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/c6b6562c-c01d-449c-a9e3-705d4ffadfd0%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAHO4itxwid6DSoS%3DyafCZXrxx-z0\_AKLPdZEwjNQn-nNBMd4xA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHO4itxwid6DSoS%3DyafCZXrxx-z0_AKLPdZEwjNQn-nNBMd4xA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 12:16am UTC](https://discuss.elastic.co/t/scaling-problem/23525/5 "2017-07-06T00:16:02Z")

</div>


