question

aaron@regression.gg avatar image
aaron@regression.gg asked

Multiple/Many Containers for One Multiplayer Server

Is it possible to create a multiplayer server that consists of multiple containers? For example, for my game, a "match" is run by 3 different Docker containers which communicate with one another. Is this possible, or would I instead want to have one docker container that has 3 docker containers running within it?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Dimitris-Ilias Gkanatsios avatar image
Dimitris-Ilias Gkanatsios answered

@aaron@regression.gg at this point we don't support privileged containers, due to security concerns. Generally, having more than one container on the same game server session host has an impact on the way we manage game server lifecycle, e.g. how can you determine which of the containers is the game server and how do you know when the game server has ended? Curious on the game engine/architecture you are using btw, can you share more?

Potential solutions for your scenario:

- include all processes on the same container engine and manage them via a utility like supervisord

- utilize alternative technologies, like PlayFab/thundernetes: Thundernetes makes it easy to run your game servers on Kubernetes (github.com) (disclaimer, this project is in Beta). Still, this is less "managed" than PlayFab so it's probably not what you want

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Gosen Gao avatar image
Gosen Gao answered

Since the Docker Containers in a single VM are created base on your server build configuration and they are all the same, so it is not possible to create a multiplayer server that consists of multiple different containers. I am not an expert on Docker, if you can create docker containers inside a container, you can have a try. It is recommended to implement all server logic in a container.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

aaron@regression.gg avatar image aaron@regression.gg commented ·

I see, thanks @Gosen Gao. It seems that Docker within Docker is possible with a privileged container, enabled by running Docker with the --privileged command. Any idea if this is possible with Playfab?

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.