I have a scenario I'd appreciate feedback on regar...
# community-help
c
I have a scenario I'd appreciate feedback on regarding multi-tenant. We're converting multiple WooCommerce stores to headless, and we'll use typesense for both search/filtering , but also as a better alternative to graphql for retrieving store data such as product, category and general site info. We expect we'll manage 100+ stores, and each will need data in Typsense. Should we use a single cluster and have all sites write to the same collections, and use Scoped Search Keys for each frontend, or is there a better way to do this? Perhaps each site should have it's own separate collections for category, product, page etc?
k
👋 If you plan to have millions of records per customer, it's better to split the collections out. It need not even be 1 per customer. You could do N customers per collection as well. The other thing to keep in mind is that synonyms and curation are stored at a collection level so if you plan to use those features, then you have to use 1 collection per customer.
c
Thanks Kishore - your point about synonyms and curation are very important. Every client will be different in that regard.
k
Then I suggest sticking with 1 collection per customer: I have seen people using 100s of thousands of collections so no worries there 😄
c
Great. There will be a lot of duplication of collection names, so I'm thinking we use the id of the API key associated with the collection to make it easy for us to identify which collection belongs to who. eg.
product-125
,
product-126
and tie/restrict the api key to the relevant collections.
k
Yes that sounds good
In future we do plan to decouple curation/synonyms from collections -- make them independent entities and make them linkable to any collection.
👍 2