# Elasticsearch cluster in Docker Swarm

**URL:** <https://discuss.elastic.co/t/elasticsearch-cluster-in-docker-swarm/110723>\
**Category:** Elasticsearch\
**Created:** [December 7, 2017, 5:34pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-in-docker-swarm/110723 "2017-12-07T17:34:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![muhaha](https://avatars.discourse-cdn.com/v4/letter/m/fbc32d/32.png) [@muhaha](https://discuss.elastic.co/u/muhaha)\
**Post date:** [December 7, 2017, 5:34pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-in-docker-swarm/110723/1 "2017-12-07T17:34:57Z")

</div>

Hello,  
Its better to deploy 3 services with 1 replica connected to cluster, or deploy 1 service with 3 replicas?  
There are minimum informations about elasticsearch cluster in docker. I dont know how to aproach to this problem. Can anyone help ?

Case 1.) - 3 services / 1 replica (1 docker swarm master, 2 workers)  
-possible to configure different settings for each node

Case 2.) 1 service / 3 replicas (1 docker swarm master, 2 workers)  
-what about persistent data ? Data will be copied 3x ? Or have anyone experience with glusterfs?  
-there will be a problem with publicating port ? ingress vs publishing port. DNSRR.

Others:  
I don not need to expose elastic port. Logstash will be in same network and it will have port exposed.  
-. also same for kibana, i will use elastic in coordinate mode i guess.

Is this context, should I go with 3 master elastic nodes? (each: 4x E5-2690 v3 @ 2.60GHz ,16gb ram, 1GiB - 500GiB daily data traffic).

Or how to design infrastructure in this case?

Thanks for help.

---

<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:** [January 4, 2018, 5:35pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-in-docker-swarm/110723/2 "2018-01-04T17:35:04Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
