Is it practical to host a real production app on a Mac mini?
I want to try out some personal projects, and although personal projects often don't get much traffic, I'd like to make it capable of scaling upto tens of thousands of users. I've seen free tiers of DB providers like cockroachdb, supabase etc, but they seem to be very limited in storage and usage.
Will running my apps on a mac mini (each app would have its own docker image) and opened to the public via cloudflare tunnels be a practical approach?
My concern right now is whether the latency would be too high, since I have a residential internet connection (200mbps); and whether I will be able to SSH into my machine if I am not in my hometown (which is like ~50% of the time).
When I say apps, I mean wordpress site, some APIs for mobile apps that I vibecoded, a mysql db, elasticsearch, mongodb etc. Even though I don't have much users right now, I want the infra to be capable of handling it upto ~50k daily users.
Also, any cheaper option than a Mac mini? its pricing has almost doubled in last 1 year
7 comments
[ 1145 ms ] story [ 1721 ms ] threadAt work I’ve moved us to a hybrid solution where we use cloud for managed database and storage solutions and compute on local servers. I personally prefer to have the budget be spent on the ops/maintenance of the scariest thing losing company data and somehow failing to maintain securing that data. Compute is almost easy to me in comparison, disaster strikes I just switch to another server local or in cloud, let it talk to the database, secure out going access, run my docker compose. More time spent on the write up than the fix. Someone that is a seasoned dba may choose the exact opposite.
15 years ago we also were trying some other approach with friends. It was the time when cloud was not still the buzzword, and buying a dedicated server in a datacenter was just too expensive for us students (back then). So we bought back then a bare-metal Hetzner machine with friends and shared the bill (for a few years). The problem was, as always, when some time elapsed and some folks wanted out, you needed to re-split the bill. As you can imagine it all collapsed.
Today, what I do to solve both problems? I just buy cheap Hetzner Cloud virtual machines. The cost is marginal. Even with their latest price bump. And it solves the other problem I've had with old approaches. When you pack everything on one box, you have a problem after 2-3 years that it's hard to upgrade the OS ... without taking everyting down ... and possibly not be able to take it back up - the OS upgrade is scarry. The small cheap virtual servers allow you to take the OS upgrade risk-free.
Have you considered how much electricity will that computer @home eat? My hosting at home made me learn it the hard way (it was a regular linux based PC eating a lot of current). I think you have to factor in the hardware + electricity cost in order to estimate what's cheaper.
with hetzner, the closest comparable option (16gb ram, 8 core ampere cpu) with a base model mac mini will annually cost almost 50% of the mac mini price. so cost wise, mac mini is equal to 2 years of hetzner vm. (comparing prices as of today for both, earlier mac mini used to be quite cheap).
I already have residential internet. The only downside is having to ensure uninterrupted power and internet. and also the friction of connecting remotely via ssh.