# Multi tenant architecture. multiple engines vs filter field

**URL:** https://discuss.elastic.co/t/multi-tenant-architecture-multiple-engines-vs-filter-field/282403
**Category:** Elastic Search
**Created:** [August 24, 2021, 7:15pm UTC](https://discuss.elastic.co/t/multi-tenant-architecture-multiple-engines-vs-filter-field/282403 "2021-08-24T19:15:14Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![gpribi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gpribi/32/65066_2.png) [@gpribi](https://discuss.elastic.co/u/gpribi)
#### Post date: [August 24, 2021, 7:15pm UTC](https://discuss.elastic.co/t/multi-tenant-architecture-multiple-engines-vs-filter-field/282403/1 "2021-08-24T19:15:14Z")

</div>

I have a multi-tenant marketplace, consisting in up to 5 tenants, each one having 1M documents to be searched.

What are the performance considerations between having 5 identical engines of 1M documents, or have 1 engine with 5M documents using a key to filter the tenant?

Thanks!  
Gabriel

---

<div class="post-metadata">

### Author: ![Brian\_McGue](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brian_mcgue/32/63366_2.png) [@Brian\_McGue](https://discuss.elastic.co/u/Brian_McGue)
#### Post date: [August 25, 2021, 9:54pm UTC](https://discuss.elastic.co/t/multi-tenant-architecture-multiple-engines-vs-filter-field/282403/2 "2021-08-25T21:54:39Z")

</div>

Hi @gpribi! I don't have specific performance metrics around those two scenarios. It doesn't like the documents themselves won't be exactly identical, so I think using five engines each containing 1M documents might be slightly faster.

There is also an existing issue at the moment that the [Query suggestion API | Elastic App Search Documentation [7.14] | Elastic](https://www.elastic.co/guide/en/app-search/current/query-suggestion.html) does not handle filters in the same way that the normal Search API does. So if you're interested in using Query suggestions, splitting the documents among five different engines based on tenants will definitely be the way to go. There is an existing enhancement request for this feature, but it is not in the immediate roadmap for the App Search team.

I hope this helps!

Best,  
Brian

---

<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: [November 4, 2022, 8:32am UTC](https://discuss.elastic.co/t/multi-tenant-architecture-multiple-engines-vs-filter-field/282403/3 "2022-11-04T08:32:02Z")

</div>


