Microsoft has just announced the preview release of Elastic Scale for Azure SQL. Elastic Scale is a new database sharding or spanning technique to scale up databases from a single database to using multiple databases to improve scalability and performance.
This new sharding approach will eventually replace the current Azure SQL Federations.
The scenario for sharding a database is simple – imagine if you have hundreds of gigabytes of transactions and you want to improve performance by splitting your database into multiple databases. This works particularly well if you can easily define logical segments in your database – for example, if you have monthly or year batches of transactions. The Elastic Scale APIs provide the ability to scale your database horizontally by creating multiple databases for storage and querying while making this seamless to the calling application.
From an application perspective, the Elastic Scale APIs allow your .NET application to do inserts and queries across multiple databases to improve scalability.
Note: in the current preview version, transactions across shards and joins across shards are not supported.
Combined with Azure SQL’s new pricing structure based on performance guarantees, this opens up an interesting possibility – imagine having ten years worth of data and storing each year on its own database. Presumably, you could then pay for performance for each year independently – the more recent years could have a higher priced faster database while the older years could run on lower performance cheaper databases.
There is a sample tutorial to get you started here.