System principlesArticle

How SPG99 keeps one DSN and preserves durable state when compute stops

The core SPG99 pattern: a stable entrypoint, an independent compute lifecycle, and durable state outside the worker. That is what makes auto-start safe for applications.

Published
March 14, 2026
Updated
March 14, 2026
Read time
7 min read
gatewaydurable storageautostartcontrol plane
SPG99 architecture: Gateway, Control Plane, worker, and durable storage
The diagram shows how SPG99 separates the stable entrypoint, compute lifecycle, and durable database state.

A stable entrypoint

The main rule is that the application should not have to care about internal lifecycle transitions. That is why the database keeps one stable DSN whether compute is already active or needs to wake up after idle.

SPG99 keeps this entrypoint separate from the worker that actually executes PostgreSQL processes. For the client, that means the connection string stays the same even if compute had been stopped and later recreated.

For the application, this remains an ordinary PostgreSQL DSN
postgresql://user:password@gateway.spg99.ru:6432/appdb?sslmode=require

Durable state lives outside the worker

If database state lived only inside the current compute node, stopping the worker would create either data-loss risk or a complicated recovery path. SPG99 avoids that by keeping durable state separate from the currently running worker.

The worker can therefore stop, be recreated, or be replaced because the source of truth for data exists outside compute. That is what makes auto-stop a normal architectural state rather than a dangerous budget trick.

Why it matters

Stopping compute is a lifecycle event, not a state-loss event. That distinction is foundational for any reliable serverless database model.

What happens during wake-up

When the first connection arrives after idle, the platform does not rotate the DSN or ask the client to discover a new endpoint. Gateway accepts the request, Control Plane brings the required compute back, and traffic is switched into the active path.

For the application, that still looks like a normal PostgreSQL connection with the only practical difference being that post-idle wake-up should be handled with a sensible connect_timeout and retry policy.

Integration practice

If the application already handles short-lived network or infrastructure delays correctly, SPG99 wake-up usually does not require a separate architectural rewrite.

What applications and teams gain

Separating the entrypoint, compute lifecycle, and durable storage creates several direct benefits:

  • applications keep the normal PostgreSQL connection model;
  • teams do not need to start and stop temporary databases by hand;
  • workers can stop without rotating the DSN;
  • post-idle recovery becomes controlled and predictable;
  • the platform stays automation-friendly through Console and API.

That is why SPG99 is not only about savings. It is also about removing manual operations from temporary database environments.

Further reading

Further reading

Serverless PostgreSQLWebinar

SPG99 webinar: PostgreSQL without paying for idle in dev/test, preview, and internal services

This will not be a generic cloud talk or an interface walkthrough. Live on air, SPG99 will create a database in Console, connect through psql, show stopped → booting → ready, let the database return to idle, and then explain the controlled handoff between L1 and L2 writer profiles.

Operations and scenariosMarch 18, 2026

Database lifecycle in SPG99: active, idle, wake-up

To make a serverless model operationally friendly, teams need to understand not only the savings but also the states themselves. In SPG99, it is usually enough to think in three modes: active, idle, and wake-up.

5 min readOpen