What does scaling backend code mean for servers? How does that work?

314 viewsOtherTechnology

Hello good fellows.

Recently, the devs for the game Helldivers 2 mentioned that one of the biggest issues they’re facing is that their backend code was not designed to be able to handle the sheer amount of players they’re getting, and that they’re working hard to optimize it.

I understand the broad strokes of what they mean, TLDR things were made with X people in mind, they ended up getting 10X, things are oversaturated. But how can code only work with so many people at a time? I thought it was a matter of hardware resources like RAM or processing power taken by the code per user, but if that were the case I’d imagine just adding more servers would solve the issue, something they’ve stated won’t really help that much in the long run. So I’m left wondering what really goes into scaling that kind of stuff to accomodate for more users.

Thanks in advance.

In: Technology

3 Answers

Anonymous 0 Comments

> taken by the code per user

You’re assuming a linear increase of resources used per user. If your increase is linear it can still be a problem, but that is very decent scaling. However quite often when something hasn’t been thought out for anywhere near the number of users for instance that it gets, there’s a good chance that something somewhere in the system has worse scaling than linear. To take a simple (maybe unrealistic example I dunno)…

Every time a player fires a gun, we need to send a message to every other player this gun was fired.

So if you have 10 players, every time a gun is fired, 10 messages.

With 100 players, every time a gun is fired, 100 messages, BUT guns are also fired 10 times as often so you get in total 100 times more messages, not 10 times more. That would be quadratic scaling.

So that is usually where the problems lay with scalability.

Some part of the system does not scale linearly, or scales linearly up to a point and then quite simply doesn’t at all, etc.

You are viewing 1 out of 3 answers, click here to view all answers.