Process cleanup
At the end of a game session, we recommend you use one of the following two methods to “clean up” and prepare the game server for the next session.
-
Return to a lobby or a ready state.
-
Exit the process gracefully (e.g., exit code 0), then restart the process to a ready state.
Returning to the lobby (or a ready state) is preferable to restarting the game server process. Terminating the game server process at the end of a match lends itself to less optional resource usage because it’s typically more expensive to restart a process than it is to clean up a process.
Executable names
We specify the name of your executable on our back end to allow our system to locate your binary at startup. If you change the name of your binary files, you must let us know. Otherwise, your server instances won’t start correctly.
Ports
We don’t block any ports on our platform; however, we reserve ports 8080 through 8085 for our service binaries.
UUIDs
If you want to use allocations for backfill requests, you must configure your binary to read Session ID from a file (e.g., serverconfig.json
) on an event trigger. You can configure our matchmaker to use any JSON formatted file by specifying it at startup with the -serverjson=<file>
command-line argument.
Event triggers vary by across operating systems. If you’re running your game server on a Linux-based operating system, we recommend using inotify. If you’re running your game server on a Windows-based operating system, we recommend using findfirstchangenotification.
Alternatively, you can continuously poll the file for changes, but we do not recommend this because it can lead to performance issues.
Child processes
We advise against starting additional programs (e.g. DataDog, Filebeat) as child processes beneath your game server process. Starting third-party programs in this way increases the likelihood of rouge processes that consume unnecessary compute power if your game server process crashes without initializing garbage collection operations.
Game image format
If you plan to use a service such as AWS S3, Google Cloud, or Steam to update your game image, we recommend uploading your game image as loose files to ensure that the server instances run as expected after updating your fleet machines.
Comments
0 comments
Article is closed for comments.