Skip to the page

Guides · Shipping & operations

Launch preparation

Load-test a data-cloned branch, review quota limits, set spend caps, scale cluster capacity and schedule maintenance holds before launch.

In the schema
—

What you’ll build#

This guide prepares a project for launch-day traffic. You load-test your busiest queries on a full-data preview branch, plan around fixed per-project quotas, raise your monthly spend cap, scale engines and read replicas ahead of time and place a maintenance hold on the cluster for launch week.

Scale & recovery explains each cluster component, while this page walks through the pre-launch sequence in order.

Hardened production endpoint

Production serves deployed queries alone while load tests target an isolated branch.

Launch-week maintenance hold

Maintenance holds defer routine cluster updates while continuous backups stay active.

Spend caps and insights

Spend caps guard monthly cluster costs while query insights track live latency.

Before you start#

Start from a production project hardened according to the launch checklist in Environments & going live.

Cluster and branch commands require an org token or CLI login with manage scope, and modifying spend limits requires an organization manager role. Run napalm clusters ls to find the <cluster> name used in the commands below.

Load-test on a preview branch#

Running a load test against a data-cloned preview branch exercises your heaviest screens over realistic row counts and surfaces slow statements or missing indexes before launch day.

Terminal
# Clone main's schema and rows onto a preview branch and wait for the copynapalm branches create notes launch-test --preview --datanapalm operations show <operation-id> --wait # Enable the branch API for ad-hoc statements from test sessions and keysnapalm endpoint notes --branch launch-test --enable --passthrough all # Check whether the cluster runs a dedicated preview shardnapalm shards <cluster>

Because non-main branches do not serve named deployed queries, generate your load-test client without --deployed so requests send statement text alongside variables (the same setup used in Develop against a personal branch). Preview branches maintain isolated sessions and service keys, so register synthetic test accounts directly on the branch.

Shard isolation
Clusters provisioned with a dedicated preview shard isolate preview writes from main’s primary. Without a preview shard, the branch shares main’s primary.
Shared engines
Stateless engines serve both main and preview branches, so run heavy load tests during off-peak hours.
Inspecting results
GET /projects/{id}/insights?branch=launch-test lists slow statements and index advice, and GET /projects/{id}/live?branch=launch-test reports active live subscriptions.
Throughput ceiling
Preview branches test query plans rather than peak cluster throughput, since a preview shard runs on a single database machine without read replicas and compiles ad-hoc statement text.

Delete the branch when finished with napalm branches remove notes launch-test.

Plan for project quotas#

Four protocol quotas apply per project or per caller regardless of cluster machine size.

QuotaAllowanceWhen exceeded
Live queries1,000 open subscriptions per GiB of engine memory across project streamsWhen exceeded429 live_limit_reached on new subscriptions
Waiting jobs10,000 queued jobs per caller (per user identity or per service key)When exceeded429 job_limit_reached and transaction rollback
Request body1 MiB per HTTP requestWhen exceeded413 request_too_large
Result payload16 MiB per responseWhen exceeded413 result_too_large

Because open live subscriptions scale with concurrent active users, pause subscriptions on backgrounded tabs and off-screen views. See Realtime & collaboration.

Similarly, a backend server that enqueues jobs for every user under one shared service key shares a single per-caller job quota. Forward each user’s session token instead so quotas count per user identity (see A backend service).

Raise the monthly spend cap#

Napalm rejects any cluster creation, scale, shard split or core copy whose projected monthly machine cost exceeds your organization’s spend cap. Raise the cap above the target topology’s monthly rate before scaling.

Terminal
# Inspect the org limit alongside your current monthly cap and alertnapalm orgs limits # Raise the monthly compute cap and set an early warning alert below the capnapalm orgs limits --cap 800 --alert 600
--cap
Monthly ceiling in whole US dollars on cluster machine charges. Scaling past the cap returns 402 monthly_cap_reached. Lowering the cap never stops running clusters, and none removes the ceiling.
--alert
Dollar threshold that notifies org managers once month-to-date charges cross the amount. Set --alert below --cap, or pass none to clear.
Platform quota
Napalm also enforces an organization-wide monthly platform limit (402 monthly_limit_reached when exceeded), displayed alongside your cap in napalm orgs limits.
Daily usage
napalm orgs charges breaks down month-to-date charges by meter so you can track daily spend across launch week.

Managers can adjust both settings in the console under Spend limits, or programmatically via POST /org/spend-limits (see Organization & billing).

Scale the cluster ahead of time#

Run napalm clusters scale during a quiet window several days ahead of launch, because scaling executes as a tracked cluster operation and resizing database members briefly pauses writes during primary switchover.

Terminal
# Inspect current engines, shard members and active maintenance holdsnapalm clusters show <cluster> # Scale to four stateless engines and two read replicas per data shardnapalm clusters scale <cluster> --engines 4 --replicas 2

The CLI previews every planned step in order, prompts for confirmation and streams progress to completion. Omitted flags retain their current settings, and --no-wait returns immediately so you can follow progress later with napalm operations show.

FlagConfiguresRollout behavior
--enginesStateless engine count handling connections, EdgeQL compilation and live subscriptions.Rollout behaviorNew engines join behind the endpoint with zero downtime.
--engine-memoryMemory per engine (such as 2GiB).Rollout behaviorEngines roll one at a time so the endpoint stays online.
--replicasRead-replica count per data shard for read scaling and automatic failover.Rollout behaviorNew replicas stream a snapshot from the primary before taking reads.
--member-memory and --member-cpuMemory and CPU tier (shared or performance) for each database machine.Rollout behaviorReplicas resize first, followed by a brief write pause during primary switchover.
--data-shardsTotal data-shard count, provisioning new shards matching main’s member layout.Rollout behaviorNew shards start empty, and data shards do not scale down yet.

Scaling updates stateless engines first, provisions any new data shards second and resizes database members last. Newly added shards remain empty until branches or roots move onto those shards (see Root-partitioned shards).

Clusters with read replicas route read queries across replicas automatically while Napalm-Bookmark headers preserve read-your-writes consistency (see Replica read routing).

Starting a scale while another cluster operation is active returns 409 cluster_busy. You can preview topologies and monthly pricing in the console’s Topology tab or submit full layouts via POST /clusters/{id}/scales.

Hold maintenance for launch week#

A maintenance hold defers routine platform maintenance on your cluster for up to 7 days. Place the hold once scaling finishes. Placing a hold while a cluster operation is queued or running returns 409 cluster_busy.

Terminal
# Defer routine cluster maintenance for five days during launch weeknapalm clusters hold <cluster> --reason "Launch week" --for 5d # Lift the maintenance hold early once traffic stabilizesnapalm clusters hold <cluster> --remove
Deferred
Scheduled nightly base backups, internal certificate renewals and routine platform maintenance.
Unchanged
Explicit operator commands (scaling, manual backups), automatic primary failover and continuous point-in-time archiving all stay active.
Duration
--for accepts whole hours or days (6h, 5d), defaulting to 1d up to 7 days from initial placement, and expires automatically.
Updates
Re-running napalm clusters hold adjusts the end time or reason in place without waiting on running operations, bounded by 7 days from initial placement.
Manual backups
Because nightly base backups pause during a hold, point-in-time restores replay more archive segments. Run napalm clusters backup <cluster> manually during quiet hours to refresh the base snapshot.

You can also manage holds on the cluster’s Overview tab in the console or through the Clusters API. Pair the hold with the daily operating checks in Production monitoring.

Check the cluster before launch#

  1. Confirm scaling completed

    napalm operations ls <cluster> lists the clusterScale operation as completed.

  2. Verify topology and maintenance hold

    napalm clusters show <cluster> shows four ready engines, two ready replicas per primary and an active “Launch week” hold with its expiration timestamp.

  3. Confirm spend headroom

    napalm orgs limits shows your monthly cap above the scaled cluster’s monthly rate and your alert threshold set below the cap.

  4. Check live subscription headroom

    GET /projects/{id}/live reports main’s active subscription count alongside the total quota so you can compare baseline and peak launch traffic.

Type a word or two to search every docs page.