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

Consistent Reads from Cache #2340

Open
5 tasks done
shekhar-rajak opened this issue Jan 26, 2021 · 28 comments
Open
5 tasks done

Consistent Reads from Cache #2340

shekhar-rajak opened this issue Jan 26, 2021 · 28 comments
Assignees
Labels
sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. stage/alpha Denotes an issue tracking an enhancement targeted for Alpha status
Milestone

Comments

@shekhar-rajak
Copy link
Member

shekhar-rajak commented Jan 26, 2021

Enhancement Description

  • One-line enhancement description : Consistent Reads from Cache
  • Kubernetes Enhancement Proposal:

Kubernetes Get and List requests are guaranteed to be "consistent reads" if the
resourceVersion parameter is not provided. Consistent reads are served from
etcd using a "quorum read".

But often the watch cache contains sufficiently up-to-date data to serve the
read request, and could serve it far more efficiently.

This KEP proposes a mechanism to serve most reads from the watch cache
while still providing the same consistency guarantees as serving the
read from etcd.

@k8s-ci-robot k8s-ci-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Jan 26, 2021
@shekhar-rajak
Copy link
Member Author

#2331 created for migrating the old keps into new template.

@LappleApple
Copy link
Contributor

/sig api-machinery

@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Apr 8, 2021
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 7, 2021
@k8s-triage-robot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Aug 6, 2021
@k8s-triage-robot
Copy link

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:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue.

In response to this:

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:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

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.

@serathius
Copy link
Contributor

Reviving the KEP as agreed on SIG-Apimachinery meeting May 31st 2023. https://youtu.be/sueYXW89ZHg
/assign

PR #4047 to move KEP to implementable

@serathius serathius reopened this Jun 6, 2023
@serathius serathius removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Jun 7, 2023
@serathius
Copy link
Contributor

/stage alpha

@k8s-ci-robot k8s-ci-robot added the stage/alpha Denotes an issue tracking an enhancement targeted for Alpha status label Jun 7, 2023
@serathius
Copy link
Contributor

/milestone v1.28

@k8s-ci-robot k8s-ci-robot added this to the v1.28 milestone Jun 7, 2023
@jpbetz
Copy link
Contributor

jpbetz commented Jun 12, 2023

/lead opt-in

@serathius serathius added the lead-opted-in Denotes that an issue has been opted in to a release label Jun 12, 2023
@Atharva-Shinde
Copy link
Contributor

Hello @shekhar-rajak @serathius 👋, Enhancements team here.

Just checking in as we approach Enhancements freeze on Thursday, 16th June 2023.

Looks like this enhancement is targeting for stage alpha for v1.28

Here's where this enhancement currently stands:

  • KEP readme using the latest template has been merged into the k/enhancements repo.
  • KEP status is marked as implementable for latest-milestone:v1.28
  • KEP readme has an updated detailed test plan section filled out
  • KEP readme has up to date graduation criteria
  • KEP has a production readiness review that has been completed and merged into k/enhancements.

There are some nits remaining to be addressed:

I won't decline this KEP for enhancements freeze because of these minor changes but would be great to get a PR ready addressing them.

The status of this enhancement is marked as tracked. Please keep the issue description up-to-date with appropriate stages as well. Thank you :)

@serathius
Copy link
Contributor

Don't understand the unmarked points.

KEP readme using the latest template has been merged into the k/enhancements repo.
KEP readme has an updated detailed test plan section filled out

Tests follows the latest template (maybe roughly) and uses a detailed test plan. Please provide criteria that you used to decide that they are not.

@Atharva-Shinde
Copy link
Contributor

Hey @serathius , the second unmarked point is a subset of the first unmarked point.
As mentioned in my comment above, there is an acknowledgement at the start of the Test Plan section quoting:

[ ] I/we understand the owners of the involved components may require updates to
existing tests to make this code solid enough prior to committing the changes necessary
to implement this enhancement.

which this KEP currently doesn't have and we need that to be included so that the KEP is in compliance with the latest KEP readme template.

@serathius
Copy link
Contributor

serathius commented Jun 15, 2023

Makes sense, suggestion for future. Separate questionnaire to KEP authors (also applies to PRR) from KEPs design document into separate file. Having agreements in the middle of the design makes it less readable, doesn't contribute to overall design and also cannot be automatically validated via ./hack/verify-kep.sh.

serathius added a commit to serathius/enhancements that referenced this issue Jun 15, 2023
serathius added a commit to serathius/enhancements that referenced this issue Jun 15, 2023
@serathius
Copy link
Contributor

Sent #4094

@Atharva-Shinde
Copy link
Contributor

Thanks for the PR :) We appreciate your suggestion, I'll bring this up in our retrospection meeting.

@Atharva-Shinde
Copy link
Contributor

Also @serathius, it would be great if you update this field in the kep.yaml alongside.

serathius added a commit to serathius/enhancements that referenced this issue Jun 15, 2023
@serathius
Copy link
Contributor

Done

@taniaduggal
Copy link

Hello @shekhar-rajak 1.28 Docs Shadow here.

Does this enhancement work planned for 1.28 require any new docs or modification to existing docs?

If so, please follows the steps here to open a PR against dev-1.28 branch in the k/website repo. This PR can be just a placeholder at this time and must be created before Thursday 20th July 2023.

Also, take a look at Documenting for a release to get yourself familiarize with the docs requirement for the release.

Thank you!

@Rishit-dagli
Copy link
Member

Hey @serathius , could you please create a docs PR even if it is a draft PR with no content yet against dev-1.28 branch in the k/website repo. The deadline to create this draft PR is Thursday 20th July 2023.

@serathius
Copy link
Contributor

Not sure what needs to be documented as this is just a pure feature gate with no user facing effects aside of performance. cc @jpbetz @deads2k any suggestions?

@Atharva-Shinde
Copy link
Contributor

Hey again @serathius 👋

Just checking in as we approach Code freeze at 01:00 UTC Friday, 19th July 2023 .

Here’s the enhancement’s state for the upcoming code freeze:

  • All the PRs that are related to your enhancement are linked in the above issue description (for tracking purposes). This includes code, tests, and documentation related PR/s.
  • All code related PR/s are merged or are in merge-ready state ( i.e they have approved and lgtm labels applied) by the code freeze deadline. This includes any tests related PR/s too.

For this enhancement, it looks like the following code related PR is open and it needs to be merged or should be in merge-ready state before the code freeze commences :

These are the code freeze related PR's that I found on this KEP issue

Please keep the issue description up-to-date with all the PR/s that are associated with this KEP and let me know if there are other PR/s in k/k we should be tracking for this KEP.

As always, we are here to help if any questions come up. Thanks!

@serathius
Copy link
Contributor

serathius commented Jul 18, 2023

Results of benchmarking consistent reads from cache against consistent reads.
Added performance tests to https://testgrid.k8s.io/sig-scalability-experiments, following 2 scenarios:

  • Small objects - 300`000 configmaps each 1KB of size.
  • Large objects - 300 configmaps each 1MB of size.

In both cases we put load of 1 LIST per second with selector selecting no objects.

Comparing resource usage and latency with and without consistent list from watch cache enabled.

  • 2-10 times reduction in CPU usage
  • 20-50 times reduction of latency
Handled List requests [qps] kube-apiserver CPU [cores] etcd CPU [cores] LIST latency [ms]
50%ile 90%ile 99%ile 50%ile 90%ile 99%ile 50%ile 90%ile 99%ile
Baseline 0 0.10 0.11 0.12 0.18 0.19 0.19 25.00 45.00 49.50
Enabled Large Objects 1 0.09 0.11 0.11 0.18 0.19 0.19 25.00 45.00 49.49
Disabled Large Objects 1 3.13 3.14 3.16 1.73 16.16 16.37 1438.49 1856.13 1985.61
Enabled Small Objects 1 0.63 0.64 0.68 0.23 2.11 2.16 499.32 582.04 648.00
Disabled Small Objects 0.86 6.92 70.85 71.41 3.57 3.72 3.75 10493.83 17910.71 21800.00

@taniaduggal
Copy link

Hey @serathius , Docs Shadow here! could you please create a docs PR even if it is a draft PR with no content yet against dev-1.28 branch in the k/website repo. The deadline to create this draft PR is Thursday 20th July 2023.

@Atharva-Shinde
Copy link
Contributor

Hey @serathius 👋 Enhancements Lead here,
With kubernetes/kubernetes#118508 and kubernetes/test-infra#30094 merged as per the issue description, this enhancement is now tracked for v1.28 Code Freeze. Thanks!

@serathius
Copy link
Contributor

serathius commented Jul 19, 2023

Done kubernetes/website#42083

@Rishit-dagli
Copy link
Member

Hello @shekhar-rajak @serathius wave: please take a look at Documenting for a release - PR Ready for Review to get your docs PR ready for review before Tuesday 25th July 2023. Thank you!

Ref: kubernetes/website#42083

@npolshakova
Copy link

Hello 👋, 1.29 Enhancements Lead here.

If you wish to progress this enhancement in v1.29, please have the SIG lead opt-in your enhancement by adding the lead-opt-in and milestone v1.29 labels before the Production Readiness Review Freeze.

/remove-label lead-opted-in

@k8s-ci-robot k8s-ci-robot removed the lead-opted-in Denotes that an issue has been opted in to a release label Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. stage/alpha Denotes an issue tracking an enhancement targeted for Alpha status
Projects
Status: Tracked
Development

No branches or pull requests