Commit cd6da0f
authored
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.1 parent 99e3c06 commit cd6da0f
File tree
4 files changed
+44
-37
lines changed- linkerd
- app
- core/src
- src
- proxy/identity/src
4 files changed
+44
-37
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
| 2 | + | |
| 3 | + | |
9 | 4 | | |
10 | 5 | | |
11 | 6 | | |
| |||
26 | 21 | | |
27 | 22 | | |
28 | 23 | | |
29 | | - | |
| 24 | + | |
30 | 25 | | |
31 | 26 | | |
32 | 27 | | |
| |||
51 | 46 | | |
52 | 47 | | |
53 | 48 | | |
54 | | - | |
| 49 | + | |
55 | 50 | | |
56 | 51 | | |
57 | 52 | | |
58 | 53 | | |
59 | | - | |
| 54 | + | |
60 | 55 | | |
| 56 | + | |
| 57 | + | |
61 | 58 | | |
62 | 59 | | |
63 | 60 | | |
| |||
102 | 99 | | |
103 | 100 | | |
104 | 101 | | |
105 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
106 | 105 | | |
107 | 106 | | |
108 | 107 | | |
| |||
234 | 233 | | |
235 | 234 | | |
236 | 235 | | |
237 | | - | |
238 | | - | |
| 236 | + | |
239 | 237 | | |
240 | 238 | | |
241 | 239 | | |
| |||
263 | 261 | | |
264 | 262 | | |
265 | 263 | | |
266 | | - | |
| 264 | + | |
267 | 265 | | |
268 | 266 | | |
269 | 267 | | |
270 | 268 | | |
271 | 269 | | |
272 | | - | |
| 270 | + | |
273 | 271 | | |
274 | 272 | | |
275 | 273 | | |
276 | 274 | | |
277 | 275 | | |
278 | | - | |
| 276 | + | |
279 | 277 | | |
280 | 278 | | |
281 | 279 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | | - | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
| 4 | + | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
| |||
51 | 49 | | |
52 | 50 | | |
53 | 51 | | |
54 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| |||
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
102 | | - | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
114 | 121 | | |
115 | 122 | | |
116 | 123 | | |
| |||
0 commit comments