DocsHostingMaster servers

What a master does

Master servers are how the Server Browser finds community servers, and how players reach servers behind routers. No single one holds the list: every server reports to three default masters, masters share their listings and the masters they know, servers turn to backup masters when the ones they report to are down, and anyone can run one. A master needs no game files, only the Project Reclaimer program.

Work in progressEarly development build. What this page describes may still change.

0game files a master needs
49175the port to open, on TCP and UDP
60 sbetween two masters sharing what they know
0game traffic through a master

A master server is a small program that listens on one port number, 49175 by default, for two things:

  • On TCP, a plain HTTP service that keeps a list of where servers are. A listing is one server's game address, such as 203.0.113.4:49176, its network key, the master that introduces players to it, and when it expires, signed with the server's key. A listing holds no name, map or players. A master holds up to 9,999 listings.
  • On UDP, the rendezvous. Servers register their game socket here, players ask to be introduced to a server behind a router, and anyone can ask where their router shows them (STUN). Playing games also say here which server they play on, which is how a master counts a server's players. See introductions and STUN.

The Server Browser reads two masters at a time and merges their lists, giving each 1.5 seconds to take the connection and 2.5 seconds to answer, so a master far away or a lost packet doesn't leave the list empty. Then it asks every listed server, on the server's own game port, what it's playing: its name, map, game type, players, mods and Project Reclaimer version. It measures the ping on the way. So what players see comes live from each server, not from a master, and a server that doesn't answer is left out.

How listings travel between servers, masters and players A dedicated server reports its listing to the three default masters and to its own machine's master; a game hosted online reports to the default masters, and to a community master as a backup while they are down. The masters share listings and the masters they know every 60 seconds. The Server Browser reads the default masters two at a time, and the other masters only when the default ones can't be reached or list nothing, then asks each server directly what it's playing and measures its ping. SERVERS MASTERS PLAYERS backup share listings and masters every 60 s asks each server what it's playing, and its ping, on the server's game port Dedicated server with a master on its machine Online game hosted from Host Game Default masters every server reports to all three Host's master beside dedicated servers Community master run on its own Server Browser reads several masters, then asks each server
  • Servers report their listing
  • Backup while every default master is down
  • Masters share
  • The browser reads masters
  • The browser asks each server

Four masters are built into every game: three public ones, at http://148.251.153.44:44340, http://master.ibigs.us:44340 and http://23.159.176.140:44340, and http://127.0.0.1:49175, a master on the player's own PC, such as the one a dedicated server setup runs. The three public ones are the default masters: every listed dedicated server reports to all of them, and each holds every server's listing, so while one is down, servers stay listed and players still see them. The second of them runs on two machines behind its one address: when one machine stops, the other answers as the same master. It is looked up by its name first, and a game whose lookup fails or is filtered goes to the address it was built with (75.98.127.228), so a broken DNS doesn't hide it; a master named both ways is asked once.

Players can change that list under Settings → Online services → Master servers, up to 64 masters. A refresh reads the master on the player's own PC and the first two others on the list together, and the next one only in the place of one that didn't answer: the default masters swap their listings, so two of them hold every server and the list is the same with fewer requests. Whenever one of them returns valid listings, the browser uses only those. It turns to other masters, the ones it learned, only when none on its list can be reached or none lists a valid server; see when a master goes down. Favorites are asked directly at every refresh.

While its masters list servers, each refresh also checks two other masters, without using their listings, so the browser keeps a list of masters that answer for when its own are down; see how masters share.

Masters and the stats service speak plain HTTP on purpose: a listing is public, and it's signed by the server that made it. A master address is always http://host:port; the game refuses https:// for one.