Live data from Hacker News

Stop Designing Your Web Application for Millions of Users When You Dont Have 100

darrenhorrocks.co.uk

41–50 of 103 posts

Re: Stop Designing Your Web Application for Millions of Users When You Dont Have 100

#41
post #30

Earlier quoted context omitted.

What is the middle approach in this scenario? What specifically are the templates you refer to?

The middle approach would be implementing the infrastructure in a basic way that is simplistic, but provides benefit and can be expanded.

> The middle approach would be implementing the infrastructure

That's great if you're implementing but it doesn't really work when you're coming in to an existing infrastructure (or codebase) that other people manage.

Re: Stop Designing Your Web Application for Millions of Users When You Dont Have 100

#42

Yes but... Still make some effort to build as if this were a professional endeavor; use that proof of concept code to test ideas, but rewrite following reasonable code quality and architecture practices so you don't go into production with lack of ability to make those important scaling changes (for if/when you get lucky and get a lot of attention). If your code is tightly coupled, functions are 50+ lines long, objec…

[dead]

Re: Stop Designing Your Web Application for Millions of Users When You Dont Have 100

#43

People seriously underestimate the amount of clients you can serve from a single monolith + SQL database on a VPS or physical hardware. Pretty reliable as well, not many moving parts, simple to understand, fast to setup and keep up to date. Use something like Java, C#, Go or Rust. If you need to scale you can either scale vertically (bigger machines) or horizontally (load-balancer). The SQL database is probably the h…

> The SQL database is probably the hardest part to scale Use an ORM and SQLite, I bet you a beer that you won’t hit the perf ceiling before getting bored of your project.

I agree that SQLite is awesome for many use-cases. Running in the same process allows to have a very small latency. No additional server to manage is also a big plus. Concurrency can be an issue with writes though. Plus if you need to scale your backend you can't share the same database.

ORMs are very hit-and-miss for me. Had bad experiences with performance issues and colleagues who don't understand SQL itself, leading to many problems. Micro-ORMs that just do the mapping, reduce boilerplate and otherwise get out of your way are great though.

Re: Stop Designing Your Web Application for Millions of Users When You Dont Have 100

#44
Designing for low latency (even if only for a few clients) can be worth it though. Each action taking milliseconds vs. each action taking sections will lead to vastly different user experiences and will affect how users use the application.

Re: Stop Designing Your Web Application for Millions of Users When You Dont Have 100

#45
Or in other words, you're not Google or Facebook. You almost certainly don't need the level of performance and architectural design those companies need for their billion + user systems.

And it doesn't help that a lot of people seem to drastically underestimate the amount of performance you can get from a simpler setup too. Like, a simple VPS can often do fine with millions of users a day, and a mostly static informational site (like your average blog or news site) could just put it behind Cloudflare and call it a day in most cases.

Alas, the KISS principle seems to have gone the way of the dodo.

Re: Stop Designing Your Web Application for Millions of Users When You Dont Have 100

#47

Yes but... Still make some effort to build as if this were a professional endeavor; use that proof of concept code to test ideas, but rewrite following reasonable code quality and architecture practices so you don't go into production with lack of ability to make those important scaling changes (for if/when you get lucky and get a lot of attention). If your code is tightly coupled, functions are 50+ lines long, objec…

Figure out your data structure definitions early, along with where those structures come from and where they’re going, and write disposable code around them that builds them and gets them where they need to be. Stable data definitions make it easy to replace bits and pieces of your application as you go. Especially if you view mutability not as the default, but as a performance optimization you can reach for if you need it. (You often do not)

Re: Stop Designing Your Web Application for Millions of Users When You Dont Have 100

#48

At a previous job, there was an argument over a code review where I had done some SQL queries that fixed a problem but were not optimal. The other side were very much "this won't work for 1000 devices! we will not approve it!" whereas my stance was "we have a maximum of 25 devices deployed by our only customer who is going to leave us next week unless we fix this problem today". One of the most disheartening weeks of…

> I had to have a multi-day argument over the precise way to define constants in Perl

Couldn't you have used whatever the other person was suggesting even if the change was pointless?

Re: Stop Designing Your Web Application for Millions of Users When You Dont Have 100

#49
post #30

Earlier quoted context omitted.

What is the middle approach in this scenario? What specifically are the templates you refer to?

The middle approach would be implementing the infrastructure in a basic way that is simplistic, but provides benefit and can be expanded.

I mean sure you would want to do that, but the above was very specific situation with existing feature set and an imminent novel problem.

Re: Stop Designing Your Web Application for Millions of Users When You Dont Have 100

#50
post #30

Earlier quoted context omitted.

What is the middle approach in this scenario? What specifically are the templates you refer to?

The middle approach would be implementing the infrastructure in a basic way that is simplistic, but provides benefit and can be expanded.

To spend time on thinking about performance, and then not write the code.
Post reply on HN