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.
MethodDescription
Manual ScalingManually set the number of instances for a service.
AutoscalingPortway 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.
Compose file
services:
  - name: my-service
    deploy: 
      replicas: 3
Deploy the updated compose file to apply the changes.

Autoscaling

This feature is currently in preview. Please email us at support@portway.dev to enable it.
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:
TriggerDescription
CPU usageScale your service automatically based on CPU utilization.
Memory usageScale your service automatically based on memory consumption.
CRON scheduleScale your service according to a specified time schedule.