Skip to content
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

The metrics refresh time might be much larger than the refreshMetricsInterval #99

Open
spacewander opened this issue Dec 14, 2024 · 0 comments

Comments

@spacewander
Copy link

In the current implementation, the pod metrics get refreshed for each refreshMetricsInterval + the time of refreshMetrics:
https://github.com/kubernetes-sigs/llm-instance-gateway/blob/918960cf7f4b2d53d912e6a08b7378f20d20bef7/pkg/ext-proc/backend/provider.go#L82-L87

As the fetchMetricsTimeout is 5s, when the refresh is aborted because of the timeout that happened in one of the requests, the time of refreshMetrics will be 5s. This time is much larger than the refreshMetricsInterval. As a result, stale info would be used for seconds.

One of the solution may be using a separate refresh loop per pod, so a timed-out pod metrics refresh request would not affect other requests. And we may drop the pod which can't provide up-to-date metrics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant