how many dynos i need for my application with Heroku? - heroku

we want to migrate my application to Heroku acctually we have 3 applications related and we want to move to Heroku. But we don't know how many dynos we need for deploy those applications. wether 3 applications in the same dynos and make a copy in other dynos or for each application one dynos? thanks for your help.

If they are 3 separate applications you will need a minimum of 3 dynos since each Heroku application will need to run a dyno.
As to how many dynos each of your application needs to run that all depends on how busy each site is and how long requests take to process.

I can only speak for Java and an embedded server/container. In this case you actually could deploy more than one app into your container (which will be startet from your dyno), only using one dyno.

Related

Is it possible to run two applications on one hobby dyno?

I have $161 platform credits on heroku from GitHub student pack to spend for one hobby dyno:
The Heroku offer is for one (1) free Hobby Dyno for two years, which will be applied on your invoice as a discount of $7 for a Hobby Dyno.
I already deployed one spring app and changed its dyno to hobby. My question is if there is a way I could deploy second Java app and set it to use the same dyno which is assigned for the first app?
Right now I have one app which has hobby dyno and one app which uses free dyno. I read on the internet and people say that there is only one app allowed for one dyno and Heroku will charge me for the second one but there is also this thread How many apps are allowed on a 'Hobby' Heroku plan? which says that I can have more than one app per hobby dyno.
So what's the truth?
No, you can't run multiple apps on a single dyno.
Heroku's model is to run one app per dyno (and often many dynos for a single app). The question you reference discussed the Hobby plan¹, asking how many dynos can be run per account. Keep in mind that Heroku's model is different from the shared or VPS hosting you might be used to. Dynos don't provide an OS that you can put apps onto; they run apps directly.
¹Technically I don't think this makes a ton of sense since accounts don't have these kinds of tiers. One account can run free dynos, hobby dynos, and professional dynos. But there is a difference between unverified accounts, which can run up to five free dynos, and verified accounts which can run many more.
According to this article on the heroku page it is possible but not recommended.
Heroku post

Heroku pricing dramatically increases when using microservices architecture

I'm just starting with Heroku, and I'm considering using it to host my app.
The problem is, I'm planning to build my app with a micro services architecture.
As I understand Heroku's pricing, they charge per dyno. When using micro services, there are a bunch of "apps" or "services" working together to provide the functionality of one app.
It seems inevitable to do this without using multiple dynos, and by adding dynos, the price goes up very quickly.
I have three questions:
Is my interpretation of Heroku's pricing correct?
Is there a better way to do a micro services architecture using Heroku?
Or, is there a way to deploy multiple docker containers on a single dyno?
Your Heroku costs will definitely go up as you use more dynos and more apps, but if you are just starting out, the money you spend will be in no way more than the time you would spend setting up something like AWS to perform the same functionality.
You can always save money later, once your app is running and users are loving it. If you goal is to prototype and get it out fast, Heroku is still the best choice.
Did you know about Heroku price calculator?
Saw you run 10*1x dynos, plus some other services, like text messages and such. That will cost you $250-350 this month. That's a lot, sure. But you can get your app running tomorrow, and presumably that is worth a lot more than 250.

Deploy Heroku Process Types to individual apps

Is there a way to break a composite Heroku app with multiple process types and deploy as separate apps. Can I clone the app, and comment out the ProcFile for one or either process types and deploy it separately on two different containers?
You could most definitely do that, although -- that's probably only a good idea if you plan on maintaining each of those codebases separately.
Instead, why not just scale up a specific number of each process type? For instance, let's say you have defined two process types: web and worker.
You could say:
$ heroku ps:scale web=2 worker=2
This would run 2 web dynos, and 2 worker dynos. Each of them will run in separate containers and have their own resources.

No free dynos on heroku account?

As far as I know heroku gives you one dyno for free for your app. I uploaded an app but I have no dynos to assign to it.
What should I do?
You need to provide a Procfile so Heroku will know what kind of Dynos you need and how to start your app. Then you'll be able to scale your Dynos.

Redis: share data in heroku with more than one dynos

I'm new using heroku and I will pick 4 instances of 2X dynos and I worry about AFAIK there is no share data between dynos.
So my question is, is there a way to save data in all redis(https://addons.heroku.com/rediscloud#250) instances(located on each dynos)
Your confusion stems from assuming that Redis runs locally on each dyno. When you use an add-on such as Redis Cloud, Redis is external to all dynos and is run on sperate servers that are operated by the service provider (Redis Labs in this case).
As long as all your dynos belong to the same app (which appears to be the case), all of them will share the same add-ons, Redis Cloud included. While your app will run distributed across these dynos, all of its connections will be opened to the same Redis database (defined by the `REDISCLOUD_URL' env var) and will therefore be able to share the data in it.

Resources