Skip to main content

mfstopology.cfg

The file that assigns addresses to network locations. The Master Server counts the distance between two machines from this file. That distance decides which copy of a chunk a client is offered first, and, where REPLICATIONS_RESPECT_TOPOLOGY in mfsmaster.cfg asks for it, where replication copies a chunk from. A storage class can also ask for copies to sit in different racks. The file is optional: a network with a single switch, or a network whose layout does not matter, works with this file empty.

IP_ADDRESSES LOCATION_PATH

Addresses​

FormMeaning
*Every address.
n.n.n.nA single address.
n.n.n.n/bAn address class, written as a network address and a number of significant bits.
n.n.n.n/m.m.m.mAn address class, written as a network address and a mask.
f.f.f.f-t.t.t.tAn address range, both ends included.

An address that more than one line covers belongs to the last of them. Lines starting with # are comments.

Location paths​

A location path is a sequence of words separated by |, written from the widest part of your network to the narrowest. Machines that share a path form one rack. An address that no line of the file covers gets the empty path.

Examples​

LineMeaning
192.168.1.0/24 US|CHICAGO|WTOWER|R1AIP addresses can be defined as a network class with number of significant bits.
192.168.2.0-192.168.2.255 PL|WARSAW|GROCHOWSKA|R154IP addresses can be defined as a range of IP addresses.
192.168.3.0/255.255.255.0 123IP address blocks can be defined as a network class with network mask.
192.168.1.1 A|B|CAs a single IP address.