-
Notifications
You must be signed in to change notification settings - Fork 805
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
How is the Query Frontend supposed to be configured? #3430
Comments
Correct. It's optional (not strictly required) but suggested, so we've enabled it in the target
Correct. It's already enabled. You configured the query-frontend address like this:
Keep in mind that if you're running multiple Cortex replicas, all queriers will connect to 1 single query-frontend (10.1.31.155:9095). Ideally, the
Tech debt, but since Cortex 1.0 we can't introduce config breaking changes, so we can't fix it until Cortex 2.0.
See above
Query-frontend is not black magic. It does 2 things:
|
Thanks for your explanation. I'll try your suggestion with the multiple frontend addresses and see what happens. One note tho, I did find it weird how |
I have a process running with ---
auth_enabled: false
# ---------------------- MemberList -----------------------
memberlist:
node_name: 'cortex-query-frontend'
# ---------------------- Server ---------------------------
server:
http_listen_address: '0.0.0.0'
http_listen_port: 9092
grpc_listen_address: '10.1.31.152'
grpc_listen_port: 9095
log_level: 'debug'
# ---------------------- Query Frontend -------------------
frontend:
max_outstanding_per_tenant: 200 But when I try to access to
And the logs show it fails with
My 3 Cortex cluster nodes have this in their config: frontend_worker:
frontend_address: '10.1.31.152:9095' Based on #2921 (comment) comment my understanding is that
But it doesn't seem to be connecting. |
Query frontend can be used with downstream_url, or with queriers connecting to it. In the second case, queriers need to be told where to find query frontend by using (Btw, query-frontend doesn't use memberlist for anything). |
Which is exactly this:
What do queriers say? They should be connecting to this, although it is supposed to work with hostname. |
When I do the |
Btw, I see there's something in the config called |
No. Query scheduler is a new component, but you don't need to use it.
Try using |
All I'm seeing is:
|
It's hard to find anything in logs when every time I restart cortex I get tons of:
I reported this but no response so far: #3411 |
Message you're looking for looks like this:
(with your IP) |
Ah, thanks, found one:
But that's from before I changed the config to connect to my separate |
How could I query the GRPC port of the Is there some kind of GRPC ping command I could send using |
There is https://github.com/fullstorydev/grpcurl that could possibly be used. You need to give it proto files from Cortex (https://github.com/cortexproject/cortex/blob/587883140307c5f47455223e8dbcf4e265b7ba5e/pkg/frontend/v1/frontendv1pb/frontend.proto). Querier calls (First "request" that frontend sends is just "GET_ID" -- asking querier to identify itself. After each "request", querier is expected to send a single response). |
Thanks, I'll try it out. |
It seems to get stuck:
Does this look correct? |
Don't you get more than that? When I try it, I see that frontend sends back this message:
Which is how it asks querier to identify itself. Full interaction:
|
No, it just gets stuck after the first Should I for example have a |
When I make the request the logs show:
What does |
That client (grpcurl, or querier) has disconnected. |
Query-frontend doesn't need storage nor configs. It can be configured with caching or query-splitting (see |
Okay, then my minimal config should work. How can I diagnose why it's not accepting the GRPC commands? |
I upgraded to
And I changed nothing except the version of the binary. So as far as I can tell |
Except it's much slower than just calling my old Prometheus instance and fails constantly with:
I will fiddle with some query settings tomorrow. I assume it needs more configuration. |
I can assure you that we have used 1.4.0 in our production without problem. (We also update production to latest master every week.) There may be a bug that you’re hitting, and it would be good to understand what went wrong to make sure that the bug is fixed. |
And I agree. So if you can give me some way to debug why it wasn't working before I'm happy to roll back to |
It should be possible to get more details about gRPC calls by using env. variables.
That could reveal some more details. I would try to set this both on server side (query-frontend) and client side (querier). |
Thx. I'll take a look tomorrow. |
Before I downgraded anything I verified that the GRPC port works:
Then I downgraded ONLY the
And it started failing. |
On
When the connection times out. |
I've upgraded to
But when I query for anything it just gets stuck and times out:
What's interesting is that when I upgraded my Cortex cluster I saw it trying to connect to query frontend at
Maybe it's ignoring the config? |
As far as I can tell the value of
But when I check existing connections I see:
So as far as I can tell Cortex is ignoring my config and connecting to |
I have downgraded only the cluster to
And I can see the connections to my query frontend:
So as far as I can tell |
I opened a separate issue: #3644 |
This issue has been automatically marked as stale because it has not had any activity in the past 60 days. It will be closed in 15 days if no further activity occurs. Thank you for your contributions. |
As explain in the issue on github, when using a full cortex infra querier should register themselves to the query-frontend. See: cortexproject/cortex#3430 Signed-off-by: Wilfried Roset <wilfriedroset@users.noreply.github.com>
Description
I'm running a 3 node Cortex
1.4.0
cluster with-target=all
and I'm seeing pretty bad query performance in Grafana.I figured my issue is not using the Query Frontend to parallelize the queries. But the documentation is quite confusing.
You can find a config of one of my nodes here.
Details
Based on the docs:
But if we check
-modules
we see thatfrontend
is not optional, but rather included in theall
target:Which means I'm already running a
query-frontend
service on each node:But my query performance is very bad, so I thought that maybe I'm using the wrong endpoint.
But when I checked the codebase I could not identify any special path prefix for the
query-frontend
:cortex/pkg/api/api.go
Lines 414 to 420 in 23554ce
It seems to me like
query-frontend
is already available under thePrometheusHTTPPrefix
path which is/prometheus
.I found this comment: #2921 (comment)
Which suggests that my configuration should have the
querier
talk to thequery-frontend
. But how is that supposed to work if I have multiplequery-frontend
s, one for each Cortex instance? Should each Cortex instancequerier
have it's ownquery-frontend
configured asfrontend_worker.frontend_address
?Another thing is, why is the flag called
-querier.frontend-address
but the config option isfrontend_worker.frontend_address
?Or should I run a separate
-target=query-frontend
instance of Cortex on a separate host(probably same as my Grafana) and have thequerier
services connect to that singlequery-frontend
?The text was updated successfully, but these errors were encountered: