17.3 C
New York
Saturday, August 23, 2025

Operating high-performance PostgreSQL on Azure Kubernetes Service


PostgreSQL continues to solidify its place as a top-tier database selection amongst workloads operating on Kubernetes.

Within the ever-evolving world of cloud-native applied sciences, PostgreSQL continues to solidify its place as a top-tier database selection amongst workloads operating on Kubernetes. In accordance with the Kubernetes within the Wild 2025 report, PostgreSQL now powers 36% of all database workloads operating on Kubernetes—up 6 factors since 2022—signaling its rising reputation and rising belief among the many Kubernetes neighborhood1. Nevertheless, operating data-intensive PostgreSQL workloads on Kubernetes has its personal set of challenges. These embody managing Kubernetes primitives like StatefulSets and deployments, in addition to reaching optimum efficiency by configuring storage, replication, and database settings, however that is quick evolving to a simplified expertise.

We now present two choices for deploying stateful PostgreSQL workloads primarily based on efficiency wants. To assist databases with stringent latency and scalable transaction necessities, you may leverage Azure Container Storage to orchestrate Kubernetes quantity deployment on native NVMe to scale up IOPS whereas sustaining extraordinarily low sub-ms latency. For situations the place optimized price-performance is a precedence, Premium SSD v2 is the go-to selection. Moreover, working with CloudNativePG, we built-in a sturdy open-source operator for PostgreSQL to assist a excessive availability database deployment mannequin on Azure Kubernetes Service (AKS). Our superior storage choices mixed with CloudNativePG make AKS a sturdy platform for high-performance PostgreSQL workloads.

Breakthrough PostgreSQL efficiency with native NVMe

For performance-critical PostgreSQL workloads, reminiscent of these dealing with huge concurrent transactions or demanding, low-latency information entry, native NVMe immediately connected to Azure Digital Machine (VM) SKUs is your greatest wager. Utilizing native NVMe drives with Kubernetes was difficult—it typically required organising RAID throughout the drives and manually managing static quantity orchestrators. Azure Container Storage successfully addresses this problem.

Azure Container Storage is a completely managed, container-native storage resolution, designed particularly for Kubernetes. Builders can merely request a Kubernetes quantity, and Azure will dynamically provision storage backed by the accessible native NVMe drives on AKS nodes. This offers PostgreSQL customers direct connect block storage IOPS and latency inside a managed, orchestrated cloud setting. Whether or not you’re powering fee programs, gaming backends, or real-time personalization engines, you get the perfect of each pace and ease. Azure Container Storage additionally helps Azure Disk and Elastic SAN (Preview), so you may select backing storage with completely different sturdiness, scale, or value as your wants evolve—all below a constant, Kubernetes-native management airplane.

Our benchmark outcomes have proven PostgreSQL reaching shut to fifteen,000 transactions per second (TPS) with single-digit millisecond end-to-end question latency with the Standard_L16s_v3 VM. When scaling as much as bigger VM SKUs like Standard_L64s_v3, we noticed TPS reaching as much as 26,000 whereas sustaining low latency. For extra particulars of our benchmark runs, seek advice from the comparability of storage choices part under.

Optimize price-performance with Premium SSD v2

Azure Premium SSD v2 affords an optimum steadiness of price-performance and a versatile deployment mannequin, making it particularly well-suited for manufacturing environments that must scale over time. With Premium SSD v2, you may configure IOPS, throughput, and measurement independently—enabling PostgreSQL deployments to scale dynamically with demand whereas minimizing upfront prices and avoiding useful resource overprovisioning.

Whether or not you’re operating multi-tenant SaaS platforms, manufacturing programs that scale with enterprise wants, or purposes with spiky site visitors, this flexibility results in actual financial savings with out sacrificing efficiency. With as much as 80,000 IOPS and 1,200 MB/s per quantity, Premium SSD v2 helps extremely demanding PostgreSQL workloads on an infrastructure that adapts to your app.

Comparability of storage choices

That can assist you assess the 2 storage choices outlined above, we performed benchmark runs utilizing the CloudNativePG operator setups on AKS with comparable core and reminiscence consumption, with each backing storage choices as the one variable: one leveraging native NVMe with Azure Container Storage, and the opposite utilizing Premium SSD v2 with Disk CSI driver.

For the primary configuration, we used Standard_D16d_v5 SKU and provisioned two Premium SSD v2 32 GiB disks every having 3000 IOPS and 125 MB/s throughput for log and information recordsdata. Within the second setup, we ran on Standard_L16s_v3 nodes with native NVMe storage included. The check setting was configured to intently simulate a real-world manufacturing database situation. TPS measures what number of particular person transactions (reminiscent of INSERT, UPDATE, DELETE, or SELECT) a system can deal with per second. Latency refers back to the time delay between issuing a request to the database and receiving a response, which is very crucial for purposes requiring real-time or near-real-time responsiveness, reminiscent of monetary programs, on-line gaming, or high-performance analytics.

A graph for Postgre S Q L performance, showing best cost-efficiency and best performance options.

Native NVMe on Standard_L16s_v3 delivered 14,812 TPS with an common latency of 4.321 milliseconds. PremiumV2_LRS on Standard_D16ds_v5 recorded 8,600 TPS at 7.417 milliseconds latency. See pricing comparability under:

Price comparison table for Premium S S D v 2 with Disk C S I driver and Local N V M e with A C Stor.

*Month-to-month prices are primarily based on the bottom 3000 IOPS and 125 MB/s throughput. You possibly can alter the efficiency (capability, throughput, and IOPS) of Premium SSD v2 disks at any time, permitting workloads to be value environment friendly whereas assembly workload measurement and efficiency necessities.

**With 3 VMs of L16s_v3, you get 11.52 TB of storage allotted by default that’s used to serve the volumes created for PostgreSQL workload. For different VM sizes within the L-Collection household, the worth monthly and allotted storage will fluctuate.

For PostgreSQL workloads, the selection between utilizing native NVMe and Premium SSD v2 is dependent upon balancing efficiency, value, and information sturdiness. Native NVMe by way of Azure Container Storage affords extraordinarily low latency and excessive throughput, making it appropriate for performance-sensitive PostgreSQL deployments. The prices are larger with native NVMe, and there may be much less flexibility to scale independently of workload traits. Conversely, Premium SSD v2 offers higher price-performance effectivity and versatile scalability, making it a viable possibility for PostgreSQL situations that require dealing with elevated scale or purposes having unpredictable surges in demand or utilization. When it comes to information sturdiness, Premium SSD v2 affords regionally redundancy by default, whereas for native NVMe, it’s endorsed to make use of a replica-based structure managed by CloudNativePG operator and an object storage-based backup strategy to forestall information loss.

Constructed for top availability with CloudNativePG on Azure Kubernetes Service

For groups deploying PostgreSQL in manufacturing, excessive availability and backups are non-negotiable. With the open-source CloudNativePG operator, a extremely accessible PostgreSQL cluster on AKS can simply be deployed with:

  • Constructed-in replication and automatic failover.
  • Software constant backup with native integration with Azure Blob Storage.
  • Seamless integration with Azure Container Storage.
  • Versatile storage choices: select Premium SSD v2 or native NVMe primarily based on workload wants.

Whether or not you’re supporting inner enterprise apps or customer-facing platforms, this offers you peace of thoughts with out the effort of hand-building customized excessive availability logic and separate backup workflows. Get began with deploying extremely accessible PostgreSQL on AKS with CloudNativePG operator utilizing our step-by-step reference information.

Prepared for the longer term

PostgreSQL is only one of many stateful workloads that organizations are actually confidently operating on Azure Kubernetes Service. From databases to message queues, AI inferencing, and enterprise purposes, AKS is evolving to satisfy the wants of persistent, data-heavy purposes in manufacturing.

Whether or not you’re deploying Redis, MongoDB, Kafka, and even ML-serving pipelines with GPU-backed nodes, AKS offers the inspiration to handle these workloads with efficiency, consistency, and operational ease, together with clear end-to-end steering.

With improvements like Azure Container Storage for native NVMe and Premium SSD v2 for scalable persistent storage, we’re making it simpler than ever to construct stateful purposes which might be: dependable, performant, and price environment friendly for mission crucial workloads.

Modernize your information layer on Kubernetes immediately. Whether or not you’re operating PostgreSQL or any stateful tier, Azure delivers the efficiency and manageability to make it occur. Discover confirmed patterns and deployment choices within the AKS Stateful Workloads Overview.


1Kubernetes within the Wild 2025 report



Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Stay Connected

0FansLike
0FollowersFollow
0SubscribersSubscribe
- Advertisement -spot_img

Latest Articles