Fallback and trust
When a master goes down
The three default masters are the places every dedicated server reports to and every game knows. Each holds every listing, so while one is down, the Server Browser reads the next one in its place and nothing changes for players or hosts. The network is built to keep working without all of them, too.
For players
- When no master on a player's list answers with a valid listing, the browser asks the masters it remembers, up to 12 in a refresh, six at a time. Those masters hold the listings servers sent them and the ones they swapped with other masters.
- The line under the server list counts the masters that answered, and says Limited discovery: fewer than two sources reachable. when fewer than two did.
- Favorites are asked directly at every refresh, so they show up even when no master lists them.
- The browser learns other masters from community masters on its list, not from the default ones. A game whose list holds only the defaults knows no others. Adding one by hand fixes that, which is where a community's own master helps: share its address.
- The browser reads a master on the internet only when the master says it lists just the servers that answered it. One that doesn't, because it hasn't been updated or runs with
--unverified, is counted as not answering. A master on the player's own PC or network is always read.
For servers
- A master's answer to a server's report names other masters it knows, starting at a random one, so different servers learn different masters. It only names masters the server's players can reach.
- While none of the masters a server reports to takes its listing, the server also reports it to three of those learned masters, every 30 seconds. One that stops answering is replaced, and one that failed is tried again only when no untried master is left.
- A master on the server's own machine counts: with one running, it always takes the listing, so that server doesn't turn to backups even while every default master is down. Add community masters to
[master] peersto have it reported to them anyway. - A master on the server's own machine or network never decides the address players join at: what it sees is a local address, and only an address the internet reaches is listed. In 0.10.11 a server that ran its own master with no
public_addresscould be missing from the public masters; from 0.10.12 it is listed on them again, at an address players can reach. - A game hosted online from the game starts with the masters that PC's Server Browser remembers, so one started during an outage is listed through those.
- Once a master it reports to takes the listing again, the server goes back to those alone, and the backups' copies expire within 3 minutes.
The server's log says when it starts and stops using backups:
[h3list] no default master took this server's listing; reporting it to http://…, http://…, http://… until one does
[h3list] a default master takes this server's listing again
If the server hasn't learned any masters yet, the first line ends in no other master is known yet instead. Every master keeps a copy of the listings it hears about, so each master someone runs is one more place the Server Browser can find servers while the default masters are down.
What a master can't do
A master can't
Change a listing's address or make it last longer. Let anyone into a server: players join the server itself, and its key is checked. See what happens in a game, or who plays: it holds addresses and keys, and counts how many players each address says it has on a server. Carry any game traffic. Hand out an address players can't reach: one on a player's PC (127.0.0.1) or local network (192.168.x.x) only goes to players on that PC or network.
A master can
Leave listings out, by address or by name or for no reason, hand out a listing again until it expires, or, if it's a bad one, list addresses nobody hosts. The browser asks at most 9,999 servers per refresh and at most 32 on one IP address, so a bad master can't aim players' browsers at anyone. Like any web server, it sees the IP address of everyone who reads it. Its UDP side also sees the address and port of every server that registers and of each player who asks it for an introduction or a STUN answer, and which server each playing game on its list of masters says it's on.
What a server says it's playing comes from the server itself. Signatures prove a listing wasn't changed on the way, not that its host is honest. See Legal & privacy for what the default masters and servers see.
