In the case of the xDS ROUND_ROBIN policy, where we first use
weighted_target to pick the locality and then use round_robin to pick the
endpoint within that locality, this multiplication isn't needed (although
it doesn't hurt either, since the resulting weights are still proportional
to the intended values).  However, the multiplication is needed for the xDS
RING_HASH case, where we have a single policy that does both locality- and
endpoint-picking in a single step.  For details, see the gRFC for ring_hash
support:

https://github.com/grpc/proposal/blob/master/A42-xds-ring-hash-lb-policy.md#background-envoy-vs-grpc-lb-policies

On Thu, Aug 25, 2022 at 12:03 PM echo...@gmail.com <echo80...@gmail.com>
wrote:

> What's the reason to time locality lb weight and endpoint lb weight in
> CreateChildPolicyAddressesLocked?
>
> iiuc, it performs 2 layer LB. It first does a  weighted target using
> locality lb weight. Then a child policy which can use endpoint lb weight.
> So why do we need to time the 2 weight?
>
>
> https://sourcegraph.com/github.com/grpc/grpc/-/blob/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc?L810:22
>
> Thanks,
> yishu
>
> --
> You received this message because you are subscribed to the Google Groups "
> grpc.io" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to grpc-io+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/grpc-io/367fb6d9-c90d-4dd9-a148-ff59f76dd452n%40googlegroups.com
> <https://groups.google.com/d/msgid/grpc-io/367fb6d9-c90d-4dd9-a148-ff59f76dd452n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Mark D. Roth <r...@google.com>
Software Engineer
Google, Inc.

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CAJgPXp5%3DM2PSa-%3D1aGwmuEACMsmGCH22tqXizvtVNrUZ4Y%3DV4Q%40mail.gmail.com.

Reply via email to