How do community servers work?

This is more of a design question than a technical question.
I wish to know about how community servers are created in modern AAA games.

Let’s take the example of Battlefield to understand my question.

So basically, Battlefield is a multiplayer shooter.
It provides you an option to either scroll through a global list of active games, or create your own community server.

In the first option, you can simply click Join on an available game, and you are transported to a map where other players would also be present.

In the second option, you can create your own game, and let players across the globe find your game and join it. Here, you have the freedom to choose the game mode, match settings, etc.

Some other multiplayer also give you the option to shared an ID with your friends or invite them via an online platform, or in-game to join the game you just created.

I wonder how is this all designed.

What happens when we create a Community Server?
Let’s imagine I tried to replicate Battlefield’s multiplayer setup for session management with UE4, where should I start?

I have some basic technical understanding of UE4 Networking, like dedicated serves, online platforms, replication, session creation, joining, etc. but I am very confused about how do I create a server, that everyone with an instance of my game can connect to,
and each individual player has the ability to create their own game, that everyone else can find and join, but the authority of the newly created game should be on the server (so the game doesn’t end if the creator disconnects).

(A few weeks ago, I read a post about a question similar to this, and one responder replied saying that we could make the game launch a new instance of a server every time a new community game was created…, is there a hint in this answer? )

I would love to get some insights on how I could achieve this.

Battlefield’s Server/Network Architecture (as of BF1, BFV and the coming 2042) is pretty complex. They use Amazon Web Services to spin up “Instances” on demand. At each “Regional” datacenter they have a full bare metal rack that manages game instances. The spin up/down etc of servers (VM game instances). These racks are managed by i3D. TitanFall 2 has a very similar setup that’s managed by Multiplay.

Custom/Community servers are handled through one of the regional server manager racks. You input your settings via the UI. On Submit your regional SM receives, validates and spins up an instance if there’s availability.

To recreate this setup you’ll need to create a custom application (C#/C++) that runs on a management server. Software’s primary job will be to “listen” for requests and spin up instances.

Your game itself will need to have some level of direct communication (Request/Listen only) with said software running in the current region.

Layman’s basics: Game sends a json request to your SM software. It processes the request, validates it, and executes a spin up…or optionally a Windows (OS) Run As Service command to initiate a new instance of the game on a physical box.

Check out Fire Daemon

2 Likes

Here’s a simple overview of the network topology.

Clients have a strict limited connection with the backend. This could be eliminated (better security) by routing all communication through the Local Server Manager. SM can validate before routing.

Essentially when a client starts the game a connection can be established between the local SM (closest via ping).

Server Manager: Manages game server instances, Game Rack, Communication with Backend (end game stats etc). Game Instances would report directly to it or through the Game Rack.

1 Like

I have one last question.

Your game itself will need to have some level of direct communication (Request/Listen only) with said software running in the current region.

Would this be embedded within the game itself? or would that be an independent process?

So it is a lot more complicated than I imagined, and it goes without saying it would be very expensive for an indie dev.
Nonetheless, this gives me a good idea of how things work.
Thanks for sharing!

You likely won’t be able to afford building a system like battlefield has, much less keeping it running.

For an indie game it makes a lot more sense to build on players either hosting listen servers from their game or running their own dedicated servers - and then using the EOS subsystem in 4.27 to tie it all together and keep track of sessions, handle connecting, etc.

1 Like

Yes, this communication would be embedded in the game itself.

This is something I would look at doing once the game is released and builds a solid player base. I wouldn’t waste any resources on it until it could pay for itself.