Getting started with Azure SQL Elastic Database Pools

By | April 11, 2018

Elastic pools provide a simple and cost effective solution for running multiple Azure SQL Databases with a fixed budget. The price of an elastic database pool is based only on the total resources allocated for the databases, and is independent of the number of databases it contains.

Most databases have a workload that varies heavily over time. This is because of the nature of the systems they support. For example a news website can have heavy traffic during certain peak hours of the day.

Database workload

Now, if you don’t want a bad experience for the customers/users/visitors, you will have to provide enough capacity for the database so that it also can handle the peak periods. You have to make a decision on how much capacity to provide. If you provide too low capacity, your customers/users/visitors will have a bad experience during peak periods. If you provide too high capacity, you pay too much.

Database workload

Now, if you have multiple databases and they don’t have their peaks at the same time, you could save money by letting them share the reserved capacity. This is exactly what Azure SQL Elastic Database Pools does.

Creating an elastic database pool

In the Azure Portal, you can create elastic pools on either an existing server and move your existing Azure SQL databases into it, or create a new server. You can also chose between the same tiers (basic, standard and premium) as you would do for a single Azure SQL database.

You also select the amount of eDTUs (performance) and total data size for your pool. These can be changed later, as well as the tier (basic/standard/premium).

Azure Portal create elastic databas pool

I won’t go too much into details about the pricing, because it is guaranteed to be changing over time, but here is a quick comparison between elastic pools and single databases.

An Elastic Pool with 200 eDTUs (standard) and 250 GB storage costs about the same as 15 single databases with 20 DTUs each (standard) and 250 GB storage each.

Note that this number, 15 databases, can change in the future and also can depend on the pricing model (DTU-based or vCore-based).

The actual amount of databases where you start saving money by using elastic database pools depends much on your workload pattern. The saving can in some scenarios be big already with only a few databases, while in other cases it is better to pay for each single database instead. The typical cases where elastic pools are beneficial are development environments (with many databases that are infrequently used) and production environments where there is a low average utilization but short and infrequent peaks in the workload.

The databases that belong to an elastic pool will show up with pricing tier “Elastic”.

Azure Portal elastic database list

You can also monitor and configure the pool easily in the Azure Portal. The pool will show up under the “All resources” list and can also be added to the Dashboard.

Azure Portal elastic databas pool overview

One bonus features that you get with Azure SQL Elastic Database Pools is the ability to create “elastic jobs“. You can do this from the Create job-button (shown in the illustration above). These jobs makes it possible to execute T-SQL scripts reliably and easily against multiple databases (all your databases in the pool, or a selection of databases). This is especially useful for maintenance tasks and similar.