mirror of https://github.com/grpc/grpc-java.git
Resolves #2716 - Add attributes to EquivalentAddressGroup - Deprecate ResolvedServerInfoGroup by EquivalentAddressGroup - Deprecate ResolvedServerInfo, because attributes for a single address with an address group is not found to be useful. - The changes on the NameResolver and LoadBalancer interfaces are backward-compatible in the next release, with which implementors can switch to the new API smoothly. As a related change, redefine the semantics of DnsNameResolver and RoundRobinLoadBalancer: - Before: DnsNameResolver returns all addresses in one address group. RoundRobinLoadBalancer ignores the grouping of addresses and round-robin on every single addresses. It doesn't work well with the one-server-multiple-address setup, e.g., both IPv4 and IPv6 addresses are returned for a single serve, even if they are put in the same address group by the NameResolver. - After: DnsNameResolver returns every address in its own EAG. RoundRobinLoadBalancer takes an EAG as a whole, and only round-robin on the list of EAGs. The new behavior is a better interpretation of the EAGs, and really allows the case where one server has more than one addresses (e.g., IPv4 and IPv6). This change will affect users that use custom LoadBalancer with the stock DnsNameResolver, and those who use custom NameResolver with the stock RoundRobinLoadBalancer. Users who use both the stock DnsNameResolver and RoundRobinLoadBalancer or PickFirstBalancer will see no behavioral change. Because they will still round-robin on individual addresses from DNS, or do pick-first on all addresses from DNS (PickFirstBalancer flattens all addresses). The result is a simpler API and reduction of boilderplates. |
||
|---|---|---|
| .. | ||
| src | ||
| build.gradle | ||