Replicas
Configure read replicas for PostgreSQL databases with dedicated connection strings.
SMLL databases support up to 3 replicas for high availability and read scaling. Replicas are streaming replicas that stay in sync with the primary via PostgreSQL's built-in replication.
How replicas work
- Replicas are read-only copies of your primary database
- Changes on the primary are streamed to replicas in near real-time (typically < 1 second lag)
- If the primary fails, a replica is automatically promoted
- Each replica runs on separate infrastructure for fault isolation
Configuring replicas
During creation
When creating a database, set the Replicas count to 2 or 3.
After creation
- Navigate to your database's Settings tab
- Under Replicas, use the slider or input to set the replica count (1–3)
- Click Save — the new replica provisions in the background
Scaling replicas up or down takes effect within a few minutes. Existing connections are not interrupted.
Connection strings
Read-write (primary)
All writes and reads go to the primary:
postgresql://app:<password>@db-<name>-rw.vpc-<id>.svc:5432/appRead-only (replicas)
Distribute read queries across replicas using the read-only endpoint:
postgresql://app:<password>@db-<name>-ro.vpc-<id>.svc:5432/appThe -ro endpoint load-balances across all healthy replicas. Use this for analytics queries, reporting, and read-heavy workloads.
External access
With external access enabled, both endpoints are available externally:
- Read-write:
<shortID>.eu-central-1.database.smllapp.com:5432 - Read-only:
<shortID>-ro.eu-central-1.database.smllapp.com:5432
External connections are routed through PgBouncer. The read-only endpoint routes to replica pods via a separate PgBouncer configuration.
Automatic failover
If the primary instance fails:
- A healthy replica is automatically promoted to primary
- Remaining replicas reconfigure to follow the new primary
- Connection endpoints are updated automatically
- The failed instance is replaced in the background
This process typically completes in under 30 seconds.
Replication lag
Replication lag is shown on the database Overview tab for each replica. A default alert fires if lag exceeds 30 seconds for 2 minutes.
Pricing
Replicas use the same compute and storage pricing as the primary:
- Compute: £5/vCPU + £2.50/GB RAM per month, per replica
- Storage: Each replica maintains its own copy of the data