15% off your workspace - subscribe to our blogNo per-service fees - one plan, unlimited appsDeploy in under 40 seconds99.95% uptime SLAFree tier available - start building today15% off your workspace - subscribe to our blogNo per-service fees - one plan, unlimited appsDeploy in under 40 seconds99.95% uptime SLAFree tier available - start building today
Miget x AIPlansCompareBlogDashboard
Start for Free
Blog/Release Notes/Miget/
·

PostgreSQL HA Clusters Are Now Available

You can now deploy high-availability PostgreSQL clusters on Miget. Create a cluster with 3, 5, or 7 instances and get automatic replication, leader election, and transparent failover - all behind the same connection string.

What shipped

HA clusters bring production-grade database reliability to your Miget Resource. Instead of running a single PostgreSQL instance, you can deploy a cluster of synchronized replicas managed by CloudNativePG, the Kubernetes-native PostgreSQL operator.

If the primary instance fails, a replica is automatically promoted. Your application reconnects without any configuration changes.

How it works

A cluster consists of one primary and multiple read replicas. All instances share the same connection string. CloudNativePG handles:

  • Streaming replication between primary and replicas
  • Automatic failover when the primary becomes unavailable
  • Leader election to promote the most up-to-date replica
  • Backup coordination across all instances

Supported instance counts are 3, 5, or 7. Each instance gets its own allocation of CPU, RAM, and disk within your Resource plan.

How to create a cluster

From the dashboard

Navigate to your app's Addons tab, click "Create Addon", choose PostgreSQL, and set the instance count to 3, 5, or 7.

From the API

curl -X POST https://app.miget.com/api/v1/apps/{app-uuid}/addons \
  -H "Authorization: Bearer {token}" \
  -d '{
    "type": "postgres",
    "label": "Production DB",
    "postgres_version": "16",
    "ram_size": 256,
    "disk_size": 10,
    "instances": 3
  }'

The instances parameter is the only addition. Everything else works the same as creating a standalone database.

Scaling an existing cluster

You can change the instance count on a running cluster:

curl -X PUT https://app.miget.com/api/v1/apps/{app-uuid}/addons/{addon-id} \
  -H "Authorization: Bearer {token}" \
  -d '{"instances": 5}'

Resource adjustments (RAM, disk) can be done at the same time. The system validates that your Resource plan has enough capacity for the total allocation across all instances.

What you should know

  • PostgreSQL only - HA clusters are available for PostgreSQL versions 13 through 17. MySQL support is standalone only for now.
  • Pro plans - CPU is multiplied by the instance count on Pro plans, giving each instance its own dedicated compute.
  • Backups included - Automated backups work across the cluster and are enabled by default on paid plans.
  • Same connection string - Your DATABASE_URL stays the same. Failover is transparent to your application.
  • Replicas and external replication - You can still create read replicas from a cluster and set up external replication for disaster recovery.

What's next

MySQL cluster support is on our roadmap. We're also working on observability features that will give you detailed metrics per instance.

Get started


PostgreSQL HA Clusters Are Now Available - Miget Blog | Miget