Skip to main content
Microsoft
separator
https://catalogartifact.azureedge.net/publicartifacts/cloudimg1647283583153.spqr-063d82e6-c849-4be0-936b-f11967bf2e28/image2_logolarge.png

SPQR 3.0 Postgres Query Router on Ubuntu 24.04 | 24/7 Support by cloudimg

by cloudimg

Stateless Postgres query router: shard and route PostgreSQL traffic across backends by key

SPQR 3.0 Stateless Postgres Query Router on Ubuntu 24.04 LTS

SPQR (Stateless Postgres Query Router, from the pg-sharding project) speaks the PostgreSQL wire protocol and transparently routes and pools client queries across a set of PostgreSQL shards by a sharding key. Applications keep talking to a single endpoint while SPQR decides which shard each row belongs to, letting a PostgreSQL database grow horizontally.

What cloudimg delivers

  • SPQR 3.0.1 built from source, fronting two PostgreSQL 17 shard clusters that run on the same VM as the two real shards - a self-contained single-node sharding appliance
  • The router runs with its embedded coordinator disabled in favour of an in-memory metadata store, so there is no separate etcd cluster or coordinator process to operate
  • A worked example out of the box: a distribution with two key ranges routes rows to shard1 or shard2 by an integer key, ready to insert and query through the router on port 6432
  • Per-VM passwords for the router role and the PostgreSQL superuser, plus a per-VM TLS certificate, generated at first boot - there is no default login, and every client connection is encrypted
  • Fully patched Ubuntu 24.04 LTS with unattended security updates enabled
  • 24/7 cloudimg support

Licensing

SPQR and PostgreSQL are both distributed under the PostgreSQL License (a permissive, BSD-style licence). There is no per-CPU or per-seat software fee. The cloudimg charge (0.04 US dollars per vCPU/hour) covers packaging, security patching, image maintenance and 24/7 support.

Recommended sizing

Standard_B2s (2 vCPU, 4 GB) runs the router plus both shard clusters comfortably for evaluation and light workloads; scale up for larger shards and higher query volumes, or point the shards at dedicated PostgreSQL backends.

Getting started

Deploy the VM, open ports 22, 5432 and 6432 in your NSG, read the per-VM credentials from /root/spqr-credentials.txt over SSH, then connect a psql client through the router on port 6432 and route a query to a shard. Full step-by-step guide: https://www.cloudimg.co.uk/guides/spqr-on-ubuntu-24-04-azure/. 24/7 support: support@cloudimg.co.uk.

At a glance

https://catalogartifact.azureedge.net/publicartifacts/cloudimg1647283583153.spqr-063d82e6-c849-4be0-936b-f11967bf2e28/image5_screenshot01.png
https://catalogartifact.azureedge.net/publicartifacts/cloudimg1647283583153.spqr-063d82e6-c849-4be0-936b-f11967bf2e28/image7_screenshot02.png
https://catalogartifact.azureedge.net/publicartifacts/cloudimg1647283583153.spqr-063d82e6-c849-4be0-936b-f11967bf2e28/image4_screenshot03.png
https://catalogartifact.azureedge.net/publicartifacts/cloudimg1647283583153.spqr-063d82e6-c849-4be0-936b-f11967bf2e28/image6_screenshot04.png
English (United States)
Your Privacy Choices Opt-Out Icon Your Privacy Choices
Consumer Health Privacy Sitemap Contact Us Privacy & Cookies Terms of Use About our ads Manage cookies