Live data from Hacker News

I run multiple $10K MRR companies on a $20/month tech stack

stevehanov.ca

231–240 of 539 posts

Re: I run multiple $10K MRR companies on a $20/month tech stack

#231

Earlier quoted context omitted.

Sqlite smokes postgres on the same machine even with domain sockets [1]. This is before you get into using multiple sqlite database. What features postgres offers over sqlite in the context of running on a single machine with a monolithic app? Application functions [2] means you can extend it however you need with the same language you use to build your application. It also has a much better backup and replication st…

> Sqlite smokes postgres on the same machine even with domain sockets [1]. SQLite on the same machine is akin to calling fwrite. That's fine. This is also a system constraint as it forces a one-database-per-instance design, with no data shared across nodes. This is fine if you're putting together a site for your neighborhood's mom and pop shop, but once you need to handle a request baseline beyond a few hundreds TPS…

https://antonz.org/sqlite-is-not-a-toy-database/ — 240K inserts per second on a single machine in 2021. The problem you describe is real, but the TPS ceiling is wrong by three orders of magnitude on modern hardware.

Re: I run multiple $10K MRR companies on a $20/month tech stack

#232

I know this article is about the stack, but I'd like to point out that the success of the author has probably more to do with their marketing/sales strategy than their choice of technical infrastructure. Something to remind to many tech folks on HN

100% true. I ran a top 10 most visited Spanish language site on a Pentium III server. I have the technical chops to do all the articles says.

But 10k MRR sounds to me like travelling to Mars. I have 0 ideas and 0 initiative to push them ahead.

Re: I run multiple $10K MRR companies on a $20/month tech stack

#233
post #50

I read it as an article in defence of boring tech with a fancier/clickbaity title. Here’s the more honest one i wrote a while back: https://aazar.me/posts/in-defense-of-boring-technology

While I agree with your points, this one could be more nuanced: > Infrastructure: Bare Server > Containers > Kubernetes The problem with recommending a bare server first is that bare metal fails. Usually every couple of years a component fails - a PSU, a controller, a drive. Also, a bare metal server is more expensive than VPS. Paradoxically, a k3s distro with 3 small nodes and a load balancer at Hetzner may cost you…

In 5 years of running 3x Dell R620s 24/7 - which were already 9 years old when I got them - I had two sticks of RAM have ECC errors, and one PSU fail. The RAM technically didn’t have to be replaced, but I chose to. The PSU of course had a hot spare, so the system switched over and informed me without issue.

IME, hardware is much more reliable than people think.

Re: I run multiple $10K MRR companies on a $20/month tech stack

#234

Nice list! I'd say the SQLite with WAL is the biggest money saver mentioned. One note: you can absolutely use Python or Node just as well as Go. There's Hetzner that offers 4GB RAM, 10TB network (then 1$/TB egress), 2CPUs machines for 5$. Two disclaimers for VPS: If you're using a dedicated server instead of a cloud server, just don't forget to backup DB to a Storage box often (3$ /mo for 1TB, use rsync). It's a good…

Personally for backups I’d avoid using a product provided by the same company as the VM I’m backing up. You should be defending against the individual VM suffering corruption of some kind, needing to roll back to a previous version because of an error you made, and finally your VM provider taking a dislike to you (rationally or otherwise) and shutting down your account.

If you’re backing up to a third party losing your account isn’t a disaster, bring up a VM somewhere else, restore from backups, redirect DNS and you’re up and running again. If the backups are on a disk you can’t access anymore then a minor issue has just escalated to an existential threat to your company.

Personally I use Backblaze B2 for my offsite backups because they’re ridiculously cheap, but other options exist and Restic will write to all of them near identically.

Re: I run multiple $10K MRR companies on a $20/month tech stack

#235
post #189

Nice list! I'd say the SQLite with WAL is the biggest money saver mentioned. One note: you can absolutely use Python or Node just as well as Go. There's Hetzner that offers 4GB RAM, 10TB network (then 1$/TB egress), 2CPUs machines for 5$. Two disclaimers for VPS: If you're using a dedicated server instead of a cloud server, just don't forget to backup DB to a Storage box often (3$ /mo for 1TB, use rsync). It's a good…

First step is to get ssh setup correctly, and second step is to enable a firewall to block incoming connections on everything except the key ports (ssh but on a different port/web/ssl). This immediately eliminates a swathe of issues!

Also use fail2ban. If nothing else to decrease the amount of junk in logs.

Re: I run multiple $10K MRR companies on a $20/month tech stack

#236

> The enterprise mindset dictates that you need an out-of-process database server. But the truth is, a local SQLite file communicating over the C-interface or memory is orders of magnitude faster than making a TCP network hop to a remote Postgres server. I don't want to diss SQLite because it is awesome and more than adequate for many/most web apps but you can connect to Postgres (or any DB really) on localhost over…

Sqlite smokes postgres on the same machine even with domain sockets [1]. This is before you get into using multiple sqlite database. What features postgres offers over sqlite in the context of running on a single machine with a monolithic app? Application functions [2] means you can extend it however you need with the same language you use to build your application. It also has a much better backup and replication st…

Thing is though - either of those options is still multiple orders of magnitude faster than running on a remote host. Either will work, either will scale way farther than you reasonably expect it to.

Re: I run multiple $10K MRR companies on a $20/month tech stack

#237

SQLite is fine, but I have ran Postgresql on a $20 server without any issues, and I would suggest if you have to deal with concurrent users and tasks, Postgresql is the way to go. SQLite WAL works, but sometimes it caused some issues, when you have a lot of concurrent tasks running continuously. And, not sure I'm correct, but I felt Postgresql has more optimized storage if you have large text data than SQLite, at lea…

Plus, if/when you start caring about HA, it will be easier.

Re: I run multiple $10K MRR companies on a $20/month tech stack

#238

Earlier quoted context omitted.

But then you don't get the benefits of having the DB locally, with in-process access.

It's local to the worker? I don't understand what you mean.

Unless your Cloudflare worker and the DB are scheduled onto the same physical server, they are not local to one another. I don’t know much about D1, but the overwhelming majority of cloud infra makes no such guarantees, nor are they likely to want to architect it in that manner.

Re: I run multiple $10K MRR companies on a $20/month tech stack

#239
post #208

I'm taking the opposite approach - managed services all the way, and my monthly infrastructure costs are higher than what's described here. No regrets. Infrastructure isn't the problem I'm trying to solve. The problem is: who's actually going to pay for this? Optimizing infrastructure before you have customers is like designing a kitchen before you've written the menu. I launched within 72 hours of starting developme…

Some of this will depend on what experience you’ve got. Someone with lots of experience running Linux servers can probably stand up the sort of thing described in this article in a couple of hours from a starting point of being given the Go application source and a credit card.

Re: I run multiple $10K MRR companies on a $20/month tech stack

#240

Earlier quoted context omitted.

Or better yet, go with a euro provider like Hetzner and get 8GB of RAM for $10 or so. :) Even their $5 plan gives 4GB.

They also have servers in the US (east and west coast).

I don't think they offer their cheapest options (CX*) outside of Germany/Finland though. Singapore and USA are a bit pricier.
Post reply on HN