Scalability
You can scale an application’s resources by changing the instance size (vertical scaling) or increasing the number of instances that simultaneously run your application (horizontal scaling).
- Vertical scaling gives instances more power to complete resource-intensive tasks.
- Horizontal scaling improves resilience and load balancing for applications that process many requests. For example, if you run three versions of the same instance, the underlying technology routes requests to one of the three instances, effectively distributing the load between them. If one instance becomes unstable, requests will route to the other two until the third instance is healthy again.
Manual Scaling
To change the instance size of a process, go to MyKinsta > Applications > app name > Processes. Click the ellipsis > Update process.
![Edit an application process in MyKinsta.](https://kinsta.com/_next/image/?url=https%3A%2F%2Fkinsta.com%2Fwp-content%2Fuploads%2F2023%2F11%2Fapplication-update-processes.png&w=3840&q=75)
Update the Instance size to increase the resources available to a single instance (vertically scale), or update the Instance count to add instances and improve the load balance (horizontally scale). There is a maximum of 20 instances and all instances use the same size.
Note: If you choose the Hobby instance size for your web process, you will not be able to add a custom domain to your application. If you need a custom domain for your application, you can upgrade your web process to a larger instance size anytime.
![Change instance size, instance count, and horizontal autoscaling for a process.](https://kinsta.com/_next/image/?url=https%3A%2F%2Fkinsta.com%2Fwp-content%2Fuploads%2F2023%2F11%2Fapplication-process-update-web-1024x773.png&w=2048&q=75)
Once you have made your changes, click Update to finish updating the process and trigger a new deployment of the application. The updated process costs are added to your monthly invoice and are prorated for the first month.
Automatic Horizontal Scaling
Horizontal autoscaling can be enabled for a stateless web process or background worker within Processes (MyKinsta > Applications > app name > Processes). When you enable horizontal autoscaling, you’ll define a minimum and maximum number of instances you want the process to use. Note: The maximum number of instances cannot exceed 20.
When horizontal autoscaling is enabled, if the CPU usage on the current instance(s) reaches 80% of the available CPU resources, the process automatically increases by one, up to the maximum number you’ve set.
If the CPU usage decreases and the current number of instance(s) is no longer needed, the number of instances is reduced to what is needed. The instance count will not go lower than the minimum number you’ve set for horizontal autoscaling.
While there currently isn’t a way in MyKinsta to see how many instances are in use, behind the scenes, only the number of instances needed will be used. You will only be billed for the number of instances your application actually uses. For example, if the minimum instance is set to one and the maximum is set to five, but the application only uses one instance during the billing period, you will only be charged for that one instance. If the application uses more instances for part of the time during the billing period, you will only be billed for those additional instances for the time they are actually used.