Skip to content

Conversation

@Jefftree
Copy link
Member

@Jefftree Jefftree commented Feb 1, 2026

  • One-line PR description: Shardable Watch
  • Other comments:

/sig api-machinery

@k8s-ci-robot k8s-ci-robot added the sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. label Feb 1, 2026
@k8s-ci-robot k8s-ci-robot requested review from jpbetz and sttts February 1, 2026 22:41
@k8s-ci-robot k8s-ci-robot added kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 1, 2026
@xigang
Copy link
Member

xigang commented Feb 2, 2026

/cc

@k8s-ci-robot k8s-ci-robot requested a review from xigang February 2, 2026 04:10
@wojtek-t
Copy link
Member

wojtek-t commented Feb 2, 2026

/assign

@Jefftree Jefftree changed the title [KEP-5866] Shardable Watch [KEP-5867] Shardable Watch Feb 3, 2026
@Jefftree Jefftree changed the title [KEP-5867] Shardable Watch [KEP-5866] Shardable Watch Feb 3, 2026
@jpbetz
Copy link
Contributor

jpbetz commented Feb 3, 2026

/approve
For PRR for alpha only. We still need to do KEP review.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Jefftree, jpbetz

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 3, 2026
Comment on lines +173 to +175
However, client-side sharding has a critical limitation: it does not reduce the incoming event
volume per replica. Every replica still receives the full stream of events, paying the CPU and
network cost to deserialize everything, only to discard items not belonging to their shard.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, Either this, or the client writes shard information into labels and filters on the labels, which comes with it's own set of problems and limitations.

Comment on lines +200 to +203
- **Coordination**: This proposal does not implement the coordination logic for clients. Clients
are still responsible for determining their shard ranges.
- **Resharding**: The API server does not manage shard rebalancing strategies; By providing the raw
hash ranges, clients can implement their own consistent hashing strategies if needed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of tackling this sub-problem before tackling coordination and resharding, but it's clear to me that comprehensive system to manage controller sharding would also solve these problems. Are we saying "we're never doing this and it's the users problem" or, "this is future work that we're interested in, but we'd like to solve this problem first" ?

@jpbetz
Copy link
Contributor

jpbetz commented Feb 3, 2026

@deads2k @sttts

- Complexity in API Server filtering logic.
- Clients need to implement ring logic to calculate ranges.

## Alternatives
Copy link
Contributor

@jpbetz jpbetz Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that the ability to server-side filter is preferable to the below alternatives. But I can imagine different ways of expressing the server-side filter.

For example, Instead of providing ranges as a 1st class concept into the query params, an alternative would be to expand the expressiveness of filters more directly. E.g. fieldSelector=range(metadata.uuid, 0, 100) or even selector=0 < hash(object.metadata.uuid) < 100. This would either require expanding (extremely adhoc) grammar used to express field selection, or throwing CEL into the mix.

Has this been considered? If so why is the query param approach considered preferable?

@Jefftree Jefftree changed the title [KEP-5866] Shardable Watch [KEP-5866] Server-side sharded watch Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants