Anyone running an app with decent traffic on Heroku?

heroku

#1

:wave:

I’ve always been using Heroku for low traffic app. And most people I know switch over to running their own stack on AWS as soon as Heroku costs them more than a couple thousands dollars.

Now, in my experience, maintaining an infrastructure requires a lot of effort (and $$$). So I sometime wonder if it wouldn’t more cost effective to just use Heroku and spend the $$$.

Anyone doing this? Happy with this decision? What are the tradeoffs?


#2

Yeah we switched away from Heroku, but cost wasn’t the only factor. There are other advantages to controlling your own infrastructure and it isn’t as much time and effort as you might expect once it is up and running. I think there is a certain team size, or product maturity where it starts to make sense.

We are currently using Dokku to migrate away from Heroku, but the long term plan is to move to Kubernetes possibly running Deis. We’ve already switched away from buildpacks and just use docker build to create and deploy images so everything is very portable. I found defining a Dockerfile for an app a pretty straightforward experience for most simple web applications and is well worth learning.


#3

Thank you for your reply @Chris_Nicola!

Could you elaborate on the “other advantages to controlling your own infrastructure”?

The main disadvantage I see (sorry to focus on those) is the extra work required to:

  • provision servers, deploy app, secure access, monitor servers, backup data (that’s the fun part - but new shinny tools and practices to do all that are released every months)
  • babysit servers (they like to go down or run out of disk space at 2am)
  • maintain servers up to date (security patches, software updates)

#4

Hey!

I’ve recently finished up some work with Retail Zipline who run a large Rails app on Heroku. In the past I have ran a number of services on EC2/Linode and preferred running infrastructure in the team to keep costs down. But today I would start with Heroku and really question whether you need more.

I would also consider these areas:

  • How much of your team wants to spend time on DevOps? Or even can they? This can also be qualified based on their experience when dealing with infrastructure work. Will they automate/orchestrate the setup or just build on demand? If not, go Heroku.
  • If you run your own infrastructure, do you have time to manage backups, security updates, failover setups? Most teams don’t so go with Heroku and pay the extra $$ to have their team worry about those things.
  • Do you need a complex HTTP routed service, fancy load balancing, Geo-based SSL termination? I have found Heroku to be limited on options for load balancing and directing input traffic. It’s a bit of work to manage your own buildpack with funky Nginx proxy or other.
  • What are your performance requirements? In some cases certain application architectures will perform better in an optimized environment that can be controlled. As an example, ensuring networking latency is low on a private network. Obviously benchmark and test though :wink:
  • How much database optimizations do you need? If you have experience with optimizing your database to get the most performance from your disk IOPS and memory and need to, then having your own setup would help. Heroku and other Cloud hosted DB addons are limited in optimizations. But you could just run the DB on your own infrastructure and still run applications on Heroku :smiley:

#5

As Kalv mentioned, Retail Zipline uses Heroku to serve our mid-sized SaaS application to thousands of people worldwide every day.

Unfortunately, I’d rather not dive into details about why Heroku is the best choice for Retail Zipline on a public, search-indexable forum. However, if anyone is questioning the choice between running their own servers vs using a PaaS like Heroku I’d happily have a chat about it. We evaluated it pretty heavily last year.

At a high level, I will say:

  • Overall cost is much lower when you take everything into account
  • Service and reliability has been great
  • Ease of management and deployment is a huge factor
  • Developer happiness is incredibly important

Even if you are a sys admin yourself, your time is probably better spent doing something that really differentiates your company instead of managing a server farm. Spend your time on getting the right metrics, building something that gives developers more insight into their deploys, etc.

At this point, the only time I would really recommend not using a PaaS is when you are building a business that differentiates itself through some novel hosting / serving architecture. Or, I suppose, if you have a lot of under-used sys admins lying around.


#6

We actually used an RDS database with Heroku for a while. While Heroku Postgres is great from a usability standpoint from a pricing standpoint this is probably one of their weakest areas so it was one of the more obvious things for us to swap out early on.

Tools like Dokku, Flynn and Dies make it pretty easy to deploy in a Heroku-like way on your own systems and support both Buildpacks or Dockerfile/Procfile configurations. That said, I’d probably still recommend Heroku under the following circumstances.

  1. The team is small enough that even the reasonably low overhead of using a Heroku-like or Docker based alternative is not worth it
  2. Revenue-per-transaction is relatively high. Otherwise the cost savings may be worth it.
  3. Your architecture is “monolithic” in design or at least mostly so. Deploying many services can certainly be done with Heroku, but the 1x dynos are easily the worst performance-for-price option they have and the cost to run many mostly-idle will start to become a pain.

Finally, I would recommend using a Dockerfile over Buildpacks even with Heroku. They are more portable and offer more control when it comes to CI and deployments.

I definitely highly recommend a fully managed database solution with point-in-time restore capabilities though. We went with Aiven for that. You can choose your hosting location with that.


#7
  1. Definitely use a managed database solution. Aiven is what we use. This takes care of pretty much all backup issues
  2. Use Dockerfile based system. This makes CI/CD pretty simple, and allows you to automatically install patches during each deployment. I recommend Dockerfile this even with Heroku now that it supports it. This also enables you to use a very tight image designed for security like Alpine.

There is definitely a learning curve to getting setup with Docker, but I feel this knowledge is worth it even if you use Heroku. Once you are over that hump, I don’t find it more time consuming than using Heroku. Heroku is far from maintenance free. We regularly ran into time consuming issues. But don’t take my word for it, I would suggest asking others. Perhaps our experience was unique but I doubt it. I think Heroku is definitely the easiest to get started with, but it was definitely not stress or effort free. If it was I don’t think we would have considered alternatives.