-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
vmagent k8s target discovery is too slow #6270
Comments
hey @aluode99 |
hi @AndrewChubatiuk thank you for your reply.The detailed configuration for vmagent is as follows: The use case involves loading kubernetes_sd_configs through a sidecar, and then invoking vmagent reload to load the configuration. When the pod starts, kubernetes_sd_configs is empty,so the service discovery takes 0 seconds. After the sidecar loads the configuration, vmagent reloads and the service discovery takes 2061 seconds. Due to the kubernetes_sd_configs being empty at startup, the startup process remains blocked at the code checkpoint 1 and does not proceed to the reload process at checkpoint 2. As a result, vmagent does not incrementally load the configuration to gradually activate the collection tasks. Instead, it spends 2061 seconds to complete the discovery of all targets before beginning the collection tasks, leading to a 2061-second period without data collection. |
How much time takes the next configuration update after initial one? |
I have compiled the duration of some reloads, with a total time of about 7 minutes. The shortest duration was 0.002 seconds, and the longest was 1.139 seconds. The detailed durations are as follows:
|
Is your feature request related to a problem? Please describe
When there are many configured jobs (about 100), vmagent discovers targets very slowly in serial, resulting in no data collection by vmagent for more than half an hour.
Since each instance in the vmagent cluster needs to discover all the collection targets before sharding, horizontal scaling cannot solve the problem of slow service discovery.
Describe the solution you'd like
Describe alternatives you've considered
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: