Can I have one heroku application with multiple web dynos?

668 Views Asked by At

Is it possible in Heroku to have one application that contains 3 web dynos, each one is exposed in the internet, and all of them sharing the same add-on Postgres (database), one bucketeer, one add-one heroku connect.

Or in heroku : 1 dyno = 1 application ?

I want to draw a webservice architecture and I have a need for multiple web dynos

2

There are 2 best solutions below

0
On

You can scale your dyno formation in Heroku anytime. Heroku apps can be scaled to run on multiple dynos simultaneously (except on Free or Hobby dynos). You can scale your app’s dyno formation up and down manually from the Heroku Dashboard or CLI.

You can also configure Heroku Autoscaling for Performance-tier dynos, and for dynos running in Private Spaces. Threshold autoscaling adds or removes web dynos from your app automatically based on current request latency.

You can read more about this on Heroku documentation

0
On

To clarify your question in Heroku’s jargon, a dyno is a container for a single main process falling into two main categories, web or worker. A web process could be a Rails web server, Django app, etc. A worker process could be running Sidekiq, Resque, RQ or celery.

Each type can be horizontally scaled using Heroku Autoscaling for multiple instances of each type.