Shared and dedicated clusters
Where Aurabase puts the database of a new project, what the cluster of an organization shares and what a dedicated cluster adds, and what is not offered today, such as read replicas.
Mental model#
A cluster is a set of PostgreSQL instances managed together: one primary that takes writes and, on some plans, standbys that copy it. Aurabase uses two kinds:
- Cluster of the organization. Created when the organization provisions its first PostgreSQL project. Each project of the organization gets its own database on it. It is never shared with another organization.
- Dedicated cluster. Created for one project. Its database (
app) holds the schemas of that project only.
cluster of the organization dedicated cluster
┌───────────────────────────────────────┐ ┌───────────────────────────────┐
│ primary │ │ primary standby standby │
│ ├─ database project_<a> (project A) │ │ └─ database app (project C) │
│ ├─ database project_<b> (project B) │ │ PgBouncer ×2 │
│ PgBouncer (transaction mode) │ └───────────────────────────────┘
└───────────────────────────────────────┘Which plan gets which cluster#
The placement is decided once, when the project is created, from the plan of its organization:
| Plan of the organization when the project is created | Placement |
|---|---|
| Free, Pro | Database on the cluster of the organization |
| Team, Enterprise | Dedicated cluster |
A project keeps its placement afterwards: a project created on the cluster of its organization stays there when the organization changes plan. The placement only applies to PostgreSQL projects; a MongoDB project follows the NoSQL document store path.
Side by side#
| Cluster of the organization | Dedicated cluster | |
|---|---|---|
| Shared with | The other projects of your organization | Nobody |
| PostgreSQL instances | 1 | 3 (one primary, two standbys) |
max_connections | Free 50, Pro 100 | Team 300, Enterprise 400 |
| Storage | Free 5 Gi, Pro 20 Gi | Team 50 Gi, Enterprise 100 Gi |
| Direct connection | Through the PgBouncer of the cluster, transaction mode | Straight to the primary, session semantics |
| PostgREST pool per replica, by default | 2 connections | 10 connections |
| Extensions installed at creation | 13 (see How extensions are installed) | At least vector, pgcrypto, uuid-ossp, pg_trgm |
SQL accepted by aura db raw | Same check on both | Same check on both |
The values come from the provisioning code. The behaviour of the cluster of an organization was measured on a running stack; the dedicated cluster was not replayed for this page.
Idle projects#
A project that receives no traffic can be put to sleep: its PostgREST server is scaled down, and when every project of an organization sleeps, the cluster of the organization can sleep too. The first request to a sleeping project starts it again and answers 503 with Retry-After: 5 until it is ready: retry after the delay. A project paused because its subscription was cancelled answers 403 instead, and does not wake up on a request.
Replicas and high availability#
- High availability. On a dedicated cluster the two standbys follow the primary, ready to take over if it fails. The cluster of an organization runs a single instance.
- No read replicas. There is no command, API or Studio page to create a read replica, and no endpoint that sends reads to a standby: the SDK, the REST API,
aura db rawand the direct connection all reach the primary. - No logical replication to your systems.
create publicationfails withpermission denied for database …for the roles a project can use.
For a copy of a project to work on, create a branch: aura branch create copies the schema and the rows into a new project. It is a copy taken once, not a replica that follows the original.
Trade-offs#
- Organization cluster: cost against isolation of resources. Projects of one organization share CPU, memory, disk and connections. It costs less than a cluster per project, and one busy project can slow the others.
- Dedicated cluster: resources and session connections. A project gets its own instances, standbys, and a direct connection without a transaction pooler, at the price of the Team or Enterprise plan.
- No move between placements. Nothing moves an existing project from the cluster of its organization to a dedicated cluster. To change placement, create a project under the new plan and copy the data across, for example with
pg_dump(see Connect to your database).
Related pages#
- Connection pooling and limits
The connection and request limits of each plan in detail.
- Project isolation
What keeps projects apart on the cluster of an organization.
- How extensions are installed
Why the two placements start with different extensions.
- Database branches
A copy of a project for each pull request.