-
Notifications
You must be signed in to change notification settings - Fork 135
removed datastore dependency from saturation detector #1293
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
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nirrozenbaum The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
✅ Deploy Preview for gateway-api-inference-extension ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
pkg/epp/requestcontrol/director.go
Outdated
result, err := d.scheduler.Schedule(ctx, reqCtx.SchedulingRequest, candidatePods) | ||
|
||
// Admission Control check | ||
if err := d.admitRequest(ctx, candidatePods, requestCriticality, reqCtx.FairnessID); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could move admiRequest
logic into getCandidatePodsForScheduling
. Intuitively, the admiRequest
function should be called before the getCandidatePodsForScheduling
function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the main logic currently in admitReqeust
is to check saturation of the system.
it's not relevant to check saturation of all the pods but only of the candidate pods (If we use subset filtering to specify list of pods and all of them are saturated, it's not helpful that other pods are available).
therefore, getCandidatePods
is done before the admitRequest
function.
think about it this way -
getCandidatePods
func returns the set of pods that are relevant for current request.
admitRequest
func check if any of the pods from the above set can actually serve the request, or if all of them are saturated.
Signed-off-by: Nir Rozenbaum <[email protected]>
Signed-off-by: Nir Rozenbaum <[email protected]>
301159f
to
728fe9a
Compare
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
This PR aims to improve the request handling flow.
Before this PR the flow is:
in this flow pods are read from the datastore twice in a row, and saturation check is done for all the pods even if subset filter was specified.
After this PR:
in this flow pods are read from the datastore once for the request flow and saturation check is done only for the relevant pods for the request.
tests updated accordingly.
Additionally, this PR removes the extensive documentation in some places. IMO we don't want to document every function internal step. this is not maintainable. the code should be self explainable (which it is!) in a way that doesn't require this extensive documentation. for example, in HandleRequestion function (inside director), there is no need to explain in the godoc what are the steps. one can just read the function and easily understand the steps.
cc: @kfswain @LukeAVanDrie