Scale

Outgrow one machine without changing your code.

Placement follows the required links in your schema, so tables need no tenant_id columns. Engines, replicas and shards scale separately behind one URL.

Read the scale docs

Link-inferred sharding

Shards follow the links in your schema.

Napalm follows the required links in your schema and places each organization’s rows together on one shard. Primary keys stay standard UUIDs, and tables need no tenant_id columns or composite foreign keys.

Placement roots and sharding
dbschema/default.gel
type Org {  required slug: str { constraint exclusive };  multi members: ext::auth::Identity;} type Project {  required org: Org { readonly := true };  # lives on the Org's shard} type Task {  required project: Project;               # follows Project to that shard  required title: str;   access policy org_members    allow all using ((global caller in .project.org.members) ?? false);}

Independent scaling

Engines, replicas and shards scale separately.

Add stateless engines for connections and live streams, hot replicas in separate zones for read throughput and horizontal shards for write volume. All three scale online behind the same project URL.

Terminal
napalm clusters show notesnapalm clusters scale notes --engines 4 --replicas 2
Clusters API

Online tenant moves

Move one customer to a new shard online.

Isolate a large tenant or pin a workspace to a regional shard without downtime. Reads and writes for that tenant route straight to the owning shard while traffic stays live.

Terminal
napalm placement move notes \  --root 0192c3f4-6b1a-7d8e-9f00-1a2b3c4d5e6f \  --shard shard-eu-1
Distribution API

Causal replicas

Replicas always show your latest write.

Every write returns an opaque Napalm-Bookmark token, and the client SDKs forward that bookmark on subsequent reads. Replicas wait to reach the bookmark or fall back to the primary, so reads never move backward.

Causal bookmarks
app/notes.ts
// Hand a webhook or job commit position to the client:napalm.reach(delivery.position) // Any engine or replica serves at least that commit:const { data } = await db.POST('/query/listNotes', {  body: { variables: {} },})

Automatic failover

A replica takes over when a primary fails.

On standard and scale clusters, every commit waits until an in-region replica saves the write to disk. Two primaries never accept writes at once. If no replica answers for 5 seconds, the primary commits alone.

30 sto promote a caught-up replica

Failover and high availability

Point-in-time recovery

Restore to any second in 7 days.

Napalm archives changes to encrypted object storage within 60 seconds and keeps 7, 14, 30 or 90 days of history. Rewind a whole branch or one customer root in place at the same project URL.

Terminal
napalm branches restore notes \  --to 2026-11-10T03:59:58Z
Point-in-time restore
Chaos monkey badge: machine skull

Chaos lab

Every release survives the chaos lab.

Each release campaign crashes primaries, splits networks, fills disks and floods queries while clients read and write. Incomplete evidence marks a run inconclusive rather than passed.

Explore the chaos lab

8scenario groups in the chaos lab

  • Writes
  • Replicas
  • Change log and webhooks
  • Presence
  • Shards
  • Access
  • Load
  • Test runner