Heroku provides easy-to-use tools that enable developers to instantly scale dynos to meet demand. Post deployment, your apps may require adjustments to their dyno formation in response to a variety of conditions, such as increased traffic, uneven usage patterns, new functionality, or business scale. You can scale using the Heroku Dashboard or Heroku CLI.
Heroku Dashboard
The Heroku Dashboard is the web user interface for Heroku’s core features and functionality. It enables developers to easily manage their apps, Heroku Add-ons, deployment processes, metrics, and more. The Dashboard provides a simple slider interface for horizontally scaling dynos. You can provision more dynos to horizontally scale, or change dyno types to vertically scale your app, and see the results immediately reflected in your dyno formation.
Heroku CLI
Alternatively, developers can manage their dyno formation using the Heroku command line interface or the Heroku Platform API. Using the Heroku CLI, you can create and manage apps from the shell of various operating systems. Through a simple command, you can increase the number of web and worker dynos, or change the dyno type of any number of dynos at once. For example, here's how to scale the number of web dynos to 5:
$ heroku ps:scale web=5
Scaling dynos... done, now running web at 5:Standard-1X
Scaling horizontally: adding more dynos
Adding more dynos of a given dyno process type scales your application horizontally. For example, adding more web dynos lets Heroku route incoming HTTP requests across more running instances of your web servers, which will typically improve performance with a higher traffic volume. Adding more worker dynos allows your app to process more jobs in parallel, and therefore handle a higher volume of jobs. There are some circumstances where scaling horizontally won’t help, such as bottlenecks on the backing services and long requests or jobs. Horizontal scalability is available for Standard, Performance, and Private Dynos.
Scaling vertically: upgrading to larger dynos
Upgrading dynos to larger dyno types will provide your app with more memory and CPU resources. All dynos are isolated. However, apps running on Eco, Basic, and Standard dynos may share an underlying compute instance — they are multi-tenant — and therefore may experience some degree of performance variability. Performance dynos, and those that run in Heroku Private Spaces, do not share an underlying compute instance with other dynos and experience low variability in performance.
Autoscaling
Heroku enables you to automatically increase the number of web dynos needed to meet your specified 95th percentile response time threshold. Based on your app’s existing throughput, the autoscaling feature removes the need to anticipate traffic spikes. Autoscaling is included for free on Performance and Private dynos.