News for hackers. Stuff that matters.
Re:Optimizing Your Web App 100x Is Like Adding 99 Servers by hinkley on Friday November 20, 2020 @11:40PM (#25167907)
The moment the servers need any consensus at all, you've opened the door to Amdahl's law. That could be sharing caches, running Raft, or talking to a transactional store. Even if it's just to keep my UI in sync between the desktop and mobile site, you have costs.

But since so many sites have social aspects now, you need to be able to communicate between accounts, which means interprocess communication.

The Amdahl's law fraction is at least logarithmic to the number of users, but more likely to be proportional to the 'surface area' - sqrt(n). Every new server gets you a little bit less oomph than the one before.

Re:Optimizing Your Web App 100x Is Like Adding 99 Servers by CyberDildonics on Saturday November 21, 2020 @11:05AM (#25170400)
There is basically no overlap with Amdahl's law here. Amdahl's law just says that there are diminishing returns on the whole when increasing parallelization in a program with significant serial parts. It is a fairly obvious observation, but people seem to distort it and apply it to general scalability.

First, everything needs to be synchronized but that doesn't mean synchronization is expensive or blocks computation from happening. Lots of synchronization isn't even dealt with explicitly by users, it happens in queues in the kernel, in networking hardware, or even in the memory controller when talking about reading from memory.

The closest thing is the database becoming a bottleneck, but that is not because of Amdahl's law or even synchronization, it just about reads, and those are extremely parallel, so it likely comes down to total CPU power when it is a problem. That's why query caching can be so effective - it isn't about synchronization and definitely not about serial parts of a program, it is just about usage.

For connected social media sites, not everything has to be done on a page request. Anything done ahead of time is also done in parallel.

Re:Optimizing Your Web App 100x Is Like Adding 99 Servers by hinkley on Saturday November 21, 2020 @12:04AM (#25167968)
And remember, even if we aren't sending more and more data between our users, we're collecting more and more telemetry data from our servers all the time. Coalescing logs and gathering stats requires funneling data from everywhere down to one machine (the one that built the graph)
Re:Optimizing Your Web App 100x Is Like Adding 99 Servers by missblit on Saturday November 21, 2020 @11:00AM (#25170356)
I actually wasn't thinking of social sites when I said "certain workloads".

It's true that every server extra has a bit more overhead because of stuff like caching / load balancing / whatnot, but the amount extra can be tiny even at very large scale. For certain workloads that are parellelizable.

(It'd be fun to talk in details from personal experience instead of in general terms, but you know those pesky NDAs...)