The list of devices is known internally to the Ring class as devs. Each item in the list of devices is a dictionary with the following keys:

Table 4.19. List of Devices and Keys
Key Type Description
id integer The index into the list devices.
zone integer The zone the devices resides in.
weight float The relative weight of the device in comparison to other devices. This usually corresponds directly to the amount of disk space the device has compared to other devices. For instance a device with 1 terabyte of space might have a weight of 100.0 and another device with 2 terabytes of space might have a weight of 200.0. This weight can also be used to bring back into balance a device that has ended up with more or less data than desired over time. A good average weight of 100.0 allows flexibility in lowering the weight later if necessary.
ip string The IP address of the server containing the device.
port int The TCP port the listening server process uses that serves requests for the device.
device string The on disk name of the device on the server. For example: sdb1
meta string A general-use field for storing additional information for the device. This information isn't used directly by the server processes, but can be useful in debugging. For example, the date and time of installation and hardware manufacturer could be stored here.

Note: The list of devices may contain holes, or indexes set to None, for devices that have been removed from the cluster. Generally, device ids are not reused. Also, some devices may be temporarily disabled by setting their weight to 0.0.



loading table of contents...