grpc / grpc-java

The Java gRPC implementation. HTTP/2 based RPC
https://grpc.io/docs/languages/java/
Apache License 2.0
11.26k stars 3.79k forks source link

doc: add document on WRR configure example through service config #11344

Closed YifeiZhuang closed 5 days ago

YifeiZhuang commented 5 days ago

Verified the configure through interop test, not exactly the same though:

$ JAVA_OPTS=-Djava.util.logging.config.file=logging.properties  ./run-test-client.sh --use_tls=false --service_config_json='{"loadBalancingConfig":[{"weighted_round_robin":{"enableOobLoadReport":true, "blackoutPeriod":"10s","oobReportingPeriod":"10s","weightExpirationPeriod":"100s","errorUtilizationPenalty":"0.12","weightUpdatePeriod":"3s"}}]}'
Running test empty_unary
Jun 27, 2024 3:21:57 PM io.grpc.xds.WeightedRoundRobinLoadBalancer <init>
FINE: weighted_round_robin LB created
Test completed.

@anicr7 verified through TD:

localityLbPolicies:
  - customPolicy:
      name: weighted_round_robin
      data: '{ "enableOobLoadReport": true }'

cc. @anicr7