Using CPU instances
Specify a CPU instance using thecpu parameter. You can use either a string shorthand or the CpuInstanceType enum:
Available CPU instance types
CPU instances are organized by generation and optimization profile.5th generation compute-optimized
Latest generation, optimized for compute-intensive workloads:| CpuInstanceType | ID | vCPU | RAM | Best For |
|---|---|---|---|---|
CPU5C_1_2 | cpu5c-1-2 | 1 | 2GB | Lightweight APIs, simple tasks |
CPU5C_2_4 | cpu5c-2-4 | 2 | 4GB | Small APIs, data validation |
CPU5C_4_8 | cpu5c-4-8 | 4 | 8GB | General APIs, data processing |
CPU5C_8_16 | cpu5c-8-16 | 8 | 16GB | Heavy processing, parallel tasks |
3rd generation compute-optimized
Balanced compute focus:| CpuInstanceType | ID | vCPU | RAM | Best For |
|---|---|---|---|---|
CPU3C_1_2 | cpu3c-1-2 | 1 | 2GB | Basic endpoints, webhooks |
CPU3C_2_4 | cpu3c-2-4 | 2 | 4GB | Simple data processing |
CPU3C_4_8 | cpu3c-4-8 | 4 | 8GB | Moderate workloads |
CPU3C_8_16 | cpu3c-8-16 | 8 | 16GB | CPU-intensive tasks |
3rd generation general purpose
Balanced CPU and memory:| CpuInstanceType | ID | vCPU | RAM | Best For |
|---|---|---|---|---|
CPU3G_1_4 | cpu3g-1-4 | 1 | 4GB | Memory-light tasks |
CPU3G_2_8 | cpu3g-2-8 | 2 | 8GB | General workloads |
CPU3G_4_16 | cpu3g-4-16 | 4 | 16GB | Memory-intensive processing |
CPU3G_8_32 | cpu3g-8-32 | 8 | 32GB | High-memory workloads |
Common configurations
APIs and webhooks
Data processing
Memory-intensive tasks
Load-balanced CPU API
Container disk sizing
CPU endpoints automatically adjust container disk size based on instance limits:CPU3GandCPU3Cinstances: vCPU count × 10GB (e.g., 2 vCPU = 20GB)CPU5Cinstances: vCPU count × 15GB (e.g., 4 vCPU = 60GB)
PodTemplate that exceeds the instance limit, deployment will fail with a validation error.