Documentation

Support

Multiplay Hosting

Multiplay Hosting

Monitor for configuration variable changes

Track when configuration variables are modified in your servers.
Read time 1 minuteLast updated 3 days ago

Each game server build must monitor the
server.json
file
for configuration variable changes. For example, when you allocate a server instance, the IP address, port number, and game mode might contain different values from the previous allocation.

Monitor allocation ID changes

Each game server instance must detect its allocation ID by monitoring the value of the
allocatedID
configuration variable in the
server.json
file. The
allocatedID
variable value changes each time you allocate or deallocate the server instance. Game server builds also monitor the
server.json
file to detect its allocation status and its allocation ID.

Container builds

If you're using a container build, the
server.json
file is already mounted into your container. You can find the
server.json
file location by checking the container's home environment variable.
  • For Linux containers, it's in the
    $HOME
    environment variable.
  • For Windows containers, it's in the
    $HOMEPATH
    environment variable.

Best practices

The recommended way monitor changes to the
server.json
file depends on the game engine your game is built on.

Game engine

Best practice

Unity EngineGame Server SDK for Unity
Unreal EngineGame Server SDK for Unreal
Custom engine
inotify

Unity Engine

If your game is built using Unity, the recommended way to monitor for configuration variable changes is to use the Game Server SDK.

Unreal Engine

If your game is built using Unreal Engine, the recommended way to monitor for configuration variable changes is to use the Game Server SDK.

Custom engine

If you’re using a custom game engine, the recommended way is to use
inotify
to detect
CLOSE_WRITE
events. For an example of what a
CLOSE_WRITE
event looks like, refer to the following
inotify
log sample.
MODIFY server.jsonOPEN server.jsonOPEN server.jsonCLOSE_NOWRITE,CLOSE server.jsonMODIFY server.jsonCLOSE_WRITE,CLOSE server.jsonOPEN server.jsonACCESS server.jsonCLOSE_NOWRITE,CLOSE server.json