Live data from Hacker News

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

stevehanov.ca

281–290 of 539 posts

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

#281

Earlier quoted context omitted.

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

How do you manage HA?

Backups, litestream gives you streaming replication to the second.

Deployment, caddy holds open incoming connections whilst your app drains the current request queue and restarts. This is all sub second and imperceptible. You can do fancier things than this with two version of the app running on the same box if that's your thing. In my case I can also hot patch the running app as it's the JVM.

Server hard drive failing etc you have a few options:

1. Spin up a new server/VPS and litestream the backup (the application automatically does this on start).

2. If your data is truly colossal have a warm backup VPS with a snapshot of the data so litestream has to stream less data.

Pretty easy to have 3 to 4 9s of availability this way (which is more than github, anthropic etc).

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

#283
post #79

If this sounds like basic advice, consider there are a lot of people out there that believe they have to start with serverless, kubernetes, fleets of servers, planet-scale databases, multi-zone high-availability setups, and many other "best practices". Saying "you can just run things on a cheap VPS" sounds amateurish: people are immediately out with "Yeah but scaling", "Yeah but high availability", "Yeah but backups"…

And now big tech often doesn't even have the high availability to show for all that complexity.

The better availability and scalability of “the cloud” always relied on so many things being done and maintained just right by just the right people that I don’t think it’s ever been broadly true.

You get such a large performance malus and increase in complexity right from the start with The Cloud that it’ starts at a serious deficit, and only eventually maybe overcomes that to be overall beneficial with the right workload, people, and processes. Most companies are lacking minimum two of those to justify “the cloud”.

And that’s without even considering the cost.

What I think it actually is, is a way for companies that can’t competently (I mean at an organizational/managerial level) maintain and adequately make-available computing resources, to pay someone else to do it. They’re so bad at that, that they’re willing to pay large costs in money, performance, and maybe uptime to get it.

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

#285

AWS is not value for money, I do have a DO account that is great but my development is mostly hosted locally with tunnels from cloudflare, it is remarkable how far you (I) can get with that setup.

Last I saw, AWS has way better peering agreements than DO. Lots of problems with terrible throughput and lots of dropped packets for various clients (in several cities in North America, not just overseas or in the middle of nowhere) that vanished instantly on switching to AWS (including overseas ones that were also having problems)

Unfortunately, this isn’t something that shows up on spec sheets when you’re choosing a service. :-/

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

#286

Earlier quoted context omitted.

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.

Cloudflare's Durable Objects puts your Worker and SQLite DB on the same physical server (and lets you easily spawn millions of these pairs around the world).

D1 is a simplified wrapper around DO, but D1 does not put your DB on the same machine. You need to use DO directly to get local DBs.

https://developers.cloudflare.com/durable-objects/

(I am the lead engineer for Cloudflare Workers.)

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

#287
post #268

This is supposed to be a contrarian opinion yet this is a retoric yapped non-stop in the “build in public” community. Of course lean is a good approach, it makes sense, and most engineers know this. Is not a new concept, we’ve been doing this for years in every branch of engineering. The invented “people start with a k8s cluster for 5 users” doesn’t really exist. This is just a story repeated ad nauseam to fit a narr…

> The invented “people start with a k8s cluster for 5 users” doesn’t really exist. Can confirm it exists, especially with founders self-coding with LLMs now.

I recall reading multiple AskHN posts about people trying to get attention from a cloud provider because they ran up thousands of dollars in charges accidentally. I've seen large companies do this too, even if you think something is just a dev environment, its the cloud provider's production environment and they will charge you per their ToS for everything you use, doesn't matter what the customer usage profile looks like.

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

#288

Earlier quoted context omitted.

How do you manage HA?

Backups, litestream gives you streaming replication to the second. Deployment, caddy holds open incoming connections whilst your app drains the current request queue and restarts. This is all sub second and imperceptible. You can do fancier things than this with two version of the app running on the same box if that's your thing. In my case I can also hot patch the running app as it's the JVM. Server hard drive faili…

My understanding is litestream can lose data if a crash occurs before the backup replication to object storage. This makes it an unfair comparison to a Postgres in RDS for example?

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

#289

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…

When creating a VPS on Hetzner, it lets you by default to configure the key auth only.

From memory this is the case on DO as well

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

#290

Earlier quoted context omitted.

Namespaces exist in Linux [0], they weren’t invented by K8s. You can view application logs with anything that can read a text file, or journalctl if your distro is using that. There are many methods of performing application upgrades with minimal downtime. 0: https://www.man7.org/linux/man-pages/man7/namespaces.7.html

Thats true. The reason I like k8s is once you've gone up the learning curve you can apply that knowledge to cloud deployments, on prem, or in this case VPS. The authors stack left me thinking about how will he re-start the app if it crashes, versioning, containers, infra as code. I've seen these articles before... the Ruby on Rails guys had the same idea and built https://kamal-deploy.org/ Which starts to look more a…

I’m thinking even simple containers have automatic restarts. I wouldn’t deploy to prod using ”docker start” but I wouldn’t look askance at someone using “docker compose” for that purpose.
Post reply on HN