Sunday, August 28, 2022

 Storage and data considerations for a Multitenant Provider 

The previous articles described the multitenancy in databases using schema-based consolidation and within-database virtualization by partitioning the data dictionary horizontally. These articles also described elastic pools, sharding patterns, row-level security and key management. 

Data for applications grows by leaps and bounds year after year. This article describes the storage and data considerations and requirements.

When the volume of data increases, multitenancy depends on a clear strategy to scale the data and storage resources and to apply automation to their management, 

Elastic pools share compute resources between several databases on the same server. This helps to achieve performance elasticity of each database. The sharing of provisioned resources across databases reduced their unit costs. There are built-in protections against noisy neighbor problems. The architectural approach must meet the levels of the scale expected from the system.

Resource and request quotas must be part of this decision.  If a single storage account is deployed to contain all of the tenant’s data, then exceeding a specific number of storage operations per second will reject the application’s requests and all of the tenants will be impacted. Monitoring and retry for services must be enabled.

When designing a solution that contains multitenant data services, there are different options and levels of data isolation, For example, there can be separate containers between tenants or the database and accounts can be shared between multiple tenants. When using Azure storage for blob data, separate blob containers or separate storage accounts for each tenant can be deployed.  When deploying resources for services they can be in a single shared Azure subscription, or they can be in multiple Azure subscriptions with one per tenant. Isolation must even be higher to meet security and compliance requirements or to avoid noisy neighbor problems. Keeping the architecture as simple as possible while meeting the requirements helps with growth and planning. Tenants will likely require customizations and using feature flags to independently author, test and deploy updates are necessary. Cross tenant management operations such as regular maintenance activities, monitoring and metering of tenants, reporting data from across isolated tenants enforcing a schema and how to deploy schema updates, considering high availability requirements, and migrating tenants needed to move to different types of service, deployment or perhaps another region are all operational considerations that must be planned for in the multitenancy approach.

Higher tenancy density and lower operating costs are desirable but not the only optimization parameter. Patterns can be judiciously chosen or they can be mixed and matched especially for creating service levels. It is a good practice to scale by using deployment stamps. When we work with shared infrastructure, there are several caveats to consider. If a single resource is used, it might impose scale restrictions and limits that might interfere with maximum scale and current and future limits. Measuring and monitoring for a single tenant might be difficult depending on the services used and their tiers. Choosing premium tiers can help overcome this difficulty.

Sharding pattern can scale to a large number of tenants with appealing cost effectiveness. Horizontal, vertical and functional data partitioning can be applied. Other patterns include dedicated storage containers for each tenant and geographically distributed containers patterns. 

Each storage product or its organizational unit might have features to support multitenancy.  For example, the previous article described multitenancy approach with row-level security, tenant-level encryption, resource pooling and governance, sharding and partitioning 

Authentication and authorization strategy must be planned. A valet-key pattern can provide clients with access to storage resources. Finally, consumption must be measured and costs must be assigned to tenants. 


No comments:

Post a Comment