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

[branch/v8] Improve CertAuthorityWatcher (#10403) #12723

Merged
merged 3 commits into from
May 24, 2022

Conversation

rosstimothy
Copy link
Contributor

Backport

This will backport the following commits from master to branch/v8:

Questions ?

Please refer to the Backport tool documentation

@rosstimothy rosstimothy force-pushed the backport/branch/v8/pr-10403 branch from 1ad4b84 to df12f96 Compare May 18, 2022 12:32
@rosstimothy
Copy link
Contributor Author

friendly ping @jakule

* Improve CertAuthorityWatcher

CertAuthorityWatcher and its usage are refactored to allow for
all the following:
 - eliminate retransmission of the same CAs
 - reduce memory usage by having one local watcher per proxy
 - adds the ability to filter only the CAs that are desired
 - reduce the time required to send the first CAs

watchCertAuthorities now compares all CAs it receives from the
watcher with the previous CA of the same type and only sends to
the remote site if they are not identical. This is to reduce
unnecessary network traffic which can be problematic for a
root cluster with a larger number of leafs.

The CertAuthorityWatcher is refactored to leverage a fanout
to emit events to any number of watchers, each subscription
can be for a subset of the configured CA types. The proxy
now has only one CertAuthorityWatcher that is passed around
similarly to the LockWatcher. This reduces the memory usage
for proxies, which prior to this has one local CAWatcher per
remote site.

updateCertAuthorities no longer waits on the utils.Retry it
is provided with before starting to watch CAs. By doing this
the proxy no longer has to wait ~8 minutes before it even
starts to watch CAs.

(cherry picked from commit 1ac0957)
@rosstimothy rosstimothy force-pushed the backport/branch/v8/pr-10403 branch from df12f96 to 44e6a06 Compare May 24, 2022 17:00
@rosstimothy rosstimothy enabled auto-merge (squash) May 24, 2022 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants