/ June ,26 2022
Microsoft's cloud offers a wide range of databases at a variety of price ranges. You can use open-source MySQL or MariaDB, Microsoft's SQL Server in various flavors, or Cosmos DB to create a NoSQL document database. However, one solution covers a wide range of use cases and, because it is based on one of the most popular open source databases, it is both efficient and capable.
PostgreSQL is a scalable, adaptable SQL database that employs common queries and interfaces to provide you with a database that can handle the majority of required activities. Citus Data was acquired by Microsoft, making it a substantial contributor to the project, and Citus is still developing its open-source expansion, which provides scalable searches and distributed tables.
Because of its scalability, Microsoft can offer three types of Azure-hosted PostgreSQL: Single Server, Flexible Server, and Hyperscale.
Single Server is the same PostgreSQL present in most Linux distributions, whereas Hyperscale leverages Citus' tooling to provide a global SQL database. The Flexible Server option, on the other hand, is possibly the most intriguing, since it provides a serverless, scalable database that can increase compute capabilities as needed and even decrease down to zero when not required. While it is based on the same platform as the Hyperscale version, it is a single Linux virtual machine running on its own server, with computation and storage in the same Azure availability zone.
As a result, there is no need for extra gateways, and the database and logs are saved across zones to boost reliability. Flexible Server now includes a premium disk option to ensure that your applications receive the IOPs they require. Because it is a single-tenant system, you are not sharing resources with other users, lowering risk and assisting in keeping your data as secure as possible.
The resulting service is described by Microsoft as a "developer-friendly managed Postgres service," which reduces operational overhead and allows you to focus on building on and around your data. Simplifying the setup process includes decreasing the complexity of the procedure, reducing the number of fields you must fill out, and providing a simple setup process using the Azure CLI so you can automate generating databases, allowing you to make it part of an Azure DevOps deployment pipeline.
There are numerous methods for tuning an instance for your application. Begin by selecting a pricing tier, such as Burstable, General Purpose, or Memory Optimized. You can use these to fine-tune the compute, memory, and storage settings. You can add many databases to a server after you've created it; you're not limited to a single database per instance.
When you use the Azure CLI tools to build an instance, the default settings configure it to be General Purpose and run on an 8GB RAM 2 core virtual server with a private network connection. All you need is a server name and a resource group to which it can be assigned.
Choosing the right storage might be critical. To keep latency to a minimal, consider storage types that fulfill your application's IO needs when it is in the same availability group as your instance. Because your VM type limits performance, you may need to fine-tune your choice of VM and storage to acquire a database that matches your code.
The CLI tool provides more options, including the ability to select VM types, price tiers, storage, and more. For example, if you want a public access connection, you must explicitly declare it as part of the setup, as it cannot be modified once stated. It's a good idea to have another virtual machine running Postgres' psql command line tools on the same network so you can administer and test your database without requiring access from outside Azure.
The ability to employ Flexible instances for burstable computations is a significant feature. These are instances built on Azure B-series VMs. They begin with one or two cores and two or four gigabytes of RAM. Burstable VMs operate by running at a low power level for the majority of the time, accumulating credits that can be utilized to improve performance when needed. A B1 series VM has a 10% baseline that boosts to 100%, while a B2 series VM has a 40% baseline that boosts to 100%. This method can save money because you are not paying for performance when it is not required.
Many database workloads fit nicely with Azure's burstable pattern, running at low CPU for the majority of the time and increasing power at peak times. For example, a mid-sized IT consultancy might have a database that stores time sheets. The majority of the time, it will be providing reads to the HR and payroll teams, but it will need to burst every week to accommodate writes from everyone updating their weekly reports. Microsoft provides an API for keeping track of available credits, so you know how many there are and how your program consumes them when running in burst mode.
If your application requires even more time, you can employ a higher performance VM while utilizing the stop/start capabilities of Flexible servers. With the database VM turned off, you're only paying for storage, and restarting an image doesn't take long, so you won't be waiting for a system to relaunch when your application is required.
This type of managed database is excellent for those who want a dependable, fast database without the management overhead that comes with setting out your own servers. Microsoft automates PostgreSQL updates and allows you to select when they are deployed. It will maintain backups for you with a retention period of up to 35 days. It's also straightforward to set up a dependable failover architecture, so you can keep services running even if your primary Azure PostgreSQL instance fails.
Although Microsoft has stated that Flexible Server is not a replacement for its Single Server PostgreSQL service, it is clear that the long-term goal is to make it the default solution for all PostgreSQL applications running in Azure. For starters, the Single Server only supports PostgreSQL 10 and 11, whereas the Flexible Server supports PostgreSQL 11, 12, and 13. Flexible Server is the only way to acquire the most up-to-date functionality.
Microsoft has made it incredibly simple to add a managed Azure PostgreSQL database to your Azure infrastructure and applications, with three different configurations and a lot of flexibility in how they're deployed. You should be able to manage an application using Azure Database for PostgreSQL Flexible Server, from a tiny burstable development instance to a memory optimized service running in-production applications.
Your email address will not be published. Required fields are marked *