go-graphite / graphite-clickhouse

Graphite cluster backend with ClickHouse support
MIT License
213 stars 52 forks source link

Add Remote Read Server Support #245

Closed Hedius closed 10 months ago

Hedius commented 12 months ago

These changes configure the remote read concurrency limit to a default value of 10. The value can be configured / or the default can be changed if needed.

This limit defines how many remote read requests can be handled at the same time. If not set this is 0 by default and remote read requests end in an timeout. (Since they are stuck in the gate for remote reads and waiting endlessly).

After setting this setting a prometheus remote read client can successfully use the remote read API of graphite-clickhouse.

https://prometheus.io/docs/prometheus/latest/querying/remote_read_api/

Only samples are supported.

For faster read support Streamed Chunks should be used with the chunk querier. I have a prototype implementation for this, but cannot test it atm since prometheus does support streamed chunks as a client yet....

Will open a PR for this as soon as I have smth to test this on.