I plan to have two physical applications on heroku that cooperate as one logical application. One app is written in Grails, the other is node.js.
I have a question on the technical feasibility of this on heroku:
Can these applications share the same postgres database? (or will
heroku prevent this?)
Thanks,
Bob
I will answer my own question based on info found on the Heroku development site.
To share a database (after it's been "Added On" to the first application.
heroku addons:attach app1::DATABASE --app app2
Where app1 is the Heroku application that created the database and app2 is the Heroku application with which to watch it.
Related
I'm using Heroku's Pipeline feature to manage the stages of my application. I received an email about Heroku getting rid of their free plans, so I went ahead and upgraded my plan just now. Currently, I have one app with two database add-ons in Heroku. This is the first time that I've used their Pipeline feature—and I'm by no means a Heroku expert. I have two questions:
Do I need to purchase dynos for every new app that I use Heroku for? The plan that I ended up purchasing was the Production plan (since the app is for a client), and I also purchased two psql database add-ons which are attached to the app.
Since I'm using their pipeline for my one app, I have staging and prod versions of the app assigned to their appropriate branches in the repo. The prod app is where I upgraded to the paid plan. Do I need to purchase any dynos or add-ons for the staging app within the Pipeline? I was able to attach the databases with no issue, but I purchased a dyno for the staging app just to be safe.
Feel free to share any of your favorite Heroku alternatives as well—I'm only using Heroku because that's what I learned how to use in school.
Fellow Heroku user here!
Do I need to purchase dynos for every new app that I use Heroku for?
Yes. Heroku have basically said they’re getting rid of free plans for all applications due to wanting to make more money security reasons. So staging apps will also fall under this.
Basically, it sounds like there’s going to be no free tier dynos or first party add-ons from Heroku going forward. They do suggest for non-production apps (like testing and staging apps) to turn your dynos on when in use, and off when not in use, and you’ll only be billed for the time the dyno is on.
I‘m not sure which plan is the Production plan (I couldn’t see it on the pricing page) but maybe try out Hobby first. I have multiple apps running with paid Hobby-tier dynos and they have ran just fine without really spiking the CPU or memory available in those dynos. But I’m running PHP apps, so your milage may vary if you’re using another tech stack, or do get more load than my apps.
Can someone explain me why we need the Atlas?
If I have Heroku which gives an easier access to cloud (PaaS), then why we need MongoDB Atlas?
Some sources say that we can connect Heroku with Atlas, but why we need that? And can please someone explain me the difference, because it seems I do not understand it completely.
Will be very thankful to everyone. Articles will also be good.
Heroku is a PAAS where you can deploy your applications. Multiple languages are supported and the development experience is great (deploy from Git or using Docker, plenty of examples and documentation).
Typically your application needs a data store to persist the data, Heroku offers few options (ie Postgres) but no more MongoDB. An alternative is to use Atlas where you can define your MongoDB cluster and databases.
Both Heroku and Atlas have a free-tier so you can run both the application and the database without cost. As your database grows you might need to buy a different subscription, this applies to Heroku too if you require more resources or for example no downtime (Heroku Free tier sends the Dyno to sleep after 30 min inactivity).
A good article to use Heroku with Atlas is Detaching from mLab
Let's assume I have staging and production versions of my application. I want staging version should be accessible only to specific people like developers, testers. Do we have that kind of configuration on Heroku like deployed address can be only accessed by users have some key.
There is nothing like this in the Heroku product at this time. You would need to handle this as part of your application in some way.
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.
I have Meteor application which is run on Heroku platform using 1 dyno. When I increase number of dynos it stops working, reporting some problems with XHR (ERROR 404) on client side.
Does anybody successfully run Meteor app on two or more Heroku dynos? If so, what should I do in order to get it working?
No, unfortunately Meteor does not work on Heroku with more than one dyno. Meteor needs session affinity, which Heroku does not currently offer.
Meteor needs session affinity: Running meteor in a cluster and real-time changes
Heroku does not support session affinity: https://devcenter.heroku.com/articles/intro-for-java-developers
If you want a SaaS hosting provider that supports Meteor and can scale to multiple dynos using session affinity, there is now a CloudBees buildpack which looks promising:
https://github.com/CloudBees-community/meteor-clickstart
Heroku now supports session affinity, which allows it to work with Meteor. It's in labs at the time of writing this, so you'll have to enable it.
https://devcenter.heroku.com/articles/session-affinity
Well, Session affinity (or something similar) appears to be in the roadmap, at the very least. So, the developers anticipating addressing the issue by the time they release version 1.0.
https://trello.com/board/meteor-roadmap/508721606e02bb9d570016ae