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
| Plan | CPU | Memory | Use case |
|---|---|---|---|
tier-1 | 1 vCPU | 2 GB | Development |
tier-2 | 2 vCPU | 4 GB | Small production |
tier-4 | 4 vCPU | 8 GB | Medium workloads |
tier-8 | 8 vCPU | 16 GB | Large workloads |
tier-16 | 16 vCPU | 32 GB | High-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 tier | Type | Use case |
|---|---|---|
standard | HDD | Archival, low I/O |
maxiops | NVMe SSD | Production 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.