# Multy-tenany elasticsearch

**URL:** https://discuss.elastic.co/t/multy-tenany-elasticsearch/347832
**Category:** Elasticsearch
**Created:** [November 23, 2023, 10:05am UTC](https://discuss.elastic.co/t/multy-tenany-elasticsearch/347832 "2023-11-23T10:05:24Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Azizi\_BESSEM](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/azizi_bessem/32/127904_2.png) [@Azizi\_BESSEM](https://discuss.elastic.co/u/Azizi_BESSEM)
#### Post date: [November 23, 2023, 10:05am UTC](https://discuss.elastic.co/t/multy-tenany-elasticsearch/347832/1 "2023-11-23T10:05:24Z")

</div>

I am currently working on implementing multi-tenancy in Elasticsearch and have come across two prominent approaches: using a shared index across multiple tenants and having a dedicated index per tenant. As part of my research and development efforts, I would like to test a hybrid approach that combines both methods.

Specifically, I am considering creating a custom plugin that includes a scheduler. This scheduler would run every day at midnight to inspect the shared index. The goal is to identify tenants whose data has reached a predefined size. For such tenants, I plan to execute a reindexing operation, moving their data to a new index named "index\_tenantId." Subsequently, I aim to remove this data from the shared index.

Given the complexity of the task and the importance of a robust multi-tenancy setup, I would greatly appreciate any suggestions, insights, or advice from the Elasticsearch community. Are there alternative approaches I should consider, or specific best practices that you recommend?

Thank you in advance for your valuable input.

Best regards,

---

<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: [December 21, 2023, 10:05am UTC](https://discuss.elastic.co/t/multy-tenany-elasticsearch/347832/2 "2023-12-21T10:05:41Z")

</div>

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