Heroku pricing dramatically increases when using microservices architecture - heroku

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.

Related

Heroku pipeline dynos and add-ons

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.

Difference between app and Dyno on Heroku?

I don't understand what the difference between an app and Dyno is.
I want to use the hobby plan so that I can use an own SSL domain and that the servers stops sleeping.
I have a backend (nodeJS) and a frontend (reactJS).
Heroku says $7/Dyno. Does that mean I have to pay $7 for one app? Or do I pay $7 and can use several apps with it, so that they don't sleep?
An App is a set of one or more different dynos. This latter can be either of the same or different type (e.g. web, workers, ...) and having a different tier (e.g. standard, hobby, performance ...). You can see here the details for your better understanding.
It is possible to execute more instances of the same dyno type (e.g. for high-availability, processing concurrency ...). You can see here and here for details.
You basically pay for the number of dynos you run.

Multiple apps, paid Dynos

Looking for best practice/implementation thoughts:
I often create small to medium web apps for client projects, usually webservices for mobile apps, sometimes websites.
Since the free Heroku model scales down/shuts down dynos if no activity is detected, the start up time of websites and web service calls are sometimes delayed.
I would like to pay monthly for 1-2 dynos so that the apps are available immediately, but I would like all my apps to use the same dynos. Does anyone one if this is possible and where should I start.
I'm looking for solutions other than pinging the apps to try to keep the dynos alive, i'm not even sure if this really works in the long term.
Thanks.

What exactly is Heroku?

I just started learning Ruby on rails and I was wondering what Heroku really is? I know that its a cloud that helps us to avoid using servers? When do we actually use it?
Heroku is a cloud platform as a service. That means you do not have to worry about infrastructure; you just focus on your application.
In addition to what Jonny said, there are a few features of Heroku:
Instant Deployment with Git push - build of your application is performed by Heroku using your build scripts
Plenty of Add-on resources (applications, databases etc.)
Processes scaling - independent scaling for each component of your app without affecting functionality and performance
Isolation - each process (aka dyno) is completely isolated from each other
Full Logging and Visibility - easy access to all logging output from every component of your app and each process (dyno)
Heroku provides very well written tutorial which allows you to start in minutes. Also they provide first 750 computation hours free of charge which means you can have one processes (aka Dyno) at no cost. Also performance is very good e.g. simple web application written in node.js can handle around 60 - 70 requests per second.
Heroku competitors are:
OpenShift by Red Hat
Windows Azure
Amazon Web Services
Google App Engine
VMware
HP Cloud Services
Force.com
It's a cloud-based, scalable server solution that allows you to easily manage the deployment of your Rails (or other) applications provided you subscribe to a number of conventions (e.g. Postgres as the database, no writing to the filesystem).
Thus you can easily scale as your application grows by bettering your database and increasing the number of dynos (Rails instances) and workers.
It doesn't help you avoid using servers, you will need some understanding of server management to effectively debug problems with your platform/app combination. However, while it is comparatively expensive (i.e. per instance when compared to renting a slice on Slicehost or something), there is a free account and it's a rough trade off between whether it's more cost effective to pay someone to build your own solution or take the extra expense.
Heroku Basically provides with webspace to upload your app
If you are uploading a Rails app then you can follow this tutorial
https://github.com/mrkushjain/herokuapp
As I see it, it is a scalable administrated web hosting service, ready to grow in any sense so you don't have to worry about it.
It's not useful for a normal PHP web application, because there are plenty of web hosting services with ftp over there for a simple web without scalability needs, but if you need something bigger Heroku or something similar is what you need.
It is exposed as a service via a command line tool so you can write scripts to automate your deployments. Anyway it is pretty similar to other web hosting services with Git enabled, but Heroku makes it simpler.
That's its thing, to make the administration stuff simpler to you, so it saves you time. But I'm not sure, as I'm just starting with it!
A nice introduction of how it works in the official documentation is:
https://devcenter.heroku.com/articles/how-heroku-works
Per DZone: https://dzone.com/articles/heroku-or-amazon-web-services-which-is-best-for-your-startup
Heroku is a Platform as a Service (PaaS) product based on AWS, and is vastly different from Elastic Compute Cloud. It’s very important to differentiate ‘Infrastructure as a Service’ and ‘Platform as a Service’ solutions as we consider deploying and supporting our application using these two solutions.
Heroku is way simpler to use than AWS Elastic Compute Cloud. Perhaps it’s even too simple. But there’s a good reason for this simplicity. The Heroku platform equips us with a ready runtime environment and application servers. Plus, we benefit from seamless integration with various development instruments, a pre-installed operating system, and redundant servers.
Therefore, with Heroku, we don’t need to think about infrastructure management, unlike with AWS EC2. We only need to choose a subscription plan and change our plan when necessary.
That article does a good job explaining the differences between Heroku and AWS but it looks like you can choose other iaas (infrastructure) providers other than AWS. So ultimately Heroku seems to just simplify the process of using a cloud provider but at a cost.

AWS vs Heroku vs something else for scalable platform?

Considering you're a startup with no funds for own server farm. Which existing solution can give you a peace of mind that any sudden increase in traffic won't bring everything down.
I know it's not just up to hardware, so we plan to have at least a load balancer, memcache and few db servers.
Is it possible to have a setup on AWS that would automatically add instances and bandwidth if the traffic increases?
What other advice you could give to deployment noobs? Thanks.
ps: I apologize in advance if a question is too broad or reflects inexperience on mentioned topics, but that's why I ask.
Heroku. Because you're a start-up, keep things lean and it doesn't get leaner than almost free (with 1 dyno + small shared DB). Spend time building your product, not on the infrastructure. You don't want to be installing patches when you should be talking to customers. Heroku is also flexible and allows you to scale up 'dynos' as your traffic increases so no worries about growing there. Heroku won't scale automatically for you, though, so do your own server monitoring. Heroku add-ons are also nice.
Recently we have done a very good comparison between AWS and Heroku and we decided to move to Heroku, here is the detail of this http://www.confiz.com/blog/tech-session/selecting-the-right-cloud-platform/
If you're on Python, you can try Google App Engine.
Migrating the Python app from one platform to another isn't too difficult once you get the past the learning curve as to what features is (not) available. GAE offers datastore, memcache, blobstore plus a few other goodies like dJango and Jinja (templating). Worth checking the Python start page and it didn't take me long to integrate it into Facebook and Dropbox too.
Stay away from Heroku. You can get EC2 for free for a year from Amazon. Scaling up heroku is extremely costly. Their pricing tends to be unclear and their customer service in general sucks.
BitNami for Amazon EC2 includes ready-to-run versions of Apache, MySQL, PostgreSQL, SQLite, Python, Django, Git, their required dependencies, and much more. It can be deployed via all-in-one free native installers, virtual machines and Cloud Images. maybe worth checking out.
My personal experience is that you should generally start with Heroku. Get your app out in the wild and find that product/market-fit or some type of traction. You will know you are going somewhere because customers will cause scaling issues. In this case, Heroku will allow you to scale with very little overhead. And for some time, this scaling will not hit you in the wallet.
Jump to AWS when you are ready. When will you be ready? When you have enough pain, in the wallet, where you need more control over the stack. You can hire a AWS devops type or learn about it, yourself.
Both Heroku and AWS have auto-scaling solutions, but whereas Heroku has a fairly flat learning curve -- that is what you are paying for -- AWS can get broad and steep fairly quickly. A Udemy AWS course or any of the hundred other online resources will get your started down building a robust AWS architecture.
Lastly, while performance should not be your primary concern, make sure that you are using best practices in your code. Your first user should not bring your system to a crawl. And AWS will not help if she does.
Hope this helps in some way.
This has been my experience. My saas start kits are built to deploy to Heroku out of the box for this reason. However, the start kits are also containerized. I know that you spoke of AWS explicitly, but with containers you can be infrastructure agnostic. This is worth considering!
Ted [at] https://stacksimple.io
Check out this blog series I'm starting because I found Heroku to not be scalable at all from a financial perspective compared to EC2 and Digital Ocean. Going to be showing how to put a Ruby application on Digital Ocean using Docker, which allows you the same flexibility and ability to scale up and down very quickly https://medium.com/#karimbutt/weaning-off-heroku-part-1-b7f123ae855f
It greatly depeneds whether you're looking for a PaaS, IaaS or SaaS, and what is the language you using.
AWS is a IAAS/PAAS with multiple components and layers.
Heroku is a PAAS supporting multiple languages, most notably Java, Ruby and Node.js
Other platforms come into play depending on your needs, you might want to take a look at this comparison as well: https://dictativ.com/compare/paas

Resources