-
Notifications
You must be signed in to change notification settings - Fork 53
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
Comments
Hi @spacewander , thanks for raising this! I think using a separate refresh loop per pod makes sense. |
Right, but this is fine? Can you elaborate why this is bad? |
@spacewander when you have a moment, please respond to @liu-cong's question. |
/assign spacewander |
I have discussed this with @liu-cong in #207 (comment). And now we agree that this consideration won't be a problem anymore. |
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.
The text was updated successfully, but these errors were encountered: