-
Notifications
You must be signed in to change notification settings - Fork 303
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
How do I set up RPS limit #670
Comments
@jawlitkp FWIW, we currently, we set the RPS per backend to be 1 for both the InstanceGroup and NEG cases [1]. We can definitely surface this setting to users via the BackendConfig CRD [2] but note that the setting only makes sense when using Ingress w/ NEG's [3]. If you are using InstanceGroup's the setting does not behave how you would expect. [1] https://github.com/kubernetes/ingress-gce/blob/master/pkg/backends/ig_linker.go#L62 |
I've manually updated the RPS in my GCE Load Balancer to 100 for each service. (Currently NEG is out of scope as my cluster doesn't have VPC enabled, and I'd rather not go down that path right now if I don't need to.) Will that RPS configuration be "sticky", or will it be lost next time I update the ingress, e.g. to add another domain? |
What is your use case is for setting an RPS limit? Traffic is double balanced coming into node then pod. Traffic will be balanced across nodes first. You will probably have worse balancing behavior with the limit than setting it to 1 (i.e. completely uniform spread across all nodes). |
Ah, I see. It was mostly just to remove the warning when looking at monitoring, to be honest. |
The documentation for the RPS limit is quite confusing when combined with how GKE is using it. If I understood the comments above correctly, it is not really a capacity, but rather a weight to make sure the load is spread evenly over all instances. This makes sense, but I think the documentation should also mention this. Maybe it should even be renamed and the warning removed from the cloud console. (I can open a new issue for this.) Perhaps more severe is the following. What happens if we use multiple regions? With 1 RPS capacity, would the load be spread uniformly over all regions or would requests go to the closest region even if "usage is at capacity" (preferred since it is not really capacity)? This seem to indicate that requests would actually go to other regions if there is no available capacity:
|
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
We recently started testing GCE ingress / HTTP(s) LB as all our others are nginx-ingress and noticed this issue. Certainly would be good to clarify the MAX=1 (per instance) default and if there are use cases for increasing it to improve performance. I'm not sure how using
I would be interested in any updates or clarification. |
We're using Kubernetes on Google Cloud, with the GCE ingress for load balancing. As far as I can see there is currently no way to configure the RPS per instance/group in Am I maybe missing something and configuring this is already possible through Kubernetes? |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
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/test-infra repository. |
Was there a fix here? I see this got closed due to inactivity, but I didn't see a followup. |
Hi @rramkumar1 I've been using GKE with NEGs and so far I was able to manually set BackendService |
@marcin-ptaszynski This is not something that is surfaced today in any of our APIs. cc @freehan to see if there are any workarounds |
@marcin-ptaszynski Can you check if the backend service contains any beta or alpha feature? We recently fixed a bug where NEG linker will refresh the backends when there is alpha/beta feature enabled on backend-service. #1162 I think the fix will be included in the latest roll out in GKE rapid channel. |
@freehan , thank you. We're using grpc and our service annotations look like:
So it seems we're hitting all of beta features. In any case, exposing MaxRPS config via BackendConfig CRD would be great to have as it (with managedcertificates operator) would allow automating full LB lifecycle from GKE. |
It's worth noting that if you can't change the MaxRPS then Session Affinity is virtually worthless. Session Affinity only works when the endpoints/instances aren't at max load. I might open a separate issue that references this for clarity on the user-facing issue. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/reopen |
@bowei: Reopened this issue. In response to this:
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/test-infra repository. |
/remove-lifecycle rotten |
This is still an issue any way for adding balancing-mode and max RPS to backendconfig with NEG? |
Yes, we are looking at pulling it from our backlog, the most likely avenue is as an annotation on Service. |
Can anyone clarify what However, we had a traffic spike during this weekend and indeed there were bunch of One of our services has at the moment 165 RPS and it labeled with |
@ivansenic no it doesn't mean it will refuse requests if you go beyond the limit. Its used for load balancing so if you have 2 endpoints in your NEG and MAX 10 RPS and one endpoint starts getting more than 10 RPS it will start routing requests to the other one. With 1 RPS on each endpoint it just means distribute the requests as evenly as possible. If you use a global multi-cluster load balancer it will also sum the total RPS of a region and route to other regions if it goes beyond the max. So in that case you really don't want 1 RPS max because it would start routing your US-west traffic to your Australia cluster for example (I know from experience). |
Max rps means try to fill backends up to max rps before spilling over; i.e. if you have 5 backends with max RPS / endpoint = 10, they will each get 10 rps before getting more. No requests will be dropped -- the only effect is on how the traffic is distributed. |
Ok thanks sorry for confusion. |
We have also hit this issue. Is there a way to attach a |
@ben-xo I'm confused what you mean? The loadbalancer should be able to directly balance to each pod in GKE - so I'm not sure why unevenly distributing by zone would be a problem? If you are using the autoneg-controller
|
Is there any ETA for this? We currently have to change this manually via the UI instead of via K8s manifest, which is far from ideal. |
Running into this too. Would love to be able to set this programmatically with either |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
/remove-lifecycle stale |
/remove-lifecycle rotten |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
We do not plan to add this feature to Ingress. This feature is available with the GKE Gateway API Implementation. Please use the Gateway API for this feature. |
No description provided.
The text was updated successfully, but these errors were encountered: