Jorge Turbica / blog · Blog ← All articles ES · Leer en español
Cloud

AlloyDB Express spins up Postgres in 2 s and costs nothing idle, but takes 20 s to wake

Google previews a 1–2 vCPU, scale-to-zero AlloyDB at $0.115 per CU-hour for CI and agents. No backups or SLA, and London is its only EU region.

Google Cloud can now hand you a ready-to-use PostgreSQL database in under two seconds and stop charging for compute the moment nobody is using it. AlloyDB Express, in preview since November 4, 2026, targets test environments, CI and coding agents that want a database of their own per task. The fine print lives in the docs: waking up takes about 20 seconds, and the preview has no backups.

What AlloyDB Express is

It is a flavour of AlloyDB for PostgreSQL built on a single zonal node with 1 or 2 vCPUs (4 or 8 GB of RAM), up to 20 GB of storage and PostgreSQL 18 as the only version. It pauses itself after 15 minutes of inactivity and resumes when a connection or query arrives. You create it from the console, gcloud, the REST API or the AlloyDB remote MCP server, which is how Google expects an agent to spin up an isolated database for each test or prototype.

It keeps what sets AlloyDB apart: vector indexes with pgvector HNSW and ScaNN, and Gemini functions inside SQL (ai.if, ai.rank, ai.generate). And there is a way out: one command turns it into a regular AlloyDB cluster with the same connection string and DNS name, after which you can add regional HA, read pools and automated backups.

Pricing, with a CI database as the example

ItemPrice
Active compute$0.115 per CU-hour, billed per second (1 CU = 1 vCPU and 4 GB)
Paused compute$0
Storage$0.30 per GB-month, only what you use
Free50 CUs and 2 GB per month per billing account, for 12 months

A 1-vCPU database that a test suite keeps busy for 3 hours every working day (22 days) adds up to 66 CU-hours: $7.59 of compute plus $1.50 for 5 GB of data. Roughly $9 a month before the free allowance. The same instance running around the clock (730 hours) would cost $83.95 in compute alone. Mind the tail, too: every burst of activity keeps billing until the 15 idle minutes are up, so twenty short jobs separated by long gaps pay far more than their actual runtime.

Against Neon, the scale-to-zero Postgres everyone compares with

AlloyDB Express (preview)Neon (Launch plan)
Compute$0.115/CU-hour$0.106/CU-hour
Storage$0.30/GB-month$0.35/GB-month
Pauses after15 min (fixed)5 min (can be disabled)
Resumeabout 20 s"a few hundred milliseconds"
Max size2 vCPUs, 20 GBup to 16 CU

On hourly price they are practically tied: the same example on Neon comes to $7.00 of compute and $1.75 of storage. The real gap is cold starts and ecosystem. Neon wakes up almost instantly and pauses sooner; AlloyDB Express wins if you already live on Google Cloud and want IAM, VPC Service Controls, Private Service Connect and a straight path to a production AlloyDB behind the same DNS name.

Creating one

You need roles/alloydb.admin (or Editor) and the AlloyDB API enabled. The instance must be created with --cpu-count=1; you can move it to 2 later.

bash
gcloud beta alloydb clusters create ci-db \
  --region=europe-west2 \
  --password="$PG_PASSWORD" \
  --enable-express \
  --project=my-project

gcloud beta alloydb instances create ci-db-primary \
  --cluster=ci-db \
  --region=europe-west2 \
  --instance-type=PRIMARY \
  --cpu-count=1 \
  --enable-public-dns \
  --project=my-project

# Connect through the Auth Proxy, no IP allowlist needed
gcloud beta alloydb connect ci-db-primary \
  --cluster=ci-db --region=europe-west2 \
  --public-ip --user=postgres --database=postgres \
  --project=my-project

From gcloud, REST or MCP only Private Service Connect is on by default; you have to ask for public DNS with --enable-public-dns and, to connect with plain psql, authorise your ranges with --authorized-external-networks. That flag replaces the whole list on every update. To graduate to full AlloyDB:

bash
gcloud beta alloydb clusters update ci-db \
  --region=europe-west2 \
  --no-enable-express \
  --project=my-project

Gotchas and edge cases

  • Regions: only seven, and in Europe just europe-west2 (London). If your CI runners sit in europe-west1, every query crosses regions.
  • 20 seconds to wake up: the announcement says "in seconds"; the docs pin it at about 20. A test that opens its connection with a 10-second timeout will fail after every pause.
  • No backups: no automated or on-demand backups, no PITR, no SLA. Writes are blocked once you hit 20 GB.
  • No Terraform: the announcement mentions Terraform, but the preview docs list it as unsupported, along with Config Connector and CMEK.
  • max_connections is fixed at 200, and memory-hungry extensions can run out of room in 4 GB.
  • One-way trip: once upgraded to full AlloyDB, there is no going back to Express.

For throwaway test databases, or for letting an agent try migrations against a real Postgres, it makes sense today. For anything holding data you cannot regenerate, not yet.

Sources

Jorge Turbica

Software Engineer and SRE. I write about the real challenges I run into in production.

See portfolio ↗