Handoff and failover
A lobby can move to another server process with nobody dropped. A standby, a second server process, joins the lobby as a member with no player, and the players' games take it as their host when the server leaves or goes down, the way they follow a new host in a game a player hosts. Players need nothing new, and read SELECTING NEW HOST…, then CONNECTING TO NEW HOST… over the wait.
A planned handoff
Use it for an update, new content, a setting that needs a new process, or leaving a machine, instead of waiting for the server to empty. On the remote console:
Shell
project-reclaimer dedicated rcon handoff 203.0.113.4:49186
project-reclaimer dedicated rcon handoff status
- Type an address of this machine and a free port, such as
handoff 192.168.1.20:49301: the machine's address on your network, not the router's.dedicatedstarts the standby there by itself and looks after it from then on. This server's ownpublic_addresswith a free port works too. Any other address starts no standby here: the reply says so, and the server waits 60 seconds for one started there by hand. - Set
public_addresswhen players come from the internet and the standby's port is forwarded like the server's own, so they are told the standby at that address. Without it, each player's game tries every address it knows for the standby, and players behind a router find the new server themselves. - The standby reads the same configuration, joins, and must say it's ready within 60 seconds: the same build, with every map of the playlist. The move then waits for the lobby, never the middle of a game or a countdown.
- It carries the playlist's place, the next-game and join queues, the console's live settings, mutes, and players' names and split-screen seats. The old server stops once its players have moved.
- A handoff that fails before the move, such as a standby that never gets ready, changes nothing for the players: the log says
handoff failedwith the reason.handoff cancelstops one that hasn't moved yet. - The new server lists itself under the lobby's name. Its address is the standby's, so players who join by address need the new one, and a forward for the server's port alone needs the standby's port forwarded too. The next game's fresh server returns to the configured port.
- Players stay in the game as the lobby moves, and a server can hand over again and again. This is new in 0.10.12 and has been tested with a few players. Players on 0.10.11 and earlier still leave when a server hands over, so update the server with its players.
- The standby never takes a player's place: while one is named, the server keeps its place free (see up to 127 players).
Failover
With failover, a standby waits in the lobby all the time, and takes it over if the server goes down:
dedicated.toml
[[server]]
name = "Community Rotation"
port = 49176
playlist = "playlists/community.playlist.json"
failover = "203.0.113.4:49186" # where its standby runs
failover_in_game = false # true: the standby stays through each game
- Between games, players' games notice the server is gone after about 22 seconds and follow the standby, which carries on with the playlist.
- During a game, the standby isn't there by default: it leaves as each game starts and comes back in the next lobby. A server that dies mid-game then drops its players, as one without a standby does.
failover_in_game = truekeeps the standby through each game, so it can take a game in play over and the round plays on. It then loads every map with the players and holds a whole game's memory: about 1 GB or more per lobby, where a standby in the lobby holds about 0.6 GB. What the old server counted of that round isn't carried over, and the new server reports the game's results from its own end.failoverapplies at once, in[defaults]or a[[server]], and the console'sfailover set,failover clearandfailover statuschange and show it live.failover_in_gamecounts from the next game.- A standby on another machine needs its own
public_address, so players on the internet can be introduced to it. - With no standby reachable, a lost server drops its players as before, and the log says
failover: no standby joinedwith why. - On classic networking a lobby moves within 17 machines: the server, the standby and 15 players' PCs. Enhanced networking moves bigger ones.
