SaaS Multi-Tenant Best Practices

In my SaaS application, I have a few hundred different kinds of “objects.” Is it considered best practice to have one index per tenant per object (which will be tens of thousands of indexes), or one index per object, with a tenant_id in each object that is filtered? It looks like both are supported.

What do your customers typically do, and what do you recommend?

I like the one index per object per tenant because I can easily drop and recreate indexes for a given tenant. Also, I like the idea of exposing the many options of an index (faceting, sorting, etc) to a power user through our API, and giving them that much more control over their options.

But I’m sure there are consequences to either choice that I might not be able to foresee, so all things being equal I’d like to know what others are doing and emulate.

Hi Andrew,

I would suggest that you go for a single index, as your schema remains the same:

and then use our personalization feature:

Note that you can generate an API key per tenant, with the filter set on tenant_id, and all the requests will have that filter by default when going through that API key.