Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upSupport remote_read shard remote storage #4062
Comments
This comment has been minimized.
This comment has been minimized.
|
You can already do this using: Please feel free to re-open if you feel there is a feature missing or a bug here. |
gouthamve
closed this
Apr 9, 2018
This comment has been minimized.
This comment has been minimized.
|
@gouthamve This is not a question, it's a feature request. |
Wing924
changed the title
Support shard for remote storage
Support remote_read shard remote storage
Apr 9, 2018
This comment has been minimized.
This comment has been minimized.
gouthamve
reopened this
Apr 9, 2018
This comment has been minimized.
This comment has been minimized.
|
You're thinking of limiting by label, which is already implemented though it is not useful for this use case is it's not intended for use with true remote storages. You can have multiple remote read endpoints, and if the features offered by Prometheus not sufficient you can always implement a remote reader that goes in front of the rest with the logic you require. What you're talking about is vertical sharding, not horizontal. For remote storage you want horizontal, which is a not a concern of Prometheus. |
brian-brazil
closed this
Apr 9, 2018
This comment has been minimized.
This comment has been minimized.
|
@brian-brazil
|
This comment has been minimized.
This comment has been minimized.
|
That won't do what you want. This is something you need to implement inside your remote read endpoint. |
This comment has been minimized.
This comment has been minimized.
I think you're talking about
My remote storages are other prometheus.... |
This comment has been minimized.
This comment has been minimized.
That is not a recommended way to use remote read. Like federation, remote read is not a way to have all your data accessible in one Prometheus. |
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 22, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Wing924 commentedApr 8, 2018
•
edited
We need horizontal partition the storage backend in case the metrics are too huge that one storage can't handle. Currently, we can use remote read feature to archive this function by set multiple remote read endpoints. But remote read function send queries to all backends even if we know in advance that backend don't have matched metrics.
I suggest add a shard option for better perforamnce.
For example, we have 2 backends, one stores production metrics the other stores development metrics.
{env="prod"}we can skipdevel-backend{env!="prod"}we can skipprod-backend{env=~"stg|dev"}we can skipprod-backend{env=~".*notexist.*"}we can skip bothenvlabel, we can query both backends like current implementation.