Skip to content

Add a flag used to allow qps_json_driver and qps_worker channels to use the "grpclb" LB policy#22540

Merged
apolcyn merged 1 commit intogrpc:masterfrom
apolcyn:per_target_service_configs
Apr 3, 2020
Merged

Add a flag used to allow qps_json_driver and qps_worker channels to use the "grpclb" LB policy#22540
apolcyn merged 1 commit intogrpc:masterfrom
apolcyn:per_target_service_configs

Conversation

@apolcyn
Copy link
Copy Markdown
Contributor

@apolcyn apolcyn commented Apr 1, 2020

Since https://github.com/grpc/proposal/blob/master/A26-grpclb-selection.md was recently implemented in C-core, the channels created in qps_json_driver and qps_worker binaries can no longer use "grpclb" via SRV record DNS resolution (this old behavior was relied upon when using these binaries for an internal benchmark). So update these binaries with an optional flag that can set the "grpclb" LB policy (with a "pick_first" child policy) via a service config plumbed through channel args.

This involves modifying:

  • CreateTestChannel utility to add and respect a new flag: --grpc_test_use_grpclb_with_pick_first_lb_policy
  • qps_json_driver to use the CreateTestChannel API for non-inproc channels (qps_worker already uses this API for non-inproc channels)

@markdroth

@apolcyn apolcyn added lang/core lang/c++ release notes: no Indicates if PR should not be in release notes and removed lang/core labels Apr 2, 2020
@apolcyn apolcyn marked this pull request as ready for review April 2, 2020 02:38

#include "test/cpp/util/test_credentials_provider.h"

DEFINE_bool(grpc_test_use_grpclb_with_pick_first_lb_policy, false,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: will we ever need to use grpc lb with other child policy? If so, would it better to make it a string flag and just set that as the child policy name?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense. It will be set to pick_first for all uses right now, but I could see wanting to set to round_robin in some scenario, so I changed to take a child policy string

Copy link
Copy Markdown
Contributor

@yang-g yang-g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is unfortunate we ended up with so many overloads. But it is a rant not relevant to your PR.
LGTM with a nit.
Thanks.

CreateTestChannel; use CreateTestChannel in qps_json_driver
@apolcyn apolcyn force-pushed the per_target_service_configs branch from 00fa6ed to 962a8f2 Compare April 3, 2020 19:30
@apolcyn
Copy link
Copy Markdown
Contributor Author

apolcyn commented Apr 3, 2020

interop to cloud: #18892

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lang/c++ release notes: no Indicates if PR should not be in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants