#community-help

Discussing Multi-Tenancy in Typesense Server

TLDR Jack enquired about collection organization in typesense server for multi-tenancy solutions. Kishore Nallan suggested creating a collection for each customer.

Powered by Struct AI

1

1

3
2mo
Solved
Join the chat
Jul 19, 2023 (2 months ago)
Jack
Photo of md5-845e30d1fd9c6b076f9a8266ff9d0237
Jack
04:52 AM
Hello!
If we have a multi-tenant solution in a single typesense server, would it be better to create a separate collection for each organization, or one table that is scoped with organization field?
About 70% of field names will be the same, but 30% of fields will be custom. Say each customer will have 1000 ~ 20000 items, and there could be over 100 customers.
Is there a preferred way of handling multi-tenancy in typesense?
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
11:37 AM
For 100 customers one collection per customer is totally fine. I've seen users having tens of thousands of collections on the same server.

1

Jul 20, 2023 (2 months ago)
Jack
Photo of md5-845e30d1fd9c6b076f9a8266ff9d0237
Jack
12:08 AM
wow that’s a lot of collections. that was very insightful for me. thank you!

1