Skip to main content

Scaling

Vertical Scaling (Resize)

Change the compute plan (CPU and memory) with zero downtime:

curl -u admin:password -X PATCH \
https://api.foundrydb.com/managed-services/{id} \
-H "Content-Type: application/json" \
-d '{"plan_name": "tier-4"}'

The service goes through a rolling restart. For multi-node services, replicas are restarted first; the primary is restarted last with a brief failover.

Available Plans

PlanCPUMemoryUse case
tier-11 vCPU2 GBDevelopment
tier-22 vCPU4 GBSmall production
tier-44 vCPU8 GBMedium workloads
tier-88 vCPU16 GBLarge workloads
tier-1616 vCPU32 GBHigh-throughput

Storage Expansion

Increase storage size (can only grow, not shrink):

curl -u admin:password -X PATCH \
https://api.foundrydb.com/managed-services/{id} \
-H "Content-Type: application/json" \
-d '{"storage_size_gb": 200}'
Storage tierTypeUse case
standardHDDArchival, low I/O
maxiopsNVMe SSDProduction databases

Horizontal Scaling — Read Replicas

Add read replicas to distribute read traffic:

curl -u admin:password -X POST \
https://api.foundrydb.com/managed-services/{id}/nodes \
-H "Content-Type: application/json" \
-d '{"role": "replica"}'

Each replica gets its own hostname. Direct your read queries there.

Remove a replica when no longer needed:

curl -u admin:password -X DELETE \
https://api.foundrydb.com/managed-services/{id}/nodes/{node_id}

Monitor Before Scaling

Check current resource usage before deciding on a plan:

curl -u admin:password \
"https://api.foundrydb.com/managed-services/{id}/metrics?metric=cpu&period=24h"

curl -u admin:password \
"https://api.foundrydb.com/managed-services/{id}/metrics?metric=memory&period=24h"

curl -u admin:password \
"https://api.foundrydb.com/managed-services/{id}/metrics?metric=disk&period=24h"

Rule of thumb:

  • CPU consistently above 70% → scale up or add read replicas
  • Memory above 85% → scale up or tune buffer settings
  • Disk above 70% → expand storage

Stop and Start

Stop a service to save compute costs (storage is retained):

# Stop
curl -u admin:password -X POST \
https://api.foundrydb.com/managed-services/{id}/stop

# Start
curl -u admin:password -X POST \
https://api.foundrydb.com/managed-services/{id}/start

A stopped service retains all data and configuration. Only use stop/start for dev or staging environments — not production.