Skip to content

ILB: Optimize shared resource lock with fixed hashed pool and OCC#1022

Draft
08volt wants to merge 1 commit intokubernetes:release-1.35from
08volt:optimized-lock
Draft

ILB: Optimize shared resource lock with fixed hashed pool and OCC#1022
08volt wants to merge 1 commit intokubernetes:release-1.35from
08volt:optimized-lock

Conversation

@08volt
Copy link
Copy Markdown
Member

@08volt 08volt commented Mar 27, 2026

Replaced the heavy global mutex sharedResourceLock in the ILB controller with a hybrid locking strategy to eliminate serialization bottlenecks:

  1. Fixed-Size Hashed Lock Pool (4096 buckets): Serializes creation/read-modify-write cycles for shared unmanaged resources (HealthChecks, InstanceGroups) without unbounded memory growth ($O(1)$ space complexity).
  2. Optimistic Concurrency Control (OCC): Removes locks for BackendService updates, relying on native GCE API fingerprints to detect and retry conflicts.

This unblocks independent service reconciliations and prevents nodesync stalls during service update storms.

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

This issue is currently awaiting triage.

If the repository mantainers determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Details

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Mar 27, 2026
@08volt 08volt marked this pull request as draft March 27, 2026 13:47
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 08volt
Once this PR has been reviewed and has the lgtm label, please assign cheftako for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 27, 2026
@k8s-ci-robot k8s-ci-robot requested review from cici37 and jpbetz March 27, 2026 13:47
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 27, 2026
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 29, 2026
…rce-specific mutex pool for GCE load balancer operations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants