RandomWeightedQuorumLB

InfoGenerateCreated ByPackages

The provided code snippet is a JSON configuration for a system of 'directors,' which are likely components in a load balancing or service routing system. The configuration includes three directors (my_dir1, my_dir2, my_dir3). Each director has a name, a load-balancing policy (set to 'random'), a quorum value (set to 50%), and a number of retries (3). Each director is associated with a set of 'backends,' which are the actual servers or services that the traffic will be routed to. The backends have different weights, which will influence the random selection process. Specifically, 'F_backend1' has a weight of 2, while 'F_backend2' and 'F_backend3' each have a weight of 1. This means 'F_backend1' is twice as likely to be selected compared to 'F_backend2' and 'F_backend3.' The use of 'random' policy indicates that the selection of backends will be randomized according to their weights and the directors will retry the selection process up to 3 times if necessary.

{
    "directors": [
        {
            "name": "my_dir1",
            "policy": "random",
            "quorum": "50%",
            "retries": 3,
            "backends": [
                { "backend": "F_backend1", "weight": 2 },
                { "backend": "F_backend2", "weight": 1 },
                { "backend": "F_backend3", "weight": 1 }
            ]
        },
        {
            "name": "my_dir2",
            "policy": "random",
            "quorum": "50%",
            "retries": 3,
            "backends": [
                { "backend": "F_backend1", "weight": 2 },
                { "backend": "F_backend2", "weight": 1 },
                { "backend": "F_backend3", "weight": 1 }
            ]
        },
        {
            "name": "my_dir3",
            "policy": "random",
            "quorum": "50%",
            "retries": 3,
            "backends": [
                { "backend": "F_backend1", "weight": 2 },
                { "backend": "F_backend2", "weight": 1 },
                { "backend": "F_backend3", "weight": 1 }
            ]
        }
    ]
}