React App on Heroku and Dyno Useage - heroku

I was wondering if anyone knew since ReactJS components sometimes use a pollInterval to constantly refresh the DOM with new data, does this have an impact on dyno useage in Heroku? Would the app be running constantly?
Thank you.

Related

Is there any Heroku request queue for storing requests while dyno is down?

I am using Heroku for one of my hobby projects. I bumped into the following problem if webhook sends a request to Heroku and Java app restarts at this time, the request will be lost. Is there any native Heroku way or plugin that ensures that Heroku will get a request, at least once?
I didn't find anything so far, and the default solution is to take AWS Lambda or Google Cloud Function to ensure scalability and availability. I feel that it adds unnecessary complexity and possibly a maintenance headache.
To Summarize:
Is there any Heroku native mechanism or Heroku plugin that ensures that requests will be delivered?
Assuming your Java application restarts are related to dyno restarts or deploys:
you might want to look into the preboot feature on Heroku.
From their documentation:
Preboot changes the standard dyno start behavior for web dynos. Instead of stopping the existing set of web dynos before starting the new ones, preboot ensures that the new web dynos are started (and receive traffic) before the existing ones are terminated. This can contribute to zero downtime deployments.
#Denis Cornehl's answer helped a lot. My answer is an extension to it.
You don't have a free solution if you have free or hobby tires. You will have to follow Enterprise Integration Patterns.
My solution was to put the queue in front of the application and consume messages when the application is up. Even though there is no free queue, some cloud providers give you free quotes for big loads. I recommend considering them before deploying and maintaining your own queues.

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.

How do I set my app up for production?

So, I guess this is less "programming" related but still relevant. I'm curious. How do companies set their apps up for production? Say I have a MERN app with an additional backend that actually supports my API. Can I push the server into production (where the actual API lives), and then push out the MERN app as well?
Node/Express server that has all of my API's functionality. (Users, Posts, etc)
MERN app that has a very minimal server (think, Express generated, kind of), but has my complete frontend.
Or do I just push the entire thing into production? The entire API, the entire frontend, and a little extra server side code to run the frontend.
Thanks in advance!

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.

How to run meteor application on two or more Heroku dynos?

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

Resources