grafana / mimir

Grafana Mimir provides horizontally scalable, highly available, multi-tenant, long-term storage for Prometheus.
https://grafana.com/oss/mimir/
GNU Affero General Public License v3.0
4.1k stars 526 forks source link

Register query-frontend in the memberlist KV for service discovery #4144

Open FUSAKLA opened 1 year ago

FUSAKLA commented 1 year ago

Hi, Just wanted to ask if you would be willing to accept PR adding query-frontend instances to the memberlist KV same way as query-scheduler is there for service discovery purpose?

We just finished writing an adapter converting memberlist instances to the envoy xDS service discovery protocol, hopefully could opensource it eventually. This way we can send the traffic directly from envoy proxy (which we use as an authentication, routing etc.) to distributors and alertmanagers directly (we have Mimir running across 3 DC in separate k8s clusters with zone aware replication) but the only thing missing is the query-frontend, so we can do the same there.

I know that adding code not used by the project directly is an antipattern, but maybe it would help others, or you have similar plans where it would fit into. So I thought it's worth asking.

pracucci commented 1 year ago

I'm up to it, as far as it's optional. I would recommend to follow the same design used for query-scheduler ring.

56quarters commented 1 year ago

At some point in the future I'd like to add read-path request rate limits to the query-frontend so this would help with that :+1:

pracucci commented 1 year ago

At some point in the future I'd like to add read-path request rate limits to the query-frontend so this would help with that 👍

I think it's a feature safer to build in query-scheduler, but topic for a separate discussion ;)