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 upConsider coalescing identical SD definitions #2191
Comments
brian-brazil
added
the
kind/enhancement
label
Nov 15, 2016
This comment has been minimized.
This comment has been minimized.
|
On Tue, Nov 15, 2016, 4:56 PM Brian Brazil notifications@github.com wrote:
|
This comment has been minimized.
This comment has been minimized.
|
We've seen already one user concerned about this for EC2, and given Azure's very low rate limits I imagine it'd be really useful there too. |
gouthamve
added
the
hacktoberfest
label
Sep 28, 2017
This comment has been minimized.
This comment has been minimized.
|
Hi all, I want to take a stab at this issue. I dug into the code a bit and formalized a vague idea of how to do this. Below are the details of what I am thinking and couple of questions related to that. Current flow:
in UpdateProviders two things are done:
Proposed flow
With the changes above the flow I would like to implement is:
Questions:
|
This comment has been minimized.
This comment has been minimized.
I think this logic should live entirely inside the discovery part of the codebase, and not be tied to the other parts of Prometheus or otherwise leak from the discovery api. The reason for this is that we wish at some point to offer sd as a library for use by others, and this is something that should Just Work.
Yes.
That's a separate project :)
The API should remain the same, so no changes should be required. |
This comment has been minimized.
This comment has been minimized.
|
Thanks for the comments, I'm planning to submit a pr accordingly. |
This was referenced Nov 2, 2017
brian-brazil
referenced this issue
Jan 29, 2018
Open
Support for multiple ports in annotations #3756
brian-brazil
referenced this issue
Feb 8, 2018
Merged
consul: improve consul service discovery #3814
simonpasquier
referenced this issue
Mar 5, 2018
Merged
discovery: coalesce identical SD configurations #3912
brian-brazil
referenced this issue
Mar 25, 2018
Closed
Improve Kubernetes Discovery Performance #4010
brian-brazil
closed this
in
#3912
Sep 1, 2018
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. |
brian-brazil commentedNov 15, 2016
There may be cases where users have multiple different scrape configs that share a SD configuration, but where other settings such as relabelling are different.
We have been slowly adding the ability to filter down at the SD level in an ad-hoc way for each SD, but given the number of things that a Prometheus is likely monitoring I think there's another potential approach to keeping load on the SD sane.
If there's two identical SD configs, let's only instantiate it once and then feed it into each required scrape config. This means a naieve config will have constant load on SD relative to the number of scrape configs, and avoid a good chunk of users having to worry about SD performance.