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

[Autoscaler] Pass pod name to autoscaler, add pod patch permission #740

Conversation

DmitriGekhtman
Copy link
Collaborator

@DmitriGekhtman DmitriGekhtman commented Nov 18, 2022

Why are these changes needed?

I'd like to give the autoscaler

  • The name of the pod it's running in, via an env variable
  • Permission to patch the head pod

The goal is to enable more efficient "list pods" API calls in the autoscaler. Currently each autoscaler lists without specifying a resource version, which is taxing on etcd, especially if there are many Ray clusters in the K8s cluster.

We would like to specify a reasonably fresh pods resource version in the API call.
To that end, we will have the autoscaler patch the head pod's annotations.
The resource version carried in the response is the version at which the pod was modified, so it should be fresh enough.
After the autoscaler patches the head pod, it can read the resourceVersion in the response and use that in the list query.

Related issue number

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Manual tests: I did some benchmarking to confirm that the proposed changes improve autoscaling performance under load (many RayClusters, many pods).

@DmitriGekhtman DmitriGekhtman changed the title [Experimental][Dont merge yet][Autoscaler] Pass pod name to autoscaler, add pod patch permission [Autoscaler] Pass pod name to autoscaler, add pod patch permission Nov 19, 2022
@DmitriGekhtman
Copy link
Collaborator Author

Corresponding Ray PR is here:
ray-project/ray#30502

@DmitriGekhtman DmitriGekhtman merged commit 4b0f7cb into ray-project:master Nov 21, 2022
@DmitriGekhtman DmitriGekhtman deleted the dmitri/pass-pod-name-to-autoscaler branch November 21, 2022 21:56
lowang-bh pushed a commit to lowang-bh/kuberay that referenced this pull request Sep 24, 2023
This commit gives the autoscaler:

Access to the name of the pod it's running in, via an env variable
Permission to patch the head pod

Signed-off-by: Dmitri Gekhtman <dmitri.m.gekhtman@gmail.com>
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

Successfully merging this pull request may close these issues.

None yet

4 participants