Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Multitenant solutions on Azure commonly use Azure SQL Database. This article outlines key SQL Database features that support multitenant system design. It also provides guidance and examples for how to implement Azure SQL in a multitenant solution.
Guidance
The SQL Database team publishes extensive guidance for how to implement multitenant architectures by using SQL Database. For more information, see Multitenant software as a service (SaaS) database tenancy patterns and Partition SQL Database.
Features of SQL Database that support multitenancy
SQL Database includes many features that support multitenancy.
Elastic pools
Elastic pools support compute resource sharing across multiple databases on the same server. By using elastic pools, you can achieve performance elasticity for each database. You can also maximize cost efficiency by sharing provisioned resources across multiple databases. Elastic pools provide built-in protections against the noisy neighbor problem.
Hyperscale elastic pools extend the elastic pool model to the Hyperscale service tier. You can host many tenant databases in a single Hyperscale pool and scale the shared compute resources independently of per-tenant data size. Hyperscale pools also support higher storage limits for each database than other elastic pool tiers. Use Hyperscale pools when individual tenant databases exceed the storage limits of non-Hyperscale pools. You can add read-scale replica pools to offload read workloads across tenants.
For more information, see the following resources:
- SQL Database elastic pools
- Resource management in dense elastic pools
- Disaster recovery (DR) strategies for applications that use SQL Database elastic pools
- Hyperscale elastic pools overview
- Work with Hyperscale elastic pools by using command-line tools
Elastic database tools
You can use the Sharding pattern to scale your workload across multiple databases. SQL Database provides tools to support sharding. These tools include the management of shard maps, which serve as databases that track the tenants assigned to each shard. These tools also include the capability to initiate and track queries and management operations on multiple shards by using elastic jobs.
For more information, see the following resources:
- Scale out by using SQL Database
- Automate management tasks in Azure SQL
- Create, configure, and manage elastic jobs
Row-level security
Row-level security helps enforce tenant-level isolation in shared tables. For more information, see Row-level security implementation on Azure SQL.
Key management
The Always Encrypted feature provides end-to-end encryption for your databases. If your tenants must supply their own encryption keys, consider deploying separate databases for each tenant and turning on Always Encrypted in those databases.
Contributors
Microsoft maintains this article. The following contributors wrote this article.
Principal authors:
- Paul Burpo | Principal Customer Engineer, FastTrack for Azure
- John Downs | Principal Software Engineer, Azure Patterns & Practices
Other contributors:
- Silvano Coriani | Principal Program Manager, Azure SQL
- Dimitri Furman | Principal Program Manager, Azure SQL
- Sanjay Mishra | Principal Group Program Manager, Azure SQL
- Arsen Vladimirskiy | Principal Customer Engineer, FastTrack for Azure
To see nonpublic LinkedIn profiles, sign in to LinkedIn.
Next steps
- Run one million databases on Azure SQL for a large SaaS provider: Dynamics 365 and Microsoft Power Platform
- Design patterns for SaaS applications on SQL Database
- Architecture best practices for SQL Database