Sends telemetry data
Cloud / Knowledge library
Azure Cosmos DB for PostgreSQL
Distributes PostgreSQL tables across nodes for horizontally scalable relational workloads
Why learn Azure Cosmos DB for PostgreSQL?
Teams use Azure Cosmos DB for PostgreSQL to adopt cloud-native relational database without building the complete underlying platform themselves.
The problem it solves
Provides relational transactions with provider-native scaling and availability
Where it came from
Azure Cosmos DB for PostgreSQL is Microsoft Azure's offering for cloud-native relational database. Its closest catalog counterparts are Amazon Aurora and Google Cloud Spanner; they address the same broad need but are not feature-for-feature identical.
Build your understanding
Work through these exercises in order. Try the task before opening a reference.
- Explain the main responsibility of Azure Cosmos DB for PostgreSQL.
- Choose a workload that fits Azure Cosmos DB for PostgreSQL.
- Identify one operational tradeoff of Azure Cosmos DB for PostgreSQL.
- Compare Azure Cosmos DB for PostgreSQL with Amazon Aurora.
- Compare Azure Cosmos DB for PostgreSQL with Google Cloud Spanner.
Documentation and sources
- Microsoft Azure product catalog (azure.microsoft.com)
Connect the ideas
Alternatives
Real World Example
Global Logistics Fleet Tracking Scaling
Logistics companies managing millions of real-time IoT sensor updates from a global fleet.
The business problem
A single-node PostgreSQL instance hits write-throughput bottlenecks and storage limits when processing high-velocity telemetry data from thousands of vehicles simultaneously.
How this topic solves it
Azure Cosmos DB for PostgreSQL distributes PostgreSQL tables across multiple nodes, allowing the database to scale horizontally by partitioning data based on a distribution column, such as a vehicle identifier.
- Provision an Azure Cosmos DB for PostgreSQL cluster.
- Select a distribution column, such as vehicle_id, to serve as the shard key.
- Execute the distribution function to partition existing tables across the worker nodes.
- Configure application connection strings to route queries through the coordinator node.
Shows how the coordinator node routes data to worker nodes based on the distribution key.
Routes queries and manages metadata
Stores shard A
Stores shard B
- IoT Application → SQL Query → Coordinator Node
- Coordinator Node → Distributed Write → Worker Node 1
- Coordinator Node → Distributed Write → Worker Node 2
Expected business outcome
The system achieves horizontal write scalability, allowing the database to handle increasing telemetry ingestion rates by adding more worker nodes to the cluster.
Limitations and checks
Queries that do not include the distribution column in the WHERE clause may result in cross-shard communication, which increases latency; verify this by checking the query plan for distributed execution overhead.