Heroku vs Kubernetes: What are the differences?
Heroku: Build, deliver, monitor and scale web apps and APIs with a trail blazing developer experience. Heroku is a cloud application platform – a new way of building and deploying web apps. Heroku lets app developers spend 100% of their time on their application code, not managing servers, deployment, ongoing operations, or scaling; Kubernetes: Manage a cluster of Linux containers as a single system to accelerate Dev and simplify Ops. Kubernetes is an open source orchestration system for Docker containers. It handles scheduling onto nodes in a compute cluster and actively manages workloads to ensure that their state matches the users declared intentions.
Heroku can be classified as a tool in the "Platform as a Service" category, while Kubernetes is grouped under "Container Tools".
Some of the features offered by Heroku are:
- Agile deployment for Ruby, Node.js, Clojure, Java, Python, Go and Scala.
- Run and scale any type of app.
- Total visibility across your entire app.
On the other hand, Kubernetes provides the following key features:
- Lightweight, simple and accessible
- Built for a multi-cloud world, public, private or hybrid
- Highly modular, designed so that all of its components are easily swappable
"Easy deployment", "Free for side projects" and "Huge time-saver" are the key factors why developers consider Heroku; whereas "Leading docker container management solution", "Simple and powerful" and "Open source" are the primary reasons why Kubernetes is favored.
Kubernetes is an open source tool with 55.1K GitHub stars and 19.1K GitHub forks. Here's a link to Kubernetes's open source repository on GitHub.
StackShare, Heroku, and Product Hunt are some of the popular companies that use Heroku, whereas Kubernetes is used by Google, Slack, and Shopify. Heroku has a broader approval, being mentioned in 1504 company stacks & 965 developers stacks; compared to Kubernetes, which is listed in 1048 company stacks and 1099 developer stacks.
What is Heroku?
What is Kubernetes?
Need advice about which tool to choose?Ask the StackShare community!
Sign up to add, upvote and see more prosMake informed product decisions
Sign up to get full access to all the companiesMake informed product decisions
Sign up to get full access to all the tool integrationsMake informed product decisions
Since we deployed our very first lines of Python code more than 2 years ago we are happy users of Heroku. It lets us focus on building features rather than maintaining infrastructure, has super-easy scaling capabilities, and the support team is always happy to help (in the rare case you need them).
We played with the thought of moving our computational needs over to barebone Amazon EC2 instances or a container-management solution like Kubernetes a couple of times, but the added costs of maintaining this architecture and the ease-of-use of Heroku have kept us from moving forward so far.
Running independent services for different needs of our features gives us the flexibility to choose whatever data storage is best for the given task.
When creating the web infrastructure for our start-up, I wanted to host our app on a PaaS to get started quickly.
A very popular one for Rails is Heroku, which I love for free hobby side projects, but never used professionally. On the other hand, I was very familiar with the AWS ecosystem, and since I was going to use some of its services anyways, I thought: why not go all in on it?
It turns out that Amazon offers a PaaS called AWS Elastic Beanstalk, which is basically like an “AWS Heroku”. It even comes with a similar command-line utility, called "eb”. While edge-case Rails problems are not as well documented as with Heroku, it was very satisfying to manage all our cloud services under the same AWS account. There are auto-scaling options for web and worker instances, which is a nice touch. Overall, it was reliable, and I would recommend it to anyone planning on heavily using AWS.
Visual Studio Code worked really well for us as well, it worked well with all our polyglot services and the .Net core integration had great cross-platform developer experience (to be fair, F# was a bit trickier) - actually, each of our team members used a different OS (Ubuntu, macos, windows). Our production deployment ran for a time on Docker Swarm until we've decided to adopt Kubernetes with almost seamless migration process.
After our positive experience of running .Net core workloads in containers and developing Tweek's .Net services on non-windows machines, C# had gained back some of its popularity (originally lost to Node.js), and other teams have been using it for developing microservices, k8s sidecars (like https://github.com/Soluto/airbag), cli tools, serverless functions and other projects...
StackShare Feed is built entirely with React, Glamorous, and Apollo. One of our objectives with the public launch of the Feed was to enable a Server-side rendered (SSR) experience for our organic search traffic. When you visit the StackShare Feed, and you aren't logged in, you are delivered the Trending feed experience. We use an in-house Node.js rendering microservice to generate this HTML. This microservice needs to run and serve requests independent of our Rails web app. Up until recently, we had a mono-repo with our Rails and React code living happily together and all served from the same web process. In order to deploy our SSR app into a Heroku environment, we needed to split out our front-end application into a separate repo in GitHub. The driving factor in this decision was mostly due to limitations imposed by Heroku specifically with how processes can't communicate with each other. A new SSR app was created in Heroku and linked directly to the frontend repo so it stays in-sync with changes.
Related to this, we need a way to "deploy" our frontend changes to various server environments without building & releasing the entire Ruby application. We built a hybrid Amazon S3 Amazon CloudFront solution to host our Webpack bundles. A new CircleCI script builds the bundles and uploads them to S3. The final step in our rollout is to update some keys in Redis so our Rails app knows which bundles to serve. The result of these efforts were significant. Our frontend team now moves independently of our backend team, our build & release process takes only a few minutes, we are now using an edge CDN to serve JS assets, and we have pre-rendered React pages!
#StackDecisionsLaunch #SSR #Microservices #FrontEndRepoSplit
We initially started out with Heroku as our PaaS provider due to a desire to use it by our original developer for our Ruby on Rails application/website at the time. We were finding response times slow, it was painfully slow, sometimes taking 10 seconds to start loading the main page. Moving up to the next "compute" level was going to be very expensive.
We moved our site over to AWS Elastic Beanstalk , not only did response times on the site practically become instant, our cloud bill for the application was cut in half.
In database world we are currently using Amazon RDS for PostgreSQL also, we have both MariaDB and Microsoft SQL Server both hosted on Amazon RDS. The plan is to migrate to AWS Aurora Serverless for all 3 of those database systems.
Additional services we use for our public applications: AWS Lambda, Python, Redis, Memcached, AWS Elastic Load Balancing (ELB), Amazon Elasticsearch Service, Amazon ElastiCache
Heroku vs OpenShift. I've never decided which one is better. Heroku is easier to configure. Openshift provide a better machine for free. Heroku has many addons for free. I've chosen Heroku because of easy initial set-up. I had deployment based on git push. I also tried direct deployment of jar file. Currently Heroku runs my Docker image. Heroku has very good documentation like for beginners. So if you want to start with something, let's follow Heroku. On the other hand OpenShift seems like a PRO tool supported by @RedHat.
Heroku was a decent choice to start a business, but at some point our platform was too big, too complex & too heterogenic, so Heroku started to be a constraint, not a benefit. First, we've started containerizing our apps with Docker to eliminate "works in my machine" syndrome & uniformize the environment setup. The first orchestration was composed with Docker Compose , but at some point it made sense to move it to Kubernetes. Fortunately, we've made a very good technical decision when starting our work with containers - all the container configuration & provisions HAD (since the beginning) to be done in code (Infrastructure as Code) - we've used Terraform & Ansible for that (correspondingly). This general trend of containerisation was accompanied by another, parallel & equally big project: migrating environments from Heroku to AWS: using Amazon EC2 , Amazon EKS, Amazon S3 & Amazon RDS.
We recently moved our main applications from Heroku to Kubernetes . The 3 main driving factors behind the switch were scalability (database size limits), security (the inability to set up PostgreSQL instances in private networks), and costs (GCP is cheaper for raw computing resources).
We prefer using managed services, so we are using Google Kubernetes Engine with Google Cloud SQL for PostgreSQL for our PostgreSQL databases and Google Cloud Memorystore for Redis . For our CI/CD pipeline, we are using CircleCI and Google Cloud Build to deploy applications managed with Helm . The new infrastructure is managed with Terraform .
Read the blog post to go more in depth.
Recently I have been working on an open source stack to help people consolidate their personal health data in a single database so that AI and analytics apps can be run against it to find personalized treatments. We chose to go with a #containerized approach leveraging Docker #containers with a local development environment setup with Docker Compose and nginx for container routing. For the production environment we chose to pull code from GitHub and build/push images using Jenkins and using Kubernetes to deploy to Amazon EC2.
We also implemented a dashboard app to handle user authentication/authorization, as well as a custom SSO server that runs on Heroku which allows experts to easily visit more than one instance without having to login repeatedly. The #Backend was implemented using my favorite #Stack which consists of FeathersJS on top of Node.js and ExpressJS with PostgreSQL as the main database. The #Frontend was implemented using React, Redux.js, Semantic UI React and the FeathersJS client. Though testing was light on this project, we chose to use AVA as well as ESLint to keep the codebase clean and consistent.
I use Gunicorn because does one thing - it’s a WSGI HTTP server - and it does it well. Deploy it quickly and easily, and let the rest of your stack do what the rest of your stack does well, wherever that may be.
uWSGI “aims at developing a full stack for building hosting services” - if that’s a thing you need then ok, but I like the principle of doing one thing well, and I deploy to platforms like Heroku and AWS Elastic Beanstalk where the rest of the “hosting service” is provided and managed for me.
Kubernetes powers our #backend services as it is very easy in terms of #devops (the managed version). We deploy everything using @helm charts as it provides us to manage deployments the same way we manage our code on GitHub . On every commit a CircleCI job is triggered to run the tests, build Docker images and deploy them to the registry. Finally on every master commit CircleCI also deploys the relevant service using Helm chart to our Kubernetes cluster
In my last side project, I built a web posting application that has similar features as Facebook and hosted on Heroku. The user can register an account, create posts, upload images and share with others. I took an advantage of graphql-subscriptions to handle realtime notifications in the comments section. Currently, I'm at the last stage of styling and building layouts.
For the #Backend I used graphql-yoga, Prisma, GraphQL with PostgreSQL database. For the #FrontEnd: React, styled-components with Apollo. The app is hosted on Heroku.
We began our hosting journey, as many do, on Heroku because they make it easy to deploy your application and automate some of the routine tasks associated with deployments, etc. However, as our team grew and our product matured, our needs have outgrown Heroku. I will dive into the history and reasons for this in a future blog post.
We decided to migrate our infrastructure to Kubernetes running on Amazon EKS. Although Google Kubernetes Engine has a slightly more mature Kubernetes offering and is more user-friendly; we decided to go with EKS because we already using other AWS services (including a previous migration from Heroku Postgres to AWS RDS). We are still in the process of moving our main website workloads to EKS, however we have successfully migrate all our staging and testing PR apps to run in a staging cluster. We developed a Slack chatops application (also running in the cluster) which automates all the common tasks of spinning up and managing a production-like cluster for a pull request. This allows our engineering team to iterate quickly and safely test code in a full production environment. Helm plays a central role when deploying our staging apps into the cluster. We use CircleCI to build docker containers for each PR push, which are then published to Amazon EC2 Container Service (ECR). An
upgrade-operator process watches the ECR repository for new containers and then uses Helm to rollout updates to the staging environments. All this happens automatically and makes it really easy for developers to get code onto servers quickly. The immutable and isolated nature of our staging environments means that we can do anything we want in that environment and quickly re-create or restore the environment to start over.
The next step in our journey is to migrate our production workloads to an EKS cluster and build out the CD workflows to get our containers promoted to that cluster after our QA testing is complete in our staging environments.
Our backend consists of two major pools of machines. One pool hosts the systems that run our site, manage jobs, and send notifications. These services are deployed within Docker containers orchestrated in Kubernetes. Due to Kubernetes’ ecosystem and toolchain, it was an obvious choice for our fairly statically-defined processes: the rate of change of job types or how many we may need in our internal stack is relatively low.
The other pool of machines is for running our users’ jobs. Because we cannot dynamically predict demand, what types of jobs our users need to have run, nor the resources required for each of those jobs, we found that Nomad excelled over Kubernetes in this area.
We’re also using Helm to make it easier to deploy new services into Kubernetes. We create a chart (i.e. package) for each service. This lets us easily roll back new software and gives us an audit trail of what was installed or upgraded.
I use Heroku, for almost any project of mine. Their free plan is awesome for testing, solo developers or your startup and its almost impossible to not cover you somehow. Adding an add on is a simple command away and I find it easy to use it both on my Windows PC or my Linux laptop. Their documentation, covers almost everything. In particular I have used Heroku for Spring, Django and AngularJS. I even find it easier to run my project on my local dev with foreman start, than ./manage.py runserver (for my django projects). There is no place like Heroku for the developer!
Can't beat the simplicity of deploying and managing apps, the pricing is a bit high, but you are paying for those streamlined tools. However, after several experiences of tracing issues back to Heroku's stack, not having visibility into what they are doing has prompted moving two applications off of it and on to other more transparent cloud solutions. Heroku is amazing for what it is, hosting for early stage products.
I've been using Heroku for 3 years now, they have grown super fast and each time they're improving their services. What I really like the most is how easily you can show to your client the advances on you project, it would take you maximum 15 minutes to configure two environments (Staging/Production). It is simply essential and fantastic!
It's a little bit complex to onboard, but once you grasp all the different concepts the platform is really powerful, and infrastructure stops being an issue.
Service discovery, auto-recovery, scaling and orchestration are just a few of the features you get.
I liked how easy this was to use and that I could create some proof of concepts without have to pay. The downside for NodeJS is remote debugging. Pretty much have to depend on logging where Azure allows remote debugging with Node Inspector.
Using Heroku takes away all the pains associated with managing compute and backing services. It may require a little extra optimisation and tweaks, but these constraints often make your app better anyway.
Not having to deal with servers is a huge win for us. There are certainly trade-offs (having to wait if the platform is down as opposed to being able to fix the issue), but we’re happy being on Heroku right now. Being able to focus 100% of our technical efforts on application code is immensely helpful.
Two dynos seems to be the sweet spot for our application. We can handle traffic spikes and get pretty consistent performance otherwise.
We have a total of four apps on Heroku: Legacy Leanstack, StackShare Prod, StackShare Staging, StackShare Dev. Protip: if you’re setting up multiple environments based on your prod environment, just run heroku fork app name. Super useful, it copies over your db, add-ons, and settings.
We have a develop branch on GitHub that we push to dev to test out, then if everything is cool we push it to staging and eventually prod. Hotfixes of course go straight to staging and then prod usually.
Heroku runs the web and background worker processes. Auto-deployments are triggered via GitHub commits and wait for the Buildkite test build to pass. Heroku pipelines with beta release phase execution (for automatically running database migrations) allowed for easy manual testing of big new releases. Web and worker logs are sent to Papertrail.
As much as I love AWS EC, I prefer Heroku for apps like this. Heroku has grown up around Rails and Ruby, massive set of add-ons that are usually one-click setup, and I once had to perform an emergency app scale-up a that I completed in seconds from my mobile phone whilst riding the Bangkok subway. Doesn't get much easier than that.
Just tinkering with it for personal use at this stage based on positive experience using it at work. Plan to use it for high traffic distributed systems if not using a managed hosting service like Heroku, AWS Lambda, or Google Cloud Functions. Reasons for using instead of these alternatives would be cheaper cost at higher scale.
With its complimentary SSL (on *.herokuapp.com) we can test everything. Our dev branch is built and deployed out to Heroku. Testing happens out here. not production cause $20/mo is TOO much to pay for the ability to use my own SSL purchased elsewhere.
Good existential question. Kubernetes is painful in the extreme - especially when combined with Ansible. The layers of indirection are truly mind altering. But hey - containers are kewl!
Our developer experience system is on Kubernetes (Google Kubernetes Engine at the moment). We would like to expand our Kubernetes clusters over other Kubernetes engine.
Kubernetes is used for managing microclusters within our AWS infrastructure. This allows us to deploy new infrastructure in seconds.