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 run multiple $10K MRR companies on a $20/month tech stack
181–190 of 539 posts
Re: I run multiple $10K MRR companies on a $20/month tech stack
#182> 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... )
Re: I run multiple $10K MRR companies on a $20/month tech stack
#183Earlier 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.
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…
Re: I run multiple $10K MRR companies on a $20/month tech stack
#185Re: I run multiple $10K MRR companies on a $20/month tech stack
#186Re: I run multiple $10K MRR companies on a $20/month tech stack
#187Earlier 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…
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.
Re: I run multiple $10K MRR companies on a $20/month tech stack
#188Earlier 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.
Re: I run multiple $10K MRR companies on a $20/month tech stack
#189Nice 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…
Re: I run multiple $10K MRR companies on a $20/month tech stack
#190Earlier 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.