Getting started with Azure SQL Elastic Database Pools

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.

Azure SQL 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.

Azure SQL 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 pricing options as you would do for a single Azure SQL database.

  • The basic/standard/premium option. You 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).
  • The vCore option. You select the number of vCores that should be available. Also this can be changed later. Note that there is no "serverless" option like there is for single databases.
Azure Portal Create Elastic Database 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.

Currently (as of February 2021), an Elastic Pool with 100 eDTUs (standard) and 100 GB storage costs about the same as 3 single databases with 50 DTUs each (standard) and 50 GB storage each.
Note that this number, 3 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 Database 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.


Related Posts