How Clients Connect to the Replica

Provides an overview of what Replicas are, and how data-fabric clients connect to them.

When a client connects to the data-fabric cluster for I/Os, the client is directed to the replica with the shortest distance. To calculate the distance, every client is given a specific path based on whether the client is connecting from within the cluster or from outside the cluster.

For clients connecting from outside the cluster, because the topology is unknown, and data-fabric defines the path based on the topology configured in the CLDB configuration property (cldb.default.node.topology), the default rack (which is hard-coded as default-rack), and the client IP address. For example, suppose the client IP address is and the value for the CLDB configuration property is default_topo. The client topology (or path) is: /default_topo/default_rack/

For clients on the cluster, the client node has a known topology and the path is built based on that topology, rack, and the client IP address. For example, suppose the client IP address is and the client node topology is /topo1/rack1, the client path is: /topo1/rack1/

Assume the following node topology:

For the client connecting from outside or within the cluster, the replica that the client connects to is calculated based on the client’s node topology (or path) and the distance between the nodes on the cluster. When trying to find the nearest replica, the system does a distance calculation based upon how far away the replica is from the data-fabric client looking for the replica and chooses the replica with the shortest topology or least number of hops from the client node. In the above example, the client connecting from:

  • Outside the cluster with the path /default_topo/default_rack/ will connect to replica2
  • Within the cluster with the path:
    • /topo1/rack1/ will connect to replica1
    • /topo1/rack2/ will connect to replica2
    • /topo1/rack3/ will connect to replica2