-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
Description
The ClusterLoadAssignment documentation suggests the weights of the locality and endpoint are multiplied together to get the effective weight.
envoy/api/envoy/api/v2/eds.proto
Lines 46 to 48 in fd273a6
| // granularity between the hosts within a locality. For a given cluster, the | |
| // effective weight of a host is its load_balancing_weight multiplied by the | |
| // load_balancing_weight of its Locality. |
In my tests, this doesn't seem to be the case. Here is my config:
"common_lb_config": {
"locality_weighted_lb_config": {}
},
"load_assignment": {
"cluster_name": "outbound|80||google.com",
"endpoints": [
{
"locality": {
"region": "us-central3",
"zone": "us-central1-a"
},
"lb_endpoints": [
{
"endpoint": {
"address": {
"socket_address": {
"address": "identity-a",
"port_value": 80
}
}
},
"load_balancing_weight": 1
},
{
"endpoint": {
"address": {
"socket_address": {
"address": "identity-b",
"port_value": 80
}
}
},
"load_balancing_weight": 1
}
],
"load_balancing_weight": 2
},
{
"locality": {
"region": "us-central2",
"zone": "us-central1-a"
},
"lb_endpoints": [
{
"endpoint": {
"address": {
"socket_address": {
"address": "identity-c",
"port_value": 80
}
}
},
"load_balancing_weight": 1
}
],
"load_balancing_weight": 1
}
]
}Based on this, I would expect:
identity-a gets a weight of 2, so 40% of traffic
identity-b gets a weight of 2, so 40% of traffic
identity-c gets a weight of 1, so 20% of traffic
I am actually seeing an even 33/33/33% split though.
Is this a documentation issue or is something going wrong?
Reactions are currently unavailable