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.
# 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 sharesmain’s primary. - Shared engines
- Stateless engines serve both
mainand preview branches, so run heavy load tests during off-peak hours. - Inspecting results
GET /lists slow statements and index advice, andprojects/ {id}/ insights?branch=launch-test GET /reports active live subscriptions.projects/ {id}/ live?branch=launch-test - 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.
| Quota | Allowance | When exceeded |
|---|---|---|
| Live queries | 1,000 open subscriptions per GiB of engine memory across project streams | When exceeded429 live_limit_reached on new subscriptions |
| Waiting jobs | 10,000 queued jobs per caller (per user identity or per service key) | When exceeded429 job_limit_reached and transaction rollback |
| Request body | 1 MiB per HTTP request | When exceeded413 request_too_large |
| Result payload | 16 MiB per response | When 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.
# 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, andnoneremoves the ceiling. --alert- Dollar threshold that notifies org managers once month-to-date charges cross the amount. Set
--alertbelow--cap, or passnoneto clear. - Platform quota
- Napalm also enforces an organization-wide monthly platform limit (
402 monthly_limit_reachedwhen exceeded), displayed alongside your cap innapalm orgs limits. - Daily usage
napalm orgs chargesbreaks 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.
# 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 2The 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.
| Flag | Configures | Rollout behavior |
|---|---|---|
--engines | Stateless engine count handling connections, EdgeQL compilation and live subscriptions. | Rollout behaviorNew engines join behind the endpoint with zero downtime. |
--engine-memory | Memory per engine (such as 2GiB). | Rollout behaviorEngines roll one at a time so the endpoint stays online. |
--replicas | Read-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-cpu | Memory and CPU tier (shared or performance) for each database machine. | Rollout behaviorReplicas resize first, followed by a brief write pause during primary switchover. |
--data-shards | Total 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 /.
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.
# 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
--foraccepts whole hours or days (6h,5d), defaulting to1dup to 7 days from initial placement, and expires automatically.- Updates
- Re-running
napalm clusters holdadjusts 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#
Confirm scaling completed
napalm operations ls <cluster>lists theclusterScaleoperation ascompleted.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.Confirm spend headroom
napalm orgs limitsshows your monthly cap above the scaled cluster’s monthly rate and your alert threshold set below the cap.Check live subscription headroom
GET /projects/{id}/livereportsmain’s active subscription count alongside the total quota so you can compare baseline and peak launch traffic.