Search code examples
azure-blob-storageazure-table-storageazure-cognitive-searchazure-cognitive-servicesazure-qna-maker

Is it Ok to have single index for multiple tenant?(Azure Search)


Is it ok to have multiple tenant QnA's to be stored in a single data source? for ex: in Azure Table Storage with all QnA's stored in a single table but each tenant data differentiated by an unique key and then filter results based on their unique key, this would help me to reduce the azure service cost but is their any drawbacks in using this method ?


Solution

  • Sharing a service/index in developer/test environments is fine, but there are additional concerns for production environments. These are some drawbacks, though you might not care about some of them:

    • competing queries: high traffic volume for one tenant can affect query latency/throughput for another tenant
    • harder to manage data for individual tenants: can you easily delete all documents for a particular tenant? Would the whole index need to be deleted or recreated for any reason which will affect all tenants?
    • flexibility in location: multiple services allow you to put data physically closer to where the queries will be issued. There can also be legal requirements for where data is stored.
    • susceptible to bugs/human error: people make mistakes; how bad is it to return data for the wrong tenant? How would you guard against that?
    • permission management: do you need to need grant permissions to view data for a subset of the tenants?