Microsoft continues to expand the Azure ecosystem rapidly. One of the most recent delivered improvements was Azure SQL Database Serverless option. The new serverless model, which is currently in public preview, provides a compute tier for a single database that scales dynamically with the workload. This new compute tier is optimal for single database that have unpredictable usage patterns. Previously, you would provision the compute tier to your Azure SQL Database which allowed to have more granular control on scalability. The serverless tier scaling is effectively controlled by the service itself and will scale when needed.
The compute tier is a little different from our previous run of the mill Azure SQL Databases. Up until recently, you were only allowed to have a maximum of 4 vCores. However, on August 15, 2019, Microsoft increased that limit to 16 vCores and 48GB of memory. This is a 4x increase and could really help with your workload. Currently, you can also designate a minimum of 0.5 vCores.
Azure SQL Database Serverless is only offered in the General Purpose service tier. This means that you are not currently able to place a serverless database into a Business Critical or Hyperscale service tiers. You are also locked into using the vCore model so no Database Transaction Units (DTUs) for you.
Microsoft offers up a good comparison chart of when you would use serverless compute versus provisioned compute:
Cost Saving Feature
One of the major perks of this new serverless offering is the ability to pause the database to help save on costs. In fact, there is a setting in which you can pause the database automatically after a duration of say, 60 minutes or so. If there is not activity on the database within that time frame, the database will automatically pause itself thus only costing you whatever you are using for storage. You will not be charged any compute fees.
Note that you can currently specify an auto-pause delay of up to 7 days and 23 hours. This helps to provide you with a good deal of flexibility.
To summarize some overall costs:
- The cost for a serverless database is the summation of the compute cost and storage cost.
- When compute usage is between the min and max limits configured, the compute cost is based on vCore and memory used.
- When compute usage is below the min limits configured, the compute cost is based on the min vCores and min memory configured.
- When the database is paused, the compute cost is zero and only storage costs are incurred.
- The storage cost is determined in the same way as in the provisioned compute tier.
(note: the above was borrowed directly from https://docs.microsoft.com/en-us/azure/sql-database/sql-database-serverless)
Of course, there are some features that won’t work with autopausing. If you run any of the following features, sorry, but you won’t be able to use the autopausing feature:
- Long-term backup retention
- Utilize Data Sync
This new product from Microsoft just further enhances the product richness that comes with the Azure offering. If you need to utilize a SQL Server relational database and don’t need the higher level service tiers, this might be a really good fit for you. Being able to pause the database automatically is just more icing on the cake to help you save costs. Take it for a spin and see what you think. Just remember that it is still in public preview so things could potentially shift.
© 2019, John Morehouse. All rights reserved.