Blog

Bringing value to PostgreSQL on Azure

PostgreSQL is an advanced open-source database similar to Oracle Database and IBM DB2. It’s a powerful object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance. PostgreSQL includes enterprise-ready features such as full ACID (atomicity, consistency, isolation, durability) compliance, reliable transactional processing, and multiversion concurrency control. As a database management system, it offers high levels of resilience, integrity, and correctness.

Microsoft Azure is already an excellent platform for running traditional relational database management systems. And when you use Azure NetApp® Files as storage, you get added value: the ability to run PostgreSQL databases in the cloud.

A PostgreSQL Storage Solution for Cloud

With Azure NetApp Files, you can run a high-performance database with maximum data protection. Underlying that security is NetApp Snapshot™ technology, which offers a crucial option for rapid, efficient database backup and restoration. By design, Azure NetApp Files provides eleven nines of data durability.  

With consistently high performance of over 460K IOPS, Azure NetApp Files provides shared persistent storage with high throughput and low latency. It easily meets the demands of large PostgreSQL databases, with SLAs that guarantee performance. 

An Easy Way to Bring Back Your Database: Snapshot Copies

With NetApp Snapshot technology, you can easily create a copy of a PostgreSQL database. Snapshot copies help you restore data, roll back the data to the same volume, or create another volume. In other words, you can revert the changes to the original volume if data inconsistencies or error occur. 

Snapshot copies are fast, plentiful, and nondisruptive. A Snapshot copy simply manipulates block pointers. It creates a “frozen” read-only view of a volume, which enables your applications to access older versions of files and directory hierarchies without special programming. Creating a Snapshot copy takes only a few seconds regardless of the size of the volume or the level of activity in the environment. Because they are read-only, incremental copies, you pay only for the space consumed by new data written.  

Speed Time to Market With Instant Copy 

By using the Snapshot feature of Azure NetApp Files, you can instantly copy database files, drastically improving the process of copying, backing up, and reverting. The process takes almost no time, which ultimately leads to lower costs by way of a quicker time to market. Azure NetApp Files can back up your database and transaction logs and store both for whatever retention period you specify. You can restore your database instance to a particular point in time — any second during your retention period, up to the last 5 minutes.

Most organizations need multiple copies of data for testing and development, and PostgreSQL landscapes are littered with system copies for various uses. But creating and refreshing those copies can be time consuming and tedious. With Snapshot technology, you can create these copies instantly and automatically. 

High Availability and Data Durability

The architecture of Azure NetApp Files provides failover and advanced data protection, offering high availability and uptime. Azure adds to availability by guaranteeing 99.99% connectivity for multiple instances.

With Azure NetApp Files, data is protected not just against multiple drive failures, but also against numerous storage media errors that can harm the durability and integrity of your data. And with eleven nines of durability — based on the experience of over 300,000 customers — you don’t have to worry that your data is going to disappear. Durability is underpinned by the product's SLA.

Supported Protocols

PostgreSQL can be deployed on Azure NetApp Files with NFS or SMB protocol. Azure NetApp Files delivers fully managed file services for both protocols.

Security and Encryption 

Azure NetApp Files is purpose-built for Azure security standards and compliance certifications. It provides exacting security features with FIPS-140-2-compliant data encryption at rest, role-based access control (RBAC), Active Directory authentication for SMB, and secure export policies for network-based access control lists. Azure NetApp Files also enhances data security in virtual private clouds by presenting mount points instead of a public IP address. 

REST APIs

Azure NetApp Files has REST APIs that can be called by various orchestration engines and scripting languages. Here are some example scripts that you can leverage to get started.

Get and PUT Request Example

This example includes:

  • All NetApp accounts
  • Capacity pools for NetApp account
  • Volumes
Snapshot copies for a volume

#get NetApp accounts
curl -X GET -H "Authorization: Bearer TOKENGOESHERE" -H "Content-Type: application/json" https://management.azure.com/subscriptions/SUBIDGOESHERE/resourceGroups/RESOURCEGROUPGOESHERE/providers/Microsoft.NetApp/netAppAccounts?api-version=2017-08-15

#get capacity pools for NetApp account
curl -X GET -H "Authorization: Bearer TOKENGOESHERE" -H "Content-Type: application/json" https://management.azure.com/subscriptions/SUBIDGOESHERE/resourceGroups/RESOURCEGROUPGOESHERE/providers/Microsoft.NetApp/netAppAccounts/NETAPPACCOUNTGOESHERE/capacityPools?api-version=2017-08-15

#get volumes in NetApp account & capacity pool
curl -X GET -H "Authorization: Bearer TOKENGOESHERE" -H "Content-Type: application/json" https://management.azure.com/subscriptions/SUBIDGOESHERE/resourceGroups/RESOURCEGROUPGOESHERE/providers/Microsoft.NetApp/netAppAccounts/NETAPPACCOUNTGOESHERE/capacityPools/CAPACITYPOOLGOESHERE/volumes?api-version=2017-08-15

#get snapshots for a volume
curl -X GET -H "Authorization: Bearer TOKENGOESHERE" -H "Content-Type: application/json" https://management.azure.com/subscriptions/SUBIDGOESHERE/resourceGroups/RESOURCEGROUPGOESHERE/providers/Microsoft.NetApp/netAppAccounts/NETAPPACCOUNTGOESHERE/capacityPools/CAPACITYPOOLGOESHERE/volumes/VOLUMEGOESHERE/snapshots?api-version=2017-08-15

#create a NetApp account 
curl -X PUT -H "Authorization: Bearer TOKENGOESHERE" -H "Content-Type: application/json" https://management.azure.com/subscriptions/SUBIDGOESHERE/resourceGroups/RESOURCEGROUPGOESHERE/providers/Microsoft.NetApp/netAppAccounts/NETAPPACCOUNTGOESHERE?api-version=2017-08-15

#create a capacity pool 
curl -X PUT -H "Authorization: Bearer TOKENGOESHERE" -H "Content-Type: application/json" https://management.azure.com/subscriptions/SUBIDGOESHERE/resourceGroups/RESOURCEGROUPGOESHERE/providers/Microsoft.NetApp/netAppAccounts/NETAPPACCOUNTGOESHERE/capacityPools/CAPACITYPOOLGOESHERE?api-version=2017-08-15

#create a volume 
curl -X PUT -H "Authorization: Bearer TOKENGOESHERE" -H "Content-Type: application/json" https://management.azure.com/subscriptions/SUBIDGOESHERE/resourceGroups/RESOURCEGROUPGOESHERE/providers/Microsoft.NetApp/netAppAccounts/NETAPPACCOUNTGOESHERE/capacityPools/CAPACITYPOOLGOESHERE/volumes/MYNEWVOLUME?api-version=2017-08-15

#create a volume snapshot 
curl -X PUT -H "Authorization: Bearer TOKENGOESHERE" -H "Content-Type: application/json" https://management.azure.com/subscriptions/SUBIDGOESHERE/resourceGroups/RESOURCEGROUPGOESHERE/providers/Microsoft.NetApp/netAppAccounts/NETAPPACCOUNTGOESHERE/capacityPools/CAPACITYPOOLGOESHERE/volumes/MYNEWVOLUME/Snapshots/SNAPNAME?api-version=2017-08-15

For more details, check out this Azure NetApp Files APIs article.

Are You Ready to Get Started?

Learn about the next steps toward deploying your PostgreSQL database on Azure cloud today. 

-