# How to use the service on Windows with multiple nodes?

**URL:** <https://discuss.elastic.co/t/how-to-use-the-service-on-windows-with-multiple-nodes/15643>\
**Category:** Elasticsearch\
**Created:** [February 6, 2014, 1:04pm UTC](https://discuss.elastic.co/t/how-to-use-the-service-on-windows-with-multiple-nodes/15643 "2014-02-06T13:04:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wesley\_Creteur](https://avatars.discourse-cdn.com/v4/letter/w/65b543/32.png) [@Wesley\_Creteur](https://discuss.elastic.co/u/Wesley_Creteur)\
**Post date:** [February 6, 2014, 1:04pm UTC](https://discuss.elastic.co/t/how-to-use-the-service-on-windows-with-multiple-nodes/15643/1 "2014-02-06T13:04:02Z")

</div>

Hi,

I'm using elasticsearch on my windows 2012 server and want to use the  
included service that starts automatically. I'm having 2 nodes (just  
leaning about that) but i can't get this to work. When i start each node  
individually i see all of my nodes on [http://localhost:9200/\_plugin/head/](http://localhost:9200/_plugin/head/)  
but all my command prompts are still visible. Is there a solution for this?

I'm using elasticsearch for my webshop (5000 products), facets and search.  
How many nodes, shards and replicas should i use?

--  
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/bf63a951-bdb6-4e7f-a9ab-3797db0073a2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/bf63a951-bdb6-4e7f-a9ab-3797db0073a2%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [February 6, 2014, 1:12pm UTC](https://discuss.elastic.co/t/how-to-use-the-service-on-windows-with-multiple-nodes/15643/2 "2014-02-06T13:12:02Z")

</div>

Are you trying to start two nodes on the same physical machine? This is not recommended.  
You see all your nodes in head? That's fine. What's wrong here? I don't understand what your issue actually is.

About sizing. I'd say it depends here mainly if you want to have failover or not.  
I mean that for a small amount of documents if your documents come from a database (let's say SQL database), I guess that it takes only some seconds to reindex in case of crash, right?

So in that case, one node is enough. No replica. Only one shard.

If you want failover, you should have 3 nodes (trying to avoid split brain here) and 1 shard with 2 replica.

My 2 cents

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 6 février 2014 at 14:04:05, Wesley Creteur ([wesley.creteur@gmail.com](mailto:wesley.creteur@gmail.com)) a écrit:

Hi,

I'm using elasticsearch on my windows 2012 server and want to use the included service that starts automatically. I'm having 2 nodes (just leaning about that) but i can't get this to work. When i start each node individually i see all of my nodes on [http://localhost:9200/\_plugin/head/](http://localhost:9200/_plugin/head/) but all my command prompts are still visible. Is there a solution for this?

## I'm using elasticsearch for my webshop (5000 products), facets and search. How many nodes, shards and replicas should i use?

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/bf63a951-bdb6-4e7f-a9ab-3797db0073a2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/bf63a951-bdb6-4e7f-a9ab-3797db0073a2%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/etPan.52f38a22.168e121f.d955%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.52f38a22.168e121f.d955%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Wesley\_Creteur](https://avatars.discourse-cdn.com/v4/letter/w/65b543/32.png) [@Wesley\_Creteur](https://discuss.elastic.co/u/Wesley_Creteur)\
**Post date:** [February 6, 2014, 1:27pm UTC](https://discuss.elastic.co/t/how-to-use-the-service-on-windows-with-multiple-nodes/15643/3 "2014-02-06T13:27:40Z")

</div>

Thx David for the fast response.

I'm using one physical machine because i have limited resources at my  
disposal. Windows Server 2012, 4 CPU Cores and 8 GB of RAM. I do want a  
failover, so thanks on that advice. I've followed the instructions of this  
website  
: [http://blogs.xtivia.com/home/-/blogs/creating-a-simple-elastic-search-cluster;jsessionid=514BB0062C612449FDC52A307ABDE7A8?p\_p\_auth=38j27oQ0](http://blogs.xtivia.com/home/-/blogs/creating-a-simple-elastic-search-cluster;jsessionid=514BB0062C612449FDC52A307ABDE7A8?p_p_auth=38j27oQ0)

So i have multiple nodes setup and started the elasticsearch service -  
bin\>service install - on the master node. But here is my issue. When i  
browse to the head plugin, i see only one node. When i remove the service  
and start all nodes seperate "path/to/node1/bin\>elasticsearch" and  
"path/to/node1/bin\>elasticsearch" and ... the command prompts are kept  
open and all nodes are then visible at head. Would it be possible to run  
all nodes with the windows service automatically?

Op donderdag 6 februari 2014 14:04:02 UTC+1 schreef Wesley Creteur:

> Hi,
> 
> I'm using elasticsearch on my windows 2012 server and want to use the  
> included service that starts automatically. I'm having 2 nodes (just  
> leaning about that) but i can't get this to work. When i start each node  
> individually i see all of my nodes on [http://localhost:9200/\_plugin/head/but](http://localhost:9200/_plugin/head/but) all my command prompts are still visible. Is there a solution for this?
> 
> I'm using elasticsearch for my webshop (5000 products), facets and search.  
> How many nodes, shards and replicas should i use?

--  
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/c05794d9-c4ac-4e01-b0cb-a34ad766cbe0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c05794d9-c4ac-4e01-b0cb-a34ad766cbe0%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![costin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/costin/32/44950_2.png) [@costin](https://discuss.elastic.co/u/costin)\
**Post date:** [February 6, 2014, 1:42pm UTC](https://discuss.elastic.co/t/how-to-use-the-service-on-windows-with-multiple-nodes/15643/4 "2014-02-06T13:42:34Z")

</div>

You can have as many services as you want - just make sure you specify a different service\_id for each of them.  
By default service.bat uses a predefined name is no service\_id is specified; all actions will use this.

In your case you would do something like:  
service install node1  
service install node2  
service install node3

followed by;  
service start node1  
service start node2  
service start node3

If you want further customize them you can try  
service manager \<service\_id\> : service manager node1

Cheers,

On 06/02/2014 3:27 PM, Wesley Creteur wrote:

> Thx David for the fast response.
> 
> I'm using one physical machine because i have limited resources at my disposal. Windows Server 2012, 4 CPU Cores and 8  
> GB of RAM. I do want a failover, so thanks on that advice. I've followed the instructions of this website  
> : [http://blogs.xtivia.com/home/-/blogs/creating-a-simple-elastic-search-cluster;jsessionid=514BB0062C612449FDC52A307ABDE7A8?p\_p\_auth=38j27oQ0](http://blogs.xtivia.com/home/-/blogs/creating-a-simple-elastic-search-cluster;jsessionid=514BB0062C612449FDC52A307ABDE7A8?p_p_auth=38j27oQ0)
> 
> So i have multiple nodes setup and started the elasticsearch service - bin\>service install - on the master node. But  
> here is my issue. When i browse to the head plugin, i see only one node. When i remove the service and start all nodes  
> seperate "path/to/node1/bin\>elasticsearch" and "path/to/node1/bin\>elasticsearch" and ... the command prompts are kept  
> open and all nodes are then visible at head. Would it be possible to run all nodes with the windows service automatically?
> 
> Op donderdag 6 februari 2014 14:04:02 UTC+1 schreef Wesley Creteur:
> 
> ```
> Hi,
> 
> I'm using elasticsearch on my windows 2012 server and want to use the included service that starts automatically.
> I'm having 2 nodes (just leaning about that) but i can't get this to work. When i start each node individually i see
> all of my nodes on http://localhost:9200/_plugin/head/ <http://localhost:9200/_plugin/head/> but all my command
> prompts are still visible. Is there a solution for this?
> 
> I'm using elasticsearch for my webshop (5000 products), facets and search. How many nodes, shards and replicas
> should i use?
> 
> ```
> 
> --  
> 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/c05794d9-c4ac-4e01-b0cb-a34ad766cbe0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c05794d9-c4ac-4e01-b0cb-a34ad766cbe0%40googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
Costin

--  
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/52F3914A.1030208%40gmail.com](https://groups.google.com/d/msgid/elasticsearch/52F3914A.1030208%40gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Wesley\_Creteur](https://avatars.discourse-cdn.com/v4/letter/w/65b543/32.png) [@Wesley\_Creteur](https://discuss.elastic.co/u/Wesley_Creteur)\
**Post date:** [February 6, 2014, 1:57pm UTC](https://discuss.elastic.co/t/how-to-use-the-service-on-windows-with-multiple-nodes/15643/5 "2014-02-06T13:57:38Z")

</div>

Thx Costin Leau,

You solved my problem. This works.

Op donderdag 6 februari 2014 14:42:34 UTC+1 schreef Costin Leau:

> You can have as many services as you want - just make sure you specify a  
> different service\_id for each of them.  
> By default service.bat uses a predefined name is no service\_id is  
> specified; all actions will use this.
> 
> In your case you would do something like:  
> service install node1  
> service install node2  
> service install node3
> 
> followed by;  
> service start node1  
> service start node2  
> service start node3
> 
> If you want further customize them you can try  
> service manager \<service\_id\> : service manager node1
> 
> Cheers,
> 
> On 06/02/2014 3:27 PM, Wesley Creteur wrote:
> 
> > Thx David for the fast response.
> > 
> > I'm using one physical machine because i have limited resources at my  
> > disposal. Windows Server 2012, 4 CPU Cores and 8  
> > GB of RAM. I do want a failover, so thanks on that advice. I've followed  
> > the instructions of this website  
> > :  
> > [http://blogs.xtivia.com/home/-/blogs/creating-a-simple-elastic-search-cluster;jsessionid=514BB0062C612449FDC52A307ABDE7A8?p\_p\_auth=38j27oQ0](http://blogs.xtivia.com/home/-/blogs/creating-a-simple-elastic-search-cluster;jsessionid=514BB0062C612449FDC52A307ABDE7A8?p_p_auth=38j27oQ0)
> > 
> > So i have multiple nodes setup and started the elasticsearch service -  
> > bin\>service install - on the master node. But  
> > here is my issue. When i browse to the head plugin, i see only one node.  
> > When i remove the service and start all nodes  
> > seperate "path/to/node1/bin\>elasticsearch" and  
> > "path/to/node1/bin\>elasticsearch" and ... the command prompts are kept  
> > open and all nodes are then visible at head. Would it be possible to run  
> > all nodes with the windows service automatically?
> > 
> > Op donderdag 6 februari 2014 14:04:02 UTC+1 schreef Wesley Creteur:
> > 
> > ```
> > Hi, 
> > 
> > I'm using elasticsearch on my windows 2012 server and want to use 
> > 
> > ```
> 
> the included service that starts automatically.
> 
> > ```
> > I'm having 2 nodes (just leaning about that) but i can't get this to 
> > 
> > ```
> 
> work. When i start each node individually i see
> 
> > ```
> > all of my nodes on http://localhost:9200/_plugin/head/ <
> > 
> > ```
> 
> [http://localhost:9200/\_plugin/head/](http://localhost:9200/_plugin/head/)\> but all my command
> 
> > ```
> > prompts are still visible. Is there a solution for this? 
> > 
> > I'm using elasticsearch for my webshop (5000 products), facets and 
> > 
> > ```
> 
> search. How many nodes, shards and replicas
> 
> > ```
> > should i use? 
> > 
> > ```
> > 
> > --  
> > 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/c05794d9-c4ac-4e01-b0cb-a34ad766cbe0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c05794d9-c4ac-4e01-b0cb-a34ad766cbe0%40googlegroups.com).
> 
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> Costin

--  
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/250e00f6-4ab1-4300-83c1-eac9b7a0e74c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/250e00f6-4ab1-4300-83c1-eac9b7a0e74c%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 1:51am UTC](https://discuss.elastic.co/t/how-to-use-the-service-on-windows-with-multiple-nodes/15643/6 "2017-07-06T01:51:59Z")

</div>


