-
Notifications
You must be signed in to change notification settings - Fork 811
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
Add QPS settings to Allocation endpoints #1863
Conversation
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.
LGTM (it matches https://github.com/googleforgames/agones/blob/master/cmd/controller/main.go).
Copy paste driven development 😁 |
Build Succeeded 👏 Build Id: 5b4309c9-c535-46c1-8a7c-770515e73f86 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
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.
Thanks for the fix.
cmd/allocator/metrics.go
Outdated
@@ -65,6 +71,8 @@ func parseEnvFlags() config { | |||
viper.SetDefault(remoteAllocationTimeoutFlag, 10*time.Second) | |||
viper.SetDefault(totalRemoteAllocationTimeoutFlag, 30*time.Second) | |||
|
|||
pflag.Int32(apiServerSustainedQPSFlag, 100, "Maximum sustained queries per second to send to the API server") | |||
pflag.Int32(apiServerBurstQPSFlag, 200, "Maximum burst queries per second to send to the API server") |
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.
viper.GetInt(apiServerBurstQPSFlag) to follow the pattern?
Is there any case that the defaults are used? Why not set defaults similar to the helm default?
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.
No reason - I literally just copied exactly what was in the controller/main.go - figured might as well keep it all consistent.
https://github.com/googleforgames/agones/blob/master/cmd/controller/main.go#L258
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.
I think we should use the same default across stack, if the default values are not meant to be different, regardless of the controller.
If we set the default to 100 here and 400 as the environment variable, I can imagine looking at the code, one may assume the default is 100 as they have not set that on the environment variable.
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.
I also thought this was confusing, but it's consistent with the agones controller. Maybe a cleanup there would be better than propagating confusing dueling default values?
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.
Do we feel we should cleanup here, or do it in a subsequent PR? I don't mind either way tbh.
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.
For allocator, because we are making the change in this PR, we should fix it in this PR. For controller, we can fix it in a later PR.
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.
Thought I hit this, and apparently I missed it. Fix incoming!
Can you please add the Helm config documentations as well? |
🤦 I knew I forgot something. |
8aaf76d
to
e3140c3
Compare
Build Succeeded 👏 Build Id: 16c1f228-d1fb-4144-97c3-6998b2cf1893 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
Looks pretty good. Thanks for the change! |
Build Failed 😱 Build Id: 6dee8416-e990-4cb4-a2ec-2a85b74687ac To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Just did a test with the tooling from #1867
So that was 3980 allocation in 1 minute 3 seconds, so 63 QPS. (This is also from my home laptop while I'm on a hangout 😄) So looks like once I handle the above comments, this PR should be good to go! |
3c9e050
to
0b3c82d
Compare
Build Succeeded 👏 Build Id: 7c99adb4-b665-4fc0-ba11-fc7e47d5b805 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
0b3c82d
to
1dcd7b9
Compare
Allocation endpoints where throttled to the default ~4qps for a Kubernetes client. Matching the controller settings on standard QPS and Burst to allow higher throughput. Closes googleforgames#1852
1dcd7b9
to
6836e0e
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: markmandel, pooneh-m 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 |
Build Failed 😱 Build Id: a367188d-1a88-4590-a4e1-268bbcefde8e To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Build Succeeded 👏 Build Id: f1e60b75-338b-4086-8613-a111b7e9f716 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
New changes are detected. LGTM label has been removed. |
Build Succeeded 👏 Build Id: a569f684-10e0-4852-bc11-4441d0c249af The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
What type of PR is this?
/kind bug
What this PR does / Why we need it:
Allocation endpoints where throttled to the default ~4qps for a Kubernetes client.
Matching the controller settings on standard QPS and Burst to allow higher throughput.
Which issue(s) this PR fixes:
Closes #1852
Special notes for your reviewer:
Code can be reviewed, but we should wait until we get the benchmarking tool from @ilkercelikyilmaz to confirm throughput before merging.