How to Scale a System from 0 to 10M+ Users
57 points
2 hours ago
| 7 comments
| blog.algomaster.io
| HN
Nextgrid
34 minutes ago
[-]
Good post in general but some caveats:

1) His user numbers are off by an order of magnitude at least, as other comments have mentioned. Even a VM/VPS should handle more, and a modern bare-metal server will do way more than the quoted numbers.

2) Autoscaling is a solution to the self-inflicted problem of insanely-high cloud prices, which cloud providers love because implementing it requires more reliance on proprietary vendor-specific APIs. The actual solution is a handful of modern bare-metal servers at strategic locations which allow you to cover your worst-case expected load while being cheaper than the lowest expected load on a cloud. Upside: lower prices & complexity. Downside: say goodbye to your AWS ReInvent invite.

3) Microservices. Apparently redeploying stateless appservers is a problem (despite the autoscaling part doing exactly this in response to load spikes which he's fine with), and his solution is to introduce 100x the management overhead and points of failure? The argument about scaling separate features differently doesn't make sense either - unless your code is literally so big it can't all fit in one server, there is no problem having every server be able to serve all types of requests, and as a bonus you no longer have to predict the expected load on a per-feature basis. A monolith's individual features can still talk to separate databases just fine.

reply
yomismoaqui
2 minutes ago
[-]
The best descripcion of microservices comes from "The Grug Brained Developer" (https://grugbrain.dev/):

"grug wonder why big brain take hardest problem, factoring system correctly, and introduce network call too

seem very confusing to grug"

reply
mbb70
17 minutes ago
[-]
As is often stated, microservices is a solution for scaling an engineering org to 100s of developers, not for scaling a product to millions of users.
reply
steveBK123
4 minutes ago
[-]
Unfortunately that message was way way behind the bombast of "microservices everywhere now" that preceded it for years, to the detriment of many small orgs.

I've seen engineering orgs of 10-50 launch headlong into microservices to poor results. No exaggeration to say many places ended up with more repos & services than developers to manage them.

reply
withinboredom
25 minutes ago
[-]
And to add to this: virtually every programming language allows you to define multiple entry points. So you can have your workers in the exact same codebase as your api and even multiple api services. They can share code and data structures or whatever you need. So, if you do need this kind of complexity with multiple services, you don’t need separate repos and elaborate build systems and dependency hell.
reply
CrzyLngPwd
3 minutes ago
[-]
Echoing what others have said about the numbers being off.

I ran a 10k user classic ASP service on a VPS from Fasthosts, with MySQL 5.6 and Redis, and it was awesome.

reply
kylecazar
14 minutes ago
[-]
Nice for traditional apps. I'm currently working with a client on an Elixir backend. Some aspects of the tier progressions transfer, but the BEAM diverges a bit (no external queues/redis, scaling direction). I am enjoying it.
reply
efilife
7 minutes ago
[-]
This post shows some signs of having its parts written by a LLM in my opinion. Or am I crazy? Please tell me that I am.

Author having this on his github makes me even more suspicious: https://github.com/ashishps1/learn-ai-engineering

reply
tallytarik
3 minutes ago
[-]
It’s entirely written by an LLM.
reply
olayiwoladekoya
2 hours ago
[-]
I really enjoyed reading this. Much like Instagram, which had thousands of users sign up on the first day, if you aren't able to scale because of your skill level, wouldn't that affect usage and lead to comments like: 'The app/site is so slow'?
reply
lesuorac
1 hour ago
[-]
Aren't comments like "the site is too slow" similar to "the city is too crowded"?

Twitter famously had a "fail whale" but it didn't stop the company from growing. If you have market demand (and I guess advertising) then you can get away with a sub-optimal product for a long time.

reply
alexfoo
53 minutes ago
[-]
> Twitter famously had a "fail whale" but it didn't stop the company from growing. If you have market demand (and I guess advertising) then you can get away with a sub-optimal product for a long time.

Agreed, but there's still an element of survivorship bias there. Plenty of companies failed as they couldn't keep up with their scaling requirements and pushed the "getting away with a sub-optimal product" for too long a time.

reply
jstanley
43 minutes ago
[-]
Do you have some good examples?
reply
smallnix
35 minutes ago
[-]
This touches the toupet fallacy: "I never saw a large company fail to grow large because of deferred scaling"

Friendster might fit though: https://highscalability.com/friendster-lost-lead-because-of-...

reply
daitangio
57 minutes ago
[-]
I agree. Go fast with a suboptimal architecture. If success arise, throw away version 1 and rebuild from scratch. Often is more effettive.
reply
paulnpace
1 hour ago
[-]
Reddit is still around.
reply
arter45
57 minutes ago
[-]
It depends on the adoption model.

If it’s just “sign up any time you want and go”, yes, it can go that way.

If it’s “join that waiting list” or “book a call” (for KYC purposes or whatever), you have a buffer.

If user count is more or less constant (most internal websites, for example), it’s probably not an issue.

And so on.

reply
littlestymaar
1 hour ago
[-]
Not criticizing the core idea, which is sound (don't waste ressource overengineering at the beginning, evolve your architecture to match your actual scale as you grow), but the “number of users” figures in this post are completely nonsensical. You ought to multiply them by 100 (if you're being conservative) or even 1000 (depending on the consumption pattern for the user).

Modern hardware is fast, if you cannot fit more than 100 users (not even 100 concurrent users) on a single $50/month server, you're doing something very very wrong.

Even repurposed 10 years old fairphone[1] can handle more than that.

[1]: https://far.computer

reply
the8472
1 minute ago
[-]
[delayed]
reply
maccard
11 minutes ago
[-]
You and another person made this point _but_ I’d encourage you to look at what $50/mo gets you on AWS all in. In reality it will get you a t4g.small plus 200GB of (very slow) storage. Honestly they start to chug at 500 or so users in my experience.
reply
don_neufeld
1 hour ago
[-]
Agreed, the numbers were shockingly low.
reply
louismerlin
1 hour ago
[-]
Amazing to see my little phone pop up randomly on hacker news :D

Thank you stranger.

reply
jbrooks84
53 minutes ago
[-]
Nice read
reply