Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: How do you cost-efficiently host your small personal projects?
14 points by twothumbsup 3 months ago | hide | past | favorite | 20 comments
As the title says, how do you all host your small personal projects with an eye towards cost? I've ruled out hosting them locally in my home lab.

I'm putting together a small personal project related to one of my hobbies, basically a tiny web app. It will have a small Postgres DB, a basic Flask API, and then eventually a TypeScript frontend. The MVP is essentially creating a query-able backend for contest results, though eventually I'd like to expand it to a whole management platform for these contests. The events happen infrequently (~3 times a year at most) so the data grows in (small) bursts and is otherwise static. At this point it's entirely text and number data as its currently managed through spreadsheets.

For deployment, I'm considering:

* AWS RDS + EC2 (or the GCP equivalent) for the db + API * Fly.io (or another provider in this space (Heroku?)) because deploying at the edge is appealing and their DB pricing seems reasonable * Fully manual via VPS / dedi hosts like OVH/Vultr/Scaleway/etc

AWS/GCP is appealing because of familiarity through work and it offloads having to manage the databases myself and the data centers are closer to our user base. EC2+RDS works out to ~$20/mo for EC2 (t4g.small) + ~$25 for RDS (db.t4g.micro), GCP is about half that (~$25) for an e2-small and db-f1-micro.

Fly.io is similarly appealing with the benefit of edge deployments, not that my application is particularly latency sensitive. Fly.io would be between ~$7 (free tier compute + basic postgres) and ~$20. Heroku would be between free and $16/mo (for the $7 hobby dyno and $9 hobby basic psql)

OVH et. al are appealing on a cost basis, but feel like they would require a lot more work to ensure similar reliability to the other options. Kimsufi would be between $10 - $40/mo depending on the data center location (Canada or France), Vultr (VPS) would be $10-15/mo, Scaleway Dev (VPS) instances would be $10-$20/mo, Hetzner (VPS) would be $10-$15 (though the downside being their data centers are in Germany and Finland while the majority of our users are in the USA). Specs seem better for the money for these but at the cost of having to manage all of the infrastructure myself.




Put the whole thing on a $5 Digital Ocean droplet. If you end up outgrowing it, that's a great problem to have.


i like the simplicity of this idea, keeps things in perspective.


Cockroach just today launched a free hosted serverless version of the db. Looks generous free tier then reasonable once you outgrow, postgres wire compatible, sign up thru GH https://www.cockroachlabs.com/blog/announcing-cockroachdb-se...


This looks super interesting and basically exactly what I was looking for in a db product, definitely going to be checking this out!


Can you just use a Linode? It’s $5/month. I bought a Linode VM and set up a server and database on it.

Main drawback is efficiency, idk how fast a linode works once you have users. But once you have users if you can make money off them, you can migrate to AWS.


Been a very happy user of Linode for years. Didn't get lucky to have many users, but it worked perfectly for intensive backend jobs, never noticed any slowdown as opposed to DO.


I've heard a lot of good things about Linode over the years, they slipped my mind while thinking of the more manual options. I'll have to check them out!


Why don't you use GAE or Cloud run on GCP? They have a big enough free tier that you won't have to pay even up to thousand or so users.

The only cost would be storage, if you're going to use SQL. But then again cheap enough.

I'd suggest porting to key/value pair DBs like mongo or firestore.


GAE/Cloud Run are certainly possibilities, I'll have to look into them.

> I'd suggest porting to key/value pair DBs like mongo or firestore.

Why? The data set feels pretty "relational" to me (contests have divisions, divisions have scorings and results, results have players, players have sponsors) and seems to fit SQL. To be fair though, I've not used Mongo or Firestore or a NoSQL db in general before.

The "scorings" part is the only thing that tripped me up designing a schema since it varies between divisions in a contest as well as between contests themselves, so I ended up w/ a JSONB column for scoring rubric for divisions and then in the results table there's both final_score and scoring_breakdown columns, the beakdown being another JSONB column w/ the individual category results.


I have used Google app engine since 2009 and love it: $0 charged. It powers my https://www.appblit.com site


Seen GAE referenced across several comments and apparently Snapchat started on GAE as well (lol not that this has any chance or even need in the big success case of scaling up so much) so it's definitely something I will look into!


> I've ruled out hosting them locally in my home lab.

Then you've also ruled out "cost-efficiently host[ing]" them as well.

The most cost efficient method is using the internet connection you already have and are already paying for to also host them.


Kind of depends; my DO droplet is $6/month (I pay for their backup), and static IPs (if available) often cost that much, or more to add to a residential internet connection. Currently, I would need to have new service installed to switch to a different billing system where they could add a static; even the service was the same cost, I'd be paying off the install for a long time, so...

OTOH, if I needed more hardware, it'd be helpful to serve from home, because renting hardware gets expensive.


Read it as "cost-efficiently externally hosting" then I guess. For a PoC I might host locally just to show it off to others, but I wouldn't want to deploy it there long-term, mostly since I'm not physically near said lab for several months at a time so if things went down it'd be a drag.


Dokku running on AWS light sail or DigitalOcean


Interesting, I hadn't heard of Dokku before (looks similar to Flynn and Deis (looked into those back in 2016 before k8s was the de facto choice) but still actively developed) and I overlooked Lightsail. I'll have to price out DigitalOcean as well, I used them for a project in school because they gave out free credits and the experience was good iirc.


You could combine CloudFlare workers and/or fly.io and YugaByte or CockroachDB psql-compatible DBs free tiers.

Heroku, had a free tier as well.

See https://free-for.dev/ for other possible combinations.


https://free-for.dev is a great resource I wasn't aware of, thanks for linking it as well as the ideas about YugaByte and CockroachDB!


CloudRun, Lambda, Azure Functions or similar.

It’s million requests for like $0.05 or something trivial.

By the sounds of it you probably could stay well under the free tiers offered.

CloudRun is just setting up a docker image properly..


How does google cloud cloudrun compare to azure app service? I am asking as I ran a 70$ bill just deploying my application to azure app service, approx 10-20 times or so.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: