Live data from Hacker News

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

stevehanov.ca

161–170 of 539 posts

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

#161
post #83
post #73

Earlier quoted context omitted.

Looks like the overhead is not insignificant: Running 100,000 `SELECT 1` queries: PostgreSQL (localhost): 2.77 seconds SQLite (in-memory): 0.07 seconds ( https://gist.github.com/leifkb/1ad16a741fd061216f074aedf1eca... )

I love them both too but that might not be the best metric unless you’re planning to run lots of little read queries. If you’re doing CRUD, simulating that workflow may favor Postgres given the transactional read/write work that needs to take place across multiple concurrent connections.

> I love them both too but that might not be the best metric unless you’re planning to run lots of little read queries.

Exactly. Back in the real world,anyone who is faced with that sort of usecase will simply add memory cache and not bother with the persistence layer.

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

#162

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…

About security, wall of shame story, Once I had Postgresql db with default password on a new vps, and forgetting to disable password based login, on a server with no domain. And it got hacked in a day, and was being used as bot server. And that was 10 years ago. Recently deployed server, and was getting ssh login attempts within an hour, and it didn't had a domain. Fortunately, I've learned my lesson, and turned of p…

Nothing would happen, ssh is designed to be open to the world. Using tailscale or a vpn to hide your IP is fine, but using tailscale ssh maybe not.

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

#163
post #150

Earlier quoted context omitted.

A devops coworker found my blog and asked me how I host it, is it Kubernetes. I told him it's a dedicated server and he seemed amazed. And this was just a blog. It's real

Does your coworker run a blog on k8s?

None of them self host anything at all. It's like that skill was totally skipped. But they advise and consult on infra

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

#164

Earlier quoted context omitted.

Why are you comparing PostgreSQL to an in-memory SQLite instead of a file-based one? Wow, memory is faster than disk, who would have thought?

Because it doesn't make a difference, because `SELECT 1` doesn't need to touch the database: Running 100,000 `SELECT 1` queries: PostgreSQL (localhost): 2.71 seconds SQLite (in-memory): 0.07 seconds SQLite (tempfile): 0.07 seconds ( https://gist.github.com/leifkb/d8778422d450d9a3f103ed43258cc... )

> Because it doesn't make a difference, because `SELECT 1` doesn't need to touch the database:

I hope you understand that your claim boils down to stating that SQLite is faster at doing nothing at all, which is a silly case to make.

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

#165

> I bought a GitHub Copilot subscription in 2023, plugged it into standard VS Code, and never left. I tried Cursor and the other fancy forks when they briefly surpassed it with agentic coding, but Copilot Chat always catches up. > Here is the trick that you might have missed: somehow, Microsoft is able to charge per request, not per token. And a "request" is simply what I type into the chat box. Even if the agent spe…

Thanks for the downvote kind stranger. Not sure what I said to qualify

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

#166

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…

> Also avoid their object store. Curious as to why you say this. I’m using litestream to backup to Hetzner object storage, and it’s been working well so far. I guess itt’s probably more expensive than just a storage box? Not sure but I also don’t have to set up cron jobs and the like.

Historical reliability and compatibility. They claimed they were S3 compatible, but they were requiring deprecated S3 SDKs, plus S3 advanced features are unimplemented (but at least they document it [0]). There was constant timeouts for object creation and updates, very slow speeds and overall instability. Even now, if you check out r/hetzner on reddit, you'll see it's a reliability nightmare (but take it with a grain of salt, nobody reports lack of problems). Not as relevant for DB backups, but billing is dumb, even if you upload a 1KB file, they charge you for 64KB.

At least with Storage Box you know it's just a dumb storage box. And you can SSH, SFTP, Samba and rsync to it reliably.

[0] https://docs.hetzner.com/storage/object-storage/supported-ac...

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

#167
post #128
post #95

Earlier quoted context omitted.

NVME read latency is around 100usec, a SQLite3 database in the low terabytes needs somewhere between 3-5 random IOs per point lookup, so you're talking worst case for an already meaningful amount of data about 0.5ms per cold lookup. Say your app is complex and makes 10 of these per request, 5 ms. That leaves you serving 200 requests/sec before ever needing any kind of cache. That's 17 million hits per day in about 3.…

You won't get such numbers on a $5 VPS, the SSDs that are used there are network attached and shared between users.

Not quite $5, but a $6.71 Hetzner VPS

    # ioping -R /dev/sda

    --- /dev/sda (block device 38.1 GiB) ioping statistics ---
    22.7 k requests completed in 2.96 s, 88.8 MiB read, 7.68 k iops, 30.0 MiB/s
    generated 22.7 k requests in 3.00 s, 88.8 MiB, 7.58 k iops, 29.6 MiB/s
    min/avg/max/mdev = 72.2 us / 130.2 us / 2.53 ms / 75.6 us

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

#169

> 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…

Thats just swapping another enterprise focused concern into the mix. Your database connection latency is absolutely not a concerning part of your system.

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

#170

Earlier quoted context omitted.

Because it doesn't make a difference, because `SELECT 1` doesn't need to touch the database: Running 100,000 `SELECT 1` queries: PostgreSQL (localhost): 2.71 seconds SQLite (in-memory): 0.07 seconds SQLite (tempfile): 0.07 seconds ( https://gist.github.com/leifkb/d8778422d450d9a3f103ed43258cc... )

> Because it doesn't make a difference, because `SELECT 1` doesn't need to touch the database: I hope you understand that your claim boils down to stating that SQLite is faster at doing nothing at all, which is a silly case to make.

The original claim being discussed is about the overhead of an in-process database vs. a database server in a separate process, not about whether SQLite or PostgreSQL have a faster database engine.
Post reply on HN