We're implementing matchmaking similar to Source Engine (Team Fortress, Counter-Strike).
Current workflow:
Dedicated Server
- User creates a dedicated server, which calls RegisterGame
- The dedicated server calls RefreshGameServerInstanceHeartbeat
- The server persists until it is shut down or an error occurs (we are not currently calling DeregisterGame)
Client
- Client calls GetCurrentGames, then filters out servers that have not sent a heartbeat within 5 minute
Using this paradigm I've noticed that servers don't appear to clean up after any length of time (and are still returned as valid servers using the GetCurrentGames API.) While I realize this may be intended behavior and that it wouldn't be a problem if all servers were being registered and de-registered cleanly, servers that are not shut down cleanly will still run into this problem.
In a production environment, how do you recommend cleaning up stale servers? I imagine it would be something along the lines of: use the Server API to query for all games once every hour/day(?) and deregister them (can a server be deregistered by something other than itself?.) It would be awfully neat, however, if this functionality were available from the web portal (maybe it does and I haven't found it yet?)
,We're implementing matchmaking similar to Source Engine (Team Fortress, Counter-Strike).
Current workflow:
Dedicated Server
- User creates a dedicated server, which calls RegisterGame
- The dedicated server calls RefreshGameServerInstanceHeartbeat
- The server persists until it is shut down or an error occurs (we are not currently calling DeregisterGame)
Client
- Client calls GetCurrentGames, then filters out servers that have not sent a heartbeat within 5 minute
Using this paradigm I've noticed that servers don't appear to clean up after any length of time (and are still returned as valid servers using the GetCurrentGames API.) While I realize this may be intended behavior and that it wouldn't be a problem if all servers were being registered and de-registered cleanly, servers that are not shut down cleanly will still run into this problem.
In a production environment, how do you recommend cleaning up stale servers? I imagine it would be something along the lines of: use the Server API to query for all games once every hour/day(?) and deregister them (can a server be deregistered by something other than itself?.) It would be awfully neat, however, if this functionality were available from the web portal (maybe it does and I haven't found it yet?)