azure-sql-databaseshardingazure-elastic-sharding

Will the shard database increase the number of database in an Azure Elastic pool?


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:

  1. These 10 shards(databases) will be counted on the number of databases, so I have 90 databases capacity in the pool?
  2. OR 10 shards only be counted as ONE database and I still have 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.


Solution

  • 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