# Multi-tenant single web-host requiring separate ES indicies? Possible to do?

**URL:** <https://discuss.elastic.co/t/multi-tenant-single-web-host-requiring-separate-es-indicies-possible-to-do/46597>\
**Category:** Elasticsearch\
**Created:** [April 6, 2016, 8:30pm UTC](https://discuss.elastic.co/t/multi-tenant-single-web-host-requiring-separate-es-indicies-possible-to-do/46597 "2016-04-06T20:30:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gavincmi](https://avatars.discourse-cdn.com/v4/letter/g/d78d45/32.png) [@gavincmi](https://discuss.elastic.co/u/gavincmi)\
**Post date:** [April 6, 2016, 8:30pm UTC](https://discuss.elastic.co/t/multi-tenant-single-web-host-requiring-separate-es-indicies-possible-to-do/46597/1 "2016-04-06T20:30:24Z")

</div>

Hello ES Forum,

I'm currently searching for any documentation to this effect but is it possible to do the following:

A single web server hosting multiple different websites (multi-tenant) that would require one installation of Elasticsearch BUT keep all search data (indicies, nodes etc) separate for each site?

Worse yet each website would have the similar index information so ideally I would need to keep all site data "seperate" so as a) not to overwrite anything b) allow different clients to see each other's indexed documents which would lead to confusion.

Basically I've only read (so far) that there is a 1:1 ratio of website to ES installation. So only 1 website per web server per Elasticsearch installation. Is that right?

Or is it possible to have multiple separate sites on 1 web server with multiple "separate" ES clusters/nodes etc.

Would this involve individual ports 9200, 9300, 9400 for each separate ES cluster?

Or am I over thinking this and each clustername is that separate "instance"

Apologies if I'm misusing terms here but I'm having difficulty understanding the ratios here.

Any guidance would be greatly appreciated.

{EDIT} It appears this might be possible. Can anyone expound on this as well? [Can I run multiple Elasticsearch nodes on the same machine?](https://discuss.elastic.co/t/can-i-run-multiple-elaticsearch-nodes-on-the-same-machine/67)

So with differently named ES instances indicated in yml files, different clusternames, explicit port numbers for each node so that they are predictable (eg. http.port and transport.tcp.port) is that the way to multi-tenant?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 6, 2016, 11:58pm UTC](https://discuss.elastic.co/t/multi-tenant-single-web-host-requiring-separate-es-indicies-possible-to-do/46597/2 "2016-04-06T23:58:22Z")

</div>

> [@gavincmi](#):
>
> A single web server hosting multiple different websites (multi-tenant) that would require one installation of Elasticsearch

Yes.

> [@gavincmi](#):
>
> BUT keep all search data (indicies, nodes etc) separate for each site?

Yes, using something allocation awareness or filtering. But it kinda defeats the purpose.

> [@gavincmi](#):
>
> Or am I over thinking this and each clustername is that separate "instance"

I think so, yes. You don't need multiple clusters on a single node unless you have strong security concerns, then you wouldn't even want to do this anyway.

---

<div class="post-metadata">

**Author:** ![gavincmi](https://avatars.discourse-cdn.com/v4/letter/g/d78d45/32.png) [@gavincmi](https://discuss.elastic.co/u/gavincmi)\
**Post date:** [April 7, 2016, 1:32am UTC](https://discuss.elastic.co/t/multi-tenant-single-web-host-requiring-separate-es-indicies-possible-to-do/46597/3 "2016-04-07T01:32:07Z")

</div>

I appreciate you taking the time to respond.

However I'm not really clear on what direction you're trying to indicate.

Yes it can be done but "don't do it."?

So in a more constructive way, perhaps you could expound on the thinking or steer towards documentation?

Much appreciated either way!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 7, 2016, 1:33am UTC](https://discuss.elastic.co/t/multi-tenant-single-web-host-requiring-separate-es-indicies-possible-to-do/46597/4 "2016-04-07T01:33:54Z")

</div>

You want to multitenant in a single cluster right? - this you can totally do.  
But then you also want to keep each tenants data on separate nodes in the same cluster? - this you don't want to do.

---

<div class="post-metadata">

**Author:** ![gavincmi](https://avatars.discourse-cdn.com/v4/letter/g/d78d45/32.png) [@gavincmi](https://discuss.elastic.co/u/gavincmi)\
**Post date:** [April 7, 2016, 1:26pm UTC](https://discuss.elastic.co/t/multi-tenant-single-web-host-requiring-separate-es-indicies-possible-to-do/46597/5 "2016-04-07T13:26:03Z")

</div>

Do you know of any documentation (URLs etc.) with additional information on this topic? I'm not seeing how the "allocation awareness" or "filtering" comes into play. I appreciate the tips but actually being able to execute on suggestions currently is a little difficult hence my original post.

---

<div class="post-metadata">

**Author:** ![gavincmi](https://avatars.discourse-cdn.com/v4/letter/g/d78d45/32.png) [@gavincmi](https://discuss.elastic.co/u/gavincmi)\
**Post date:** [April 7, 2016, 3:29pm UTC](https://discuss.elastic.co/t/multi-tenant-single-web-host-requiring-separate-es-indicies-possible-to-do/46597/6 "2016-04-07T15:29:47Z")

</div>

Ah I reread your comment here. I would be looking to use 2 clusters to separate data not 1.

---

<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:01pm UTC](https://discuss.elastic.co/t/multi-tenant-single-web-host-requiring-separate-es-indicies-possible-to-do/46597/7 "2017-07-05T23:01:28Z")

</div>


