Mirror network
Documentation for Mirror network
Read time 3 minutesLast updated 4 hours ago
Clanforge uses a network of machines called the mirror network to distribute game images and game image updates. The mirror network is a hierarchy of machines that distribute game images and game image updates from build machines across the globe to make updates readily available for fleet machines. It's designed to make game images highly available in each location you have machines. By distributing game image updates through a hierarchical network only when necessary, the mirror network reduces the time it takes for machines to download updates, which is important for spinning up new cloud machines in response to spikes in players.
Moving parts
The moving parts involved in the mirror network include:- The primary mirror
- The local mirrors
- The build machine
- The fleet machines
- One or more game images
Primary mirror
A primary mirror machine is a top-level machine in the mirror network that holds a copy of every game image. If the local mirror of a location is unavailable or down, fleet machines can get game images and game image updates from the primary mirror.Local mirrors
A local mirror is a machine in the mirror network that hosts game images for the fleet machines in a specific location.Build machine
A build machine is a dedicated machine for deploying and testing configuration changes, game images, and game image updates. In a typical setup, it isn’t possible for a matchmaker to use a build machine to fulfill an allocation. Scaling configurations and fleet settings don't apply to build machines because they exist outside of any fleets.Fleet machines
A fleet machine is a machine within a fleet that hosts game servers. Fleet machines use game images to create game binaries to create game servers. The game images installed on each fleet machine is determined by how the machine was provisioned and the profiles the machine can use for game servers. Profiles are sets of configuration information that tell game servers how to run and which game image to use.Game images
A game image is a collection of all the files necessary for you to run an instance of your game as a game server on a machine. Game images can be full images or partial images, and are used by fleet machines to create game server binaries that can run game servers.Game image distribution
When you update a game image on a build machine and deploy it to the mirror network, it goes to the local mirror closest to the build machine and to the primary mirror machine. The primary mirror machine holds a copy of each game image you’ve ever deployed. This way, if a fleet machine doesn’t have a local mirror or the local mirror is temporarily unavailable, it can send a request up the mirror machine chain, and retrieve the game image from the primary mirror machine.

