-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
control: Build the identity client each time its used (#1021)
We currently build the identity client at startup and hold it to be used fairly infrequently: the client is used once per day by default, and even in extremely aggressive scenarios is unlikely to be used more frequently than once every few minutes. As such, there's very little benefit to holding the client (and buffers, DNS resolutions, etc) open continually. Instead, it seems preferable to instantiate the identity client only as it's needed. Practically, we see issues like linkerd/linkerd2#6184 where the identity client may try to reconnect to stale endpoints when the identity deployment is rescheduled (because there aren't a steady stream of requests on this client). This change makes the controller stack a `NewService<()>` so that clients can be instantiated lazily. The identity module now creates a new connection for each identity request. Other controller clients are unaffacted, continuing to use long-live clients.
- Loading branch information
Showing
4 changed files
with
44 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters