Hacker News new | ask | show | jobs
by seanwilson 3260 days ago
> I need pretty basic setup (a db server, a redis one, one for the rails app and a CDN). I am not a sys ops expert but with some work I can set these servers up.

> I would like to receive advice for people who can understand my position as a solo developer (with a basic European wage) and who can't afford to spend 100/more euros/month for a project until it pays for itself alone.

Heroku is $7 a month (not counting 1000 hours free) for a dyno, $9 a month for a 10M rows Postgresql database and Cloudflare is free so it's very affordable to start with in my opinion. How much is your time worth? You can make it a bit cheaper with AWS probably but you'll pay for it with your own time and it'll probably be less robust unless you know what you're doing (e.g. coping with server failure, backups, rollbacks, security, deployment process, scaling, logging).

I like Heroku because it's simple. You can mostly just focus on your code, leaving server and infrastructure configuration to the defaults and know it's going to be robust and secure. AWS and even Digital Ocean have a lot of customisation and complexity which just means more things can go wrong which will eat up your time when you could be coding.

2 comments

I used to be like OP. Trying to save as much money as possible hosting with OVH or Linode and provisioning my own servers.

Then my projects would die because I spent far more time doing this than writing application business logic. The classic "solving scaling problems with zero customers".

Heroku is expensive when you have scaling issues, but until then, it's $7 a month with the free Postgres and Redis options...

Heroku doesn't maintain database state. Your dyne can essentially be erased and restarted with an empty database. That's not usable for production systems.
> Heroku doesn't maintain database state. Your dyne can essentially be erased and restarted with an empty database. That's not usable for production systems.

Almost, dynos don't persist filesystem changes but for databases you're suppose to host the data elsewhere (e.g. Heroku Postgresq, AWS RDS, AWS S3) and that data will be persisted. This is by design and a very good strategy for production systems as you can then easily scale by adding more stateless dynos later. All configuration for your dynos is stored and versioned in Git and all your important data is stored somewhere robust with proper backups and rollbacks.

If you've advocating storing your state on the server itself by e.g. using AWS EC2 or Digital Ocean, you're going to need your own strategy to make sure you don't lose any data or configuration settings (e.g. packages, config files) when your server box fails and storing state on the server means you can't easily horizontally scale.

When Heroku doesn't let you SSH into active servers, only lets you deploy via Git and doesn't let you store state on servers, it's done intentionally to force you into making good choices that scale.

Heroku is super easy to use and setup for a newb like me, but never explains this up front. So I was shocked when I figured it out months into using my first dyno. Everything you write makes sense, and hosting my data elsewhere turned out to be easy. But it's definitely an important point to understand, because it adds a layer of cost to hobby projects you want to run full time sites with.