this post was submitted on 02 Jul 2023
13 points (100.0% liked)

ELI5

569 readers
2 users here now

Explain it to me like I am 5. Everybody should know what this is about.

founded 2 years ago
 

I've heard of this concept multiple times throughout my time on the internet, but I never understood what causes a "server load". Now that I'm in one of the biggest instances on Lemmy, this is one of the significant issues that we face. So what is a "server load", why does it slow down websites instead of stopping them? Does the load on a server increase by the amount of information in it, the browsing of information, or both? Does upvoting and downvoting cause a load too? Does saving posts and comments to your profile also cause a server load?

you are viewing a single comment's thread
view the rest of the comments
[–] GentriFriedRice 3 points 2 years ago

Most modern websites are multiple servers with servers being a specialized computer with no screen that has all the software needed to run the website. Each of these individual computers can each show you the website but it's somewhat random as to which you will connect to when you connect with your web browser (i.e, a request). Having multiple computers able to show you the website is one way software like lemmy is designed to help reduce its load -- often termed load balancing.

To make your website be able to be split between multiple servers you must make it so that they can all access the same information (otherwise with 5 servers a user could only see the content posted to the server they are currently connected to or approximately 20% of the content.) To achieve the data sharing, all of the computers with the software for the website will connect to the same database on a different server. This makes it so all the content is shared across all servers. But now we've introduced a new bottleneck where the database must be updated or read from on every request. This is where this can get slow or even stop when the database is not able to handle all the requests. Typically, a write operation like posting or upvoting is considered more computationally "expensive" than a read operation (e.g. browsing posts or comments). We tend to measure a server's load by its slowest component which is typically data access. Database software is built by some very smart people over time and have a lot of math involved to make them efficient but sometimes software like lemmy can write data in a way that the database algorithm isn't well designed for, making it harder to read the database if you add too much information. Alternatively database software can have inefficiencies appear once enough data is entered in their database.

There is some work that can be done to make load less impactful like: having separate databases for writing and reading and/or cloning data into multiple copies of the database, or designing the way that the data is entered into the database that makes it easy to retrieve.