paint-brush
Choosing the Best Azure Database Deployment Option for Youby@satyapasupuleti
388 reads
388 reads

Choosing the Best Azure Database Deployment Option for You

by Satya PasupuletiMay 18th, 2023
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Azure SQL Database is a cloud-based service offered by Microsoft. It provides a scalable and cost-effective solution for managing relational databases. Three deployment options are available: Single Database, Elastic Pool, and Managed Instance. Just like ordering pizza, each option has its own unique features and benefits.
featured image - Choosing the Best Azure Database Deployment Option for You
Satya Pasupuleti HackerNoon profile picture


Azure SQL Database is a cloud-based service offered by Microsoft Azure that provides a scalable and cost-effective solution for managing relational databases. Azure SQL Database offers different deployment options to meet the varying needs of developers and businesses. Just like ordering pizza, each option has its own unique features and benefits.


In this article, we'll take a closer look at the three deployment options of Azure SQL Database - Single Database, Elastic Pool, and Managed Instance - and use Pizza as an analogy to better understand their differences.






Deployment Options

Single Database

Single Database is like ordering a pizza for yourself. You get to choose exactly what you want, and you don't have to worry about anyone else's preferences. Similarly, with Azure SQL Database Single Database, you can create and manage individual databases with different performance and pricing tiers. This option is ideal for applications that have predictable and steady usage demands. You have full control over the database and can scale up or down as needed. Just like with Pizza, you can customize your Single Database deployment to fit your specific needs.


Elastic Pool

This is like pooling your order with your friends at a pizza place. Everyone gets to choose their preferred type of mini pizza, and you all share the total cost, making it more affordable. In Azure SQL, Elastic Pool is a cost-effective solution for managing and scaling multiple databases that have unpredictable usage demands. All databases in an Elastic Pool are on a single Azure SQL Database server and share a set number of resources at a fixed price. This shared approach allows developers to optimize the price performance for a group of databases within a budget, preventing over-provisioning (paying for resources you don't need) or under-provisioning (not having enough resources when you need them).


Now, an important thing to remember is that when you choose the Elastic Pool option, it's like deciding to share a large pizza with your friends, but there are some menu options you can't have. The first difference you might notice between the Elastic Pool and Single Database is that in the Elastic Pool, you don't have the "Hyperscale" pricing tier available to you, just like you might not have the option to order an extra-large size when you're sharing a pizza.

Similarly, you also don't have the "Serverless" compute option in Elastic Pool. This is like not being able to order slices of pizza based on how hungry you are at the moment - you have to decide upfront how many slices you and your friends will share.

Despite these limitations, Elastic Pool can still be a great choice if you have multiple databases with varying demands. It's a clever way to make sure everyone gets their fair share of pizza, and you can handle times when someone's more hungry (needs more resources) without wasting money on more pizza than you can eat.


Managed Instance

Imagine you're not just ordering pizza but running the entire pizza shop. You have access to everything - from making pizzas to serving them to customers. You have control over the whole operation. This is much like Managed Instance, a deployment option of Azure SQL Database. It provides near 100% compatibility with the latest SQL Server on-premises, meaning it's like being able to run your pizza shop just like you would in a traditional location, but now it's in the cloud!


Managed Instance is particularly useful for scenarios involving mass database migrations from on-premises or IaaS databases. It's like moving your entire pizza operation from a small local shop to a large, high-traffic shopping mall.


Here are some differences between SQL Server On-premises (the local pizza shop) and Managed Instance (the pizza shop in the mall):


  • High Availability built-in and pre-configured: Just as the mall has its own security and maintenance teams, Managed Instance has high availability features built-in and pre-configured. No need to worry about setting up and maintaining these systems.


  • Specifying full physical paths is not supported: In the mall, you don't get to choose the exact location of your shop. Similarly, in Managed Instance, you can't specify the full physical paths.


  • AAD authentication is used instead of Windows authentication: This is like having a more advanced security system at the mall compared to your local shop. Managed Instance uses Azure Active Directory (AAD) for authentication, which is more secure and robust than the Windows authentication used on-premises.


  • Automatically manages XTP file group and in-memory OLTP objects: Just like how mall management takes care of waste management and maintenance, Managed Instance automatically manages Extreme Transaction Processing (XTP) file group and in-memory Online Transaction Processing (OLTP) objects.


  • SSIS is supported via Azure Data Factory (ADF): This is like having an automated delivery system in the mall that takes care of transporting your pizzas to the customers. In the case of Managed Instances, SQL Server Integration Services (SSIS) is supported via Azure Data Factory (ADF).


Management options for your pizza shop (Managed Instance) include:


  • New instance creation: You can set up a new pizza shop in the mall (Managed Instance). Most of these operations (90%) finish in less than 4 hours.


  • Changing instance properties like vCores or storage: This is like being able to resize your pizza shop or add more storage for ingredients. Most of the time (90%), you can expand your pizza shop (cluster) in less than 2.5 hours.


  • Instance Update: You can update your pizza shop, just like you would refurbish the shop in the mall. Most of these updates (90%) can be done in less than 1.5 hours.


  • Instance Deletion: If you decide to close your shop in the mall, most of these operations (90%) can be completed in less than 1.5 hours.


So, choosing the Managed Instance is like deciding to run the entire pizza shop yourself. It requires more resources and responsibility, but it gives you maximum control and flexibility.


Purchasing Models: This is like deciding how you're going to pay for your pizza


  • DTU-based: This is like buying a combo meal. You get a pizza, a soda, and maybe a dessert, all for a fixed price. It's simple, but you can't customize what you get.


  • vCore-based: This is like ordering a la carte. You get to choose exactly what you want and in what quantity. If you want extra cheese, you can have it. If you don't want any olives, that's fine too. This model gives you greater flexibility and transparency with pricing.


Service Tiers: These are like the different quality levels of pizza you can choose from


  • General Purpose/Standard: This is your regular, everyday pizza. It's good and reliable, perfect for a casual dinner.


  • Business Critical/Premium: This is your gourmet, high-quality pizza. It uses premium ingredients and offers superior taste, perfect for special occasions.


  • Hyperscale: This is like a pizza catering service for a big party or event. You get a lot of pizzas of different types, enough to feed a huge crowd.


Now, imagine you've decided to go a la carte (vCore-based) because you want to control what you get. You're at the pizza shop, deciding how many slices you want, which is like choosing the amount of computational power (vCores) you need.


You could go for 2 slices if you're not that hungry (less computational power), or a full pizza with up to 80 slices if you're starving (more computational power).


Then, there's a new "serverless" option. This is like a special offer where you get more pizza when the shop isn't busy and less when it's crowded. This dynamically adjusts to your hunger levels (database load), so you always get the right amount of pizza (resources).


You set a limit for your order: at least 1 slice (minimum resources) but no more than 2 slices (maximum resources). This way, you're guaranteed at least a snack, but you won't overeat.


And there you have it! You've placed your order, chosen your pizza, and you're ready to enjoy it. Plus, you know exactly how much it's going to cost you. This is how Azure SQL Database works!