-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
sig-api-machinery: Add scale targets to CRDs to GA KEP #1015
sig-api-machinery: Add scale targets to CRDs to GA KEP #1015
Conversation
cc @wojtek-t @kubernetes/sig-scalability-misc |
the feedback from @wojtek-t was helpful. I think the approach should be:
|
I'd still like to see real-world feedback inform those max instance size and count-per-namespace and count-per-cluster numbers. In the absence of that, setting up initial scale targets along the lines of O(64KB), O(1000) per namespace, O(10000) per cluster seems reasonable in a hand-wavy way, given other count targets in https://github.com/kubernetes/community/blob/master/sig-scalability/configs-and-limits/thresholds.md |
I've rewritten this section to complement https://github.com/kubernetes/community/blob/master/sig-scalability/slos/api_call_latency.md and https://github.com/kubernetes/community/blob/master/sig-scalability/configs-and-limits/thresholds.md. The actual thresholds and max resource size are not finalized, but I've penciled in "O(10KB), O(2000) per namespace, O(10000) per cluster" and we can substitute in better value once we've nailed them down. I agree read world feedback would be valuable, maybe there is a group we could survey? I'll ask around. |
0620d46
to
edb4659
Compare
Some known CRD scale factors:
|
That's a good dimension (number of distinct custom resource types) we forgot to represent. The way the custom resource server is structured, each custom resource handler is independent, so this is no problem for the server to support, but is good to explicitly create/exercise O(100s) of CRDs in parallel in a test. The main impact I see for that would actually be on clients that pull down discovery docs for all group/version/resources, but that's not really specific to CRDs. |
yeah any O(N) CRD things should be caught quick. Or where there is a large constant factor per CRD (like openapi). |
For this cluster (reasonably representative of high CRD use):
Most of those CRDs have openapi specs with field values for explain and validation. I think it could get higher given that some may not have all the docs they need defined yet |
edb4659
to
e191d18
Compare
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.
At the high-level, it looks fine. I would like to think more about the details, but in the worst case, I believe we could change them later too (I'm a bit overloaded now, and I don't want to block this).
2ca9f99
to
e618668
Compare
/lgtm |
can be found by taking the (median) object size of the custom resource and finding | ||
the the matching row in this table: | ||
|
||
| Object size | Suggested Maximum Limit: scope=namespace (5s p99 SLO) | Suggested Maximum Limit: scope=cluster (30s p99 SLO) | |
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.
Why does the cluster scope have a longer SLO?
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.
This is to be consistent with how the SLOs for native types are defined (https://github.com/kubernetes/community/blob/master/sig-scalability/slos/api_call_latency.md#api-call-latency-slisslos-details). @wojtek-t, do you know the background?
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.
It's connected with the number of objects - listing objects is basically some constant time + something proportional to number of objects processed. And within single namespace (scope=namespace) we offficially allow much smaller number of objects.
e618668
to
eda69e7
Compare
|
||
The above object size and suggested maximum limits in the Custom Resources per | ||
Definition table applies to these conversion webhook SLOs. For example, for a | ||
list request for 1500 custom resource objects that are 10k in size, the resource |
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.
Is the table trying to say "return a single object in 50ms, up to 1500 10k objects in 1s, 10000 10k objects in 6 seconds"?
If so, that mathematically doesn't make much sense, the latter implies that a single object must be processed in .6ms?
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've inlined the object count details in the webhook SLOs to make it easier to understand. The 50ms for a single object is higher to account for a request serving constant factor. I've added a note.
eda69e7
to
0582af5
Compare
0582af5
to
762a118
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jpbetz, lavalamp, liggitt 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 |
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
can be found by taking the (median) object size of the custom resource and finding | ||
the the matching row in this table: | ||
|
||
| Object size | Suggested Maximum Limit: scope=namespace (5s p99 SLO) | Suggested Maximum Limit: scope=cluster (30s p99 SLO) | |
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.
It's connected with the number of objects - listing objects is basically some constant time + something proportional to number of objects processed. And within single namespace (scope=namespace) we offficially allow much smaller number of objects.
This proposes that our scale targets for CRD to GA be based on API call latency SLIs/SLOs and kubernetes thresholds.
For details on scalability data gathered, see: https://docs.google.com/document/d/1tEstPQvzGvaRnN-WwGUWx1H9xHPRCy_fFcGlgTkB3f8/edit#