-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split querier GRPCClientConfig into separate frontend and scheduler client configs #6445
Split querier GRPCClientConfig into separate frontend and scheduler client configs #6445
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good. I'd suggest to move jsonnet/Helm changes into separate PR.
pkg/querier/worker/worker.go
Outdated
@@ -92,7 +109,8 @@ type querierWorker struct { | |||
cfg Config | |||
log log.Logger | |||
|
|||
processor processor | |||
processorType processorType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of introducing processorType
, we could explicitly pass correct grpc client config, and perhaps (if possible) get rid of cfg
field completely (there's only one other field used from it: MaxConcurrentRequests
). WDYT?
@@ -44,7 +52,8 @@ func (cfg *Config) RegisterFlags(f *flag.FlagSet) { | |||
f.DurationVar(&cfg.DNSLookupPeriod, "querier.dns-lookup-period", 10*time.Second, "How often to query DNS for query-frontend or query-scheduler address.") | |||
f.StringVar(&cfg.QuerierID, "querier.id", "", "Querier ID, sent to the query-frontend to identify requests from the same querier. Defaults to hostname.") | |||
|
|||
cfg.GRPCClientConfig.RegisterFlagsWithPrefix("querier.frontend-client", f) | |||
cfg.QueryFrontendGRPCClientConfig.RegisterFlagsWithPrefix("querier.frontend-client", f) | |||
cfg.QuerySchedulerGRPCClientConfig.RegisterFlagsWithPrefix("querier.scheduler-client", f) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If someone is setting -querier.frontend-client.*
today, it won't apply to scheduler client after this PR. That's a breaking change, and it should be called out in changelog.
It could be nice if we initialized values of scheduler-client from frontend-client settings. Perhaps by checking default values? (Goal is to not break existing configurations.)
@@ -250,6 +250,8 @@ mimir: | |||
frontend_worker: | |||
grpc_client_config: | |||
max_send_msg_size: 419430400 # 400MiB | |||
query_scheduler_grpc_client_config: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd check with @krajorama how to introduce new flag into Helm like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As suggested, will address Helm/Jsonnet changes in follow-up PR.
operations/mimir/querier.libsonnet
Outdated
'querier.frontend-client.grpc-max-send-msg-size': 100 << 20, | ||
'querier.scheduler-client.grpc-max-send-msg-size': 100 << 20, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"100 << 20" (which should be converted to human-readable number really), is the default value, and we don't need to set it. I'd suggest removing querier.frontend-client.grpc-max-send-msg-size
instead (in separate PR).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As suggested, will address Helm/Jsonnet changes in follow-up PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. Let's make sure this is called out as a CHANGE
in the changelog.
What this PR does
Currently, the same
GRPCClientConfig
is used in thequerier_worker
to interact with both thequery_frontend
andquery_scheduler
- it has been discovered that this causes an issue when configuring TLS.To illustrate:
query_frontend
is issued with a Server certificate with SAN:query-frontend.dns
query_scheduler
is issued with a Server certificate with SAN:query-scheduler.dns
When configuring the
tls_server_name
for the querier worker (-querier.frontend-client.tls-server-name
), there will be an error during the TLS handshake with either the frontend or the scheduler, depending on which server name is specified in the config.To alleviate this, an additional
GRPCClientConfig
has been introduced specifically for thequery-scheduler
- the existing config will apply only for thefrontend
which is what would be expected anyway given the flag-querier.frontend-client.tls-server-name
, the scheduler will now use-querier.scheduler-client.tls-server-name
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]