Live data from Hacker News

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

stevehanov.ca

181–190 of 539 posts

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

#181

Earlier quoted context omitted.

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

I wonder what percentage of services run on the Internet exceed a few hundred transactions per second.

I think the better question to ask is what services peak at a few hundred transactions per second?

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

#182
post #73

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

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... )

It is insignificant if you're doing 100k queries per day, and you gain a lot for your 3 extra seconds a day.

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

#183

Earlier quoted context omitted.

No it doesn't - it allows a single writer and concurrent READs at the same time.

Thanks! even I run a sqlite in "production" (is it production if you have no visitors?) and WAL mode is enabled, but I had to work around concurrent writes, so I was really confused. I may have misunderstood the comments.

Writes are super fast in SQLite even if they are not concurrent.

If you were seeing errors due to concurrent writes you must adjust BUSY_TIMEOUT

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

#184

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

ORDERS OF MAGNITUDE NEWS

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

#187

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…

> SQLite on the same machine is akin to calling fwrite.

Actually 35% faster than fwrite [1].

> This is also a system constraint as it forces a one-database-per-instance design

You can scale incredibly far on a single node and have much better up time than github or anthropic. At this rate maybe even AWS/cloudflare.

> you need to serve traffic beyond your local region

Postgres still has a single node that can write. So most of the time you end up region sharding anyway. Sharding SQLite is straight forward.

> 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

It's actually pretty good for running a real time multiplayer app with a billion datapoints on a 5$ VPS [2]. There's nothing clever going on here, all the state is on the server and the backend is fast.

> but you're now compelled to find "clever" strategies to sync state across nodes.

That's the neat part you don't. Because, for most things that are not uplink limited (being a CDN, Netflix, Dropbox) a single node is all you need.

- [1] https://sqlite.org/fasterthanfs.html

- [2] https://checkboxes.andersmurphy.com

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

#188
post #146

Earlier quoted context omitted.

$15 is not exactly zero, is it? If you don't need more than 1GB, why pay anything for more than 1GB? I recall running LAMP stacks on something like 128MB about 20 years ago and not really having problems with memory. Most current website backends are not really much more complicated than they were back then if you don't haul in bloat.

Saving 15 USD on 10k+ USD MMR is ridiculous.

Saving 15 USD on 0 USD MMR while still building the business is priceless. Virtually infinite runway.

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

#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!

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

#190
post #88

Earlier quoted context omitted.

$15 is not exactly zero, is it? If you don't need more than 1GB, why pay anything for more than 1GB? I recall running LAMP stacks on something like 128MB about 20 years ago and not really having problems with memory. Most current website backends are not really much more complicated than they were back then if you don't haul in bloat.

There’s a happy medium and $5 for 1GB RAM just isn’t it.

Be sure to inform the author of the article who is currently making money on his 1GB VPS that he hasn’t found a happy medium
Post reply on HN