Why I pick Heroku over AWS Lambda for my SaaS. But not always.

Why I pick Heroku over AWS Lambda for my SaaS. But not always.


Related discussions:

Any reason not to consider ECS with EC2 type instances?

Really great write-up! :slight_smile:

Well, yes. Complexity again. The team I was working with was actively looking for a “git push & forget about the rest” type of solution. We discussed it, quite at length actually, but I left it out of the blog post because it was already getting a bit long.

To be 100% honest, I used ECS some months after it went GA and was not that impressed. It needs a “git push forget about the rest”-layer if you know what I mean.

Thanks. It’s total content marketing but I try to make it interesting and useful.

Assuming your Lambda functions are CPU bound increasing allocated memory could reduce your invocation time so the total cost does not have to always increase

IMHO it is a lot more configuration to do up front (cluster, services and task definitions) but it integrates pretty well with CodePipeline and Blue/Green deployments (yes even more configuration!) but once its all set up its just git push and wait a bit, and i feel like its worth to do all of that since its a lot easier to work with locally compared to Lambda and HAVING to use the Serverless framework, and it suffers from a lot less latency.

Can’t talk about Heroku since I’ve never used it.

100% correct. There are some good write ups on that actually. Sadly, my work loads are mostly IO bound (network requests). AWS should actually decouple CPU and Memory for Lambda.

I guess a side issue is AWS sprawl. I’m pretty up-to-date on AWS, long time user.

For my company (https://checklyhq.com) I use Lambda quite heavily. Some EC2, S3 and Cloudfront. Even IOT!

But I’ve never used Code Pipeline and have no idea how it integrates with parts of the other eco system.

Sprawl is a thing.

I’d also look at Fargate as an option. Much easier than EC2-based ECS. Serverless containers.

Do some cost analysis on it and see if it comes out competitive.

Definitely written from the point of view of a developer; it mentions scaling precisely once, in passing, and somehow as the advantage of Heroku.

This is like comparing the usefulness of a cargo ship to a mini-van and calling it for the van because you like the leather seats.

Personally I use Feathery.io for any frontends since it has automatic SEO caching. And all my backends are now on Render.com since they are much cheaper

Ha ha, yes this was written with my developer hat on and for developers. Scaling is a totally valid topic and Lambda is crazy good for it. I will add this to the post as a definite perk.

Admittedly, I left it out as scaling is not a super hard requirement for many companies.

Developers don’t care about scaling? Huh?

They are easier to configure than EC2 instances but cost more for a task that is running 100% of the time like an API, especially comparing it to spot instances.

An interesting write up, but as an ops guy, I actually laughed out loud at “developers are obssesed … with cloud hosting bills in particular”. Maybe for their personal side projects…

Lol some of us actually are. I’m a dev and I got so excited when I realized I could save our ops team thousands each month by switching from Redis to a more appropriate database choice for our task (speed not needed). But I’m having trouble getting the go-ahead from the higher ups to spend the time needed to test a different database and deploy the change if the tests go well.

You’re overstating the position I took in what I wrote.

Not my intention, sorry. I guess my question is really who would emphasize scaling if not a developer?

Good read. I was a long time Heroku user and you’re bang on with the pros and cons.

The Kubernetes stuff - Whilst I’d definitely agree that there’s a steep learning curve, it’s not a very long one so imo it’s worth playing with given the opportunity. Once you’re happy that you’re effectively just pushing manifests about, you can dig into the architectural concepts a bit more. Didn’t take us long wrap our heads around it after that.

We’ve been running K8s + Helm + Deis on AWS for a couple of years now and I’m extremely happy with it. It’s effectively Heroku without the black box setup. AWS ASGs and K8s’ HPA scale nicely (though admittedly it’s a bit rough with large scale bursty workloads) and the ‘dynos’ are just pods/containers that I can get my tentacles right into should the need arise. Would absolute recommend it.

One of the other lads in the office is currently playing with Serverless but I wouldn’t say it was sparking any joy. Your assessment there is also similar to ours - it sounds good, until you get into the amount of upfront effort you’ve got to put into your code just to satisfy the deployment environment. I really like the overall premise but I don’t think we’ve found a use case where it really shines for us yet.

But yeah, good read, nice job.