コンテンツへスキップ
オーラベースのロゴ
オーラベース

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.

解説6 分 読み取りレベル 中間

このページはまだお使いの言語では利用できません。英語で表示されます。

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 createdPlacement
Free, ProDatabase on the cluster of the organization
Team, EnterpriseDedicated 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 organizationDedicated cluster
Shared withThe other projects of your organizationNobody
PostgreSQL instances13 (one primary, two standbys)
max_connectionsFree 50, Pro 100Team 300, Enterprise 400
StorageFree 5 Gi, Pro 20 GiTeam 50 Gi, Enterprise 100 Gi
Direct connectionThrough the PgBouncer of the cluster, transaction modeStraight to the primary, session semantics
PostgREST pool per replica, by default2 connections10 connections
Extensions installed at creation13 (see How extensions are installed)At least vector, pgcrypto, uuid-ossp, pg_trgm
SQL accepted by aura db rawSame check on bothSame 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 raw and the direct connection all reach the primary.
  • No logical replication to your systems. create publication fails with permission 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).
@aurabase/aurabase-js@0.7.5 · aura@0.3.4↗ 問題を報告する