Knowing when a payload is reserved
After making your payload ready using the Payload Local API
your game server will be waiting to be reserved. IMS zeuz is free to shutdown any ready payload that it doesn't need
(in case of a downscaling operation for example). When you request to reserve a payload on an allocation, IMS zeuz will
choose a ready payload, mark it as reserved and give its details (IP, port, metadata) to your backend (or session manager/matchmaker).
To detect from inside the game server whether your payload has been reserved or not, you can call the
Get Payload Details endpoint of the Payload Local API in
a loop (every second for example) and check the
Detecting when a payload has been reserved is useful for knowing when players are expected to connect or fetching any
session_config that might have been passed during reservation for example.
Ensure your game server exits if no players join the reserved session and once the game is finished. Otherwise, it could end up staying in a Reserved state indefinitely, filling up the allocation buffer with unused reserved payloads.
As a sanity check, we recommend to always do the check even after you receive player connections, this is to avoid false positives, and bad actors trying to connect to arbitrary ports.