Live data from Hacker News

A simple DIY Heroku replacement to keep your hosting costs down

github.com

51–60 of 76 posts

Re: A simple DIY Heroku replacement to keep your hosting costs down

#51
post #50

another option that is a pretty good Heroku clone is to deploy to a Deis stack. https://deis.com I set up a deploy on kubernetes a year ago and it was very close to Heroku -- impressive.

Yeah, Deis!

I have been a big proponent of Deis even as Microsoft has acquired the team and they've gone more hands-off with the project. It's harder to make the case for Deis when there is nobody you can buy support from...

(Is there anyone left that you can buy support from? I heard the easiest way to get an answer on the internet is to start by "being wrong"... secretly hoping there's still someone out there in the business of providing support to Deis)

I'd also settle for someone who has continued to use Deis in production after the end-of-life date was set, and currently has no plans to move away. (I know you're out there...)

I've been looking at Convox the last few days, because my team actually wants to insist on doing something with ECS. We've used Deis with our developer laptops with a middling degree of success.

The best part of using Deis now IMHO is that when they ask "what are you going to do when you need support and you can't get it," ... or "what are we going to do if you leave, and nobody knows how it works?"

Well there are a lot of 12-factor PaaS and hosts. Pick another one and move on. Or you can roll your own. It's not that hard, there is even a step-by-step guide (12factor.net)!

Re: A simple DIY Heroku replacement to keep your hosting costs down

#52
post #34
post #5

Well, Dokku [1] is already a good solution to the heroku cost problem. All the power and convenience of heroku commands with the freedom and low cost of docker deployment. It has lets-encrypt ssl support too! [1] https://github.com/dokku/dokku

I used to love dokku until I had 7-minute deployment times for an average application in production. Has that been fixed? Was around 0.6.0 I think.

Mine takes 30 seconds for a sizable rails app

Re: A simple DIY Heroku replacement to keep your hosting costs down

#53

Earlier quoted context omitted.

For the Kubernetes + Dokku replacement, GitLab's Auto DevOps https://docs.gitlab.com/ce/topics/autodevops/ can do a lot of stuff. It's included in CE, thus it's free.

That's a layer over Kubernetes and Prometheus, no? It looks good, but it assumes I've already installed the former.

Gitlab now bundles Prometheus, but you would need to install Kubernetes.

Re: A simple DIY Heroku replacement to keep your hosting costs down

#54

Earlier quoted context omitted.

You might look at Red Hat's OpenShift, which builds on top of Kubernetes. Or Deis, which has adopted buildpacks. Cloud Foundry has buildpacks too, but it's usually seen as a heavyweight solution -- the light footprint variant is 6 VMs, the standard variant is 20-something. Disclosure: I work for Pivotal, we contribute a lot to Cloud Foundry. Red Hat is a competitor.

Ah, I've heard about Deis, I'll check that one out, thanks. My main concern is the fact that Kubernetes recommends running more than one server, which is a luxury my personal projects cannot afford. Does anyone know how well it runs on a single server?

It's easy enough to set that up (though it's not the recommended use case) using kubeadm.

Re: A simple DIY Heroku replacement to keep your hosting costs down

#55
post #34
post #5

Well, Dokku [1] is already a good solution to the heroku cost problem. All the power and convenience of heroku commands with the freedom and low cost of docker deployment. It has lets-encrypt ssl support too! [1] https://github.com/dokku/dokku

I used to love dokku until I had 7-minute deployment times for an average application in production. Has that been fixed? Was around 0.6.0 I think.

Can you give more info on that 7-minute deployment time?

Dokku is basically a wrapper around Herokuish which is just a docker image with Heroku buildpacks pre-installed on them to build an image of your app to be dployed to docker instance...

Source: Am a maintainer of Dokku.

Re: A simple DIY Heroku replacement to keep your hosting costs down

#56

Earlier quoted context omitted.

You might look at Red Hat's OpenShift, which builds on top of Kubernetes. Or Deis, which has adopted buildpacks. Cloud Foundry has buildpacks too, but it's usually seen as a heavyweight solution -- the light footprint variant is 6 VMs, the standard variant is 20-something. Disclosure: I work for Pivotal, we contribute a lot to Cloud Foundry. Red Hat is a competitor.

Ah, I've heard about Deis, I'll check that one out, thanks. My main concern is the fact that Kubernetes recommends running more than one server, which is a luxury my personal projects cannot afford. Does anyone know how well it runs on a single server?

I use Deis on a single server. It works great.

There are a few things you need to be aware of, but the tl;dr is that it works great for us. We'd be using it more, except that our org hasn't adopted containers in any meaningful way yet, and Deis is large and complicated, and a little too much for them to bite off and swallow all at once. They want to do a pilot on ECS so that we can say we're using more AWS services (yay lock-in, we love vendor lock-in.)

So, those things you need to be aware of:

#1 - In the default mode, Minio is used instead of a real Object Storage backend like S3 or Swift, and Minio is configured to keep all objects in RAM by default. Use S3 instead. This is an option to configure in values.yaml.

#2 - builder really needs to be on an SSD, but if you're not backing your Kube node with SSD, you can at least prevent a lot of builder crashes by making sure there isn't much swap to fill and bog down the disk with swapped pages. This may be counter-intuitive (don't things crash when they run out of RAM? Isn't that why you have swap...) until you realize that Builder has to respond to health checks by default once per second. So if the node that builder runs on is getting even remotely bogged down by swappiness and lots of swappy pages, it will be killed and restarted, which takes some time and is noticeable and annoying.

#3 - The remaining cloud services that Deis can optionally depend on IMHO are take-or-leave, depending on your cloud provider. Deis can do everything in-cluster. I actually use this configuration with Minikube and Deis, and it works great. I let Deis spin up its Postgres database on-cluster and restore from S3 WAL backups each day, it just works.

I'd be using Deis more heavily, except that my app development has a production database attached. (Our infosec department is leary about letting me put backups of sensitive data into S3. So we really have to use RDS for our app, even though Deis is creating a Postgres database that nothing else is stopping you from using with your app. It's for Deis controller operation though.)

#4 - This one may be a dealbreaker if your company is very serious, Deis is now "End-of-Life." This means that Microsoft has committed to provide break fixes for Deis until March only, and by middle of next year, any break fixes will have to come from the community. There is AFAIK nowhere to buy Deis support, although there is a new group that has formed to commit to support Deis into the future, it's not clear what form that support will take, or whether you'll be able to pay money for an SLA, or anything like that. It is open-source.

This may be exactly what you'd prefer, or it may be a deal breaker. I like Open Source, but my group likes support.

I do not work for Deis or any other cloud PaaS provider, although I have evaluated a lot of them including OpenShift (and I consider Deis to be technologically superior in some ways to OpenShift.) Because of my ECS requirement, I'm looking at Convox now. If you have to use ECS, so far I would definitely recommend Convox. If you're like the rest of the world and using K8S, I can't think of any really good reason not to recommend Deis.

Re: A simple DIY Heroku replacement to keep your hosting costs down

#57
It's been said already, but the idea that Heroku is expensive is provably incorrect.

They're not providing hosting, they're providing a service.

If I want self-hosted platforms, I'll manage my own docker containers on a GKE cluster or something similar. As it turns out, I want to write code and scale it to millions of people. Heroku lets me do that, and I don't need to hire an SRE team.

Re: A simple DIY Heroku replacement to keep your hosting costs down

#58

Earlier quoted context omitted.

While I agree that a script can't match what Heroku does, in the end Heroku shouldn't be used for anything serious. I love Heroku for it's simplicity. They give you very few levers, making it less likely for you to screw up. When we had a production add we faced following issues with Heroku: 1. Frequent downtimes. Heroku would have a 3-4 hour downtime every 2 months. In some cases, site would be down. In most cases y…

> in the end Heroku shouldn't be used for anything serious. This is a provably false statement. There are thousands of companies running very serious things on Heroku handling load that would exceed the needs of the majority of audience here. All with near zero effort from a developer perspective. They've also always been transparent about downtime, retrospectively creating/amending cases if required. The only multi-…

> All with near zero effort from a developer perspective

For a very small subset of developers.

The last time I was tethered to a Heroku installation, I spend 60% of my time coding, and 40% of my time working around Heroku's shortcomings.

It doesn't matter how many times you reply to people on HN stating that their position is "provably false," that doesn't make it true.

Re: A simple DIY Heroku replacement to keep your hosting costs down

#59
post #56

Earlier quoted context omitted.

Ah, I've heard about Deis, I'll check that one out, thanks. My main concern is the fact that Kubernetes recommends running more than one server, which is a luxury my personal projects cannot afford. Does anyone know how well it runs on a single server?

I use Deis on a single server. It works great. There are a few things you need to be aware of, but the tl;dr is that it works great for us. We'd be using it more, except that our org hasn't adopted containers in any meaningful way yet, and Deis is large and complicated, and a little too much for them to bite off and swallow all at once. They want to do a pilot on ECS so that we can say we're using more AWS services (…

That's very helpful, thank you! I was with you up until "Deis is EOL", I only want to use it for my sideprojects, but I still wouldn't want to be out of luck if something breaks on the next Ubuntu update and I can't get a fix anywhere :/

Maybe I should look into OpenShift instead, as that's more active?

Re: A simple DIY Heroku replacement to keep your hosting costs down

#60

This, Dokku, Flynn, that 1000+ line bash/chef/ansible script that the guy who used to do your job before he left are all legitimate solutions for deploying apps (and all better than FTP'ing up whatever the developer happens to have on their laptop). But, I feel like the comparison to Heroku isn't great. Heroku saves you from having to do and worry about significant amounts of (I would argue) extremely important admin…

While I agree that a script can't match what Heroku does, in the end Heroku shouldn't be used for anything serious. I love Heroku for it's simplicity. They give you very few levers, making it less likely for you to screw up. When we had a production add we faced following issues with Heroku: 1. Frequent downtimes. Heroku would have a 3-4 hour downtime every 2 months. In some cases, site would be down. In most cases y…

My last job we were 100% hosted on Heroku and coming from managing hundreds of EC2 instances and databases via autoscaling, CF, Puppet and home-grown scripts, it was a dream to use Heroku. We simply didn't need any operations staff to manage infrastructure, maybe a few hours a week for 1 developer out of 11 to adjust or verify a few things.

Need a bigger database? Just a few Heroku CLI commands. Bigger web servers? 2 clicks. Want a test database to run queries against? 1 Heroku CLI command. Want to test a branch of your code against the staging database? Automatically done via GitHub PRs, with DNS setup too.

We had 0 downtime in a year due to actual Heroku issues, developers could push code easily (git push), databases were backed up automatically, servers auto-scaled, etc.

I was genuinely amazed at how well it all worked. The amount of operations work was easily 10x less than if we had to run our own infrastructure on AWS due to not just the hosting, but the tooling. Deployment, rollbacks, slave database setup, configuration management, access control, log aggregation, 3rd party integrations and more.

Heroku does have some drawbacks, request queuing is one of them, mostly due to lack of clear docs and information. Even with its flaws it still saves a massive amount of time and money. For nearly all startups to medium sized companies I'd highly recommend using Heroku.

Post reply on HN