Microsoft Azure – Develop Apps with Azure Database For PostgreSQL
In this article, we will learn how to use a Flexible Server in Azure Database for Postgres SQL. We can create an Azure Database for Postgres SQL with a Flexible Server which allows for configuration and control of the database server.
Follow the below-given steps to develop apps with Microsoft Azure Database for PostgreSQL.
Step 1: In the Azure Portal, we’ll start by creating a new Azure Database for Postgres SQL.
Step 2: There are the choices given. Let’s pick Flexible Server.
Step 3: First, select a resource group and now give it a name. Let’s pick the development workload type. This pre-configures these settings for us. With Flexible Server, we have control over a high availability. For instance, we can tell that we want this server to use two availability zones, which increases its availability.
Step 4: Let’s take a look at the compute and storage. Because we chose the development workload, this will be preset to a burstable compute tier which is a feature of Flexible Server. This saves costs by only increasing CPU power when we need it. Here, we can configure the compute and storage in more detail.
- Down there, we can configure the backup retention.
Step 5: Let’s leave that as it is and go back. Here put in the admin username and now fill in the password and confirm it. Azure use these credentials to connect to the server.
Step 6: Next, networking. A flexible Server enables you to put the server in a virtual network to enhance security. we will expose the server through the Internet with public access. When we do that, we use the firewall for security. We’ll add to the IP mask that allows all IP addresses to connect to the server. Let’s create the server.
Note: You shouldn’t do this in a real-world scenario, but only for development and demos.
Step 7: Another feature of Flexible Server, is that it allows us to stop the server to save costs. It also enables us to configure maintenance windows. This helps to manage downtime for our applications.
Step 8: Let’s connect to it. We’ll do that in the Azure Cloud Shell. We can use any tool we prefer to connect to the server. Here, we will use these commands which use the Postgres SQL.exe tool that is pre-installed in the Azure Cloud Shell. Put in the password and that’s it. We are connected to the server.
The Flexible Server option for Azure Database for Postgres SQL, allows you to customize high availability, maintenance windows, use burstable compute, and stop and start the server.