Scaling is not supported for services with persistent volumes.
You can run multiple instances of a web service, private
service, or background worker to handle additional load. For services that receive incoming traffic,
Render load balances that traffic evenly across all running instances:
Portway supports two scaling methods: manual scaling and autoscaling.
| Method | Description |
|---|
| Manual Scaling | Manually set the number of instances for a service. |
| Autoscaling | Portway automatically scale the number of instances for a service based on metrics. |
Manual scaling
You can manually scale the number of instances for a service by updating the replicas field in the service definition.
services:
- name: my-service
deploy:
replicas: 3
Deploy the updated compose file to apply the changes.
Autoscaling
Portway handles autoscaling for you based on the triggers you have configured. Check out the navigation for the different triggers you can use.
Popular triggers include:
| Trigger | Description |
|---|
| CPU usage | Scale your service automatically based on CPU utilization. |
| Memory usage | Scale your service automatically based on memory consumption. |
| CRON schedule | Scale your service according to a specified time schedule. |