We are preparing to move our SaaS product(single-tenant-per-database model
) to Azure SQL with database sharding, from what I learned, a shard
is a database and each elastic pool max contains 100 databases. Let's say I have 10 shards in an elastic pool, i.e. 10 shard-databases.
My question is:
90 databases capacity
in the pool?99 database capacity
in the pool?If it is the case of above option 1, I think there is no reason to use sharding here as we can create a standalone database-per-tenant in the pool without
sharding.
Our goal is to save the number of databases in the pool for the free tenants, we thought one database sharded could contain multiple shards for multiple tenants, but finally realized a shard is a database.
Sharding is a technique to distribute large amounts of identically structured data across a number of independent databases.
As you mentioned your goal is to save the number of databases in the pool for the free tenants As per Scaling out with Azure SQL Database
For Free trial it is cost-effective to use a multi-tenant database for the data
When your trial is finished and you choose pay-as-you go, a single-tenant database can be better since it provides better performance.
If you have created data during the trial period, use the split-merge tool to move the data from the multi-tenant to the new single-tenant database.