Commit 443068e
committed
[tunnel] cache endpoint selection to avoid re-probing on every reconcile
The latency-based endpoint selector was doing a full QUIC handshake +
3 ping requests to every edge endpoint on every TunnelNode status
update (credentials, agent status, address changes). This added 3s+
of blocking delay to each reconcile cycle.
Cache the selected endpoint and sorted address list, and only
re-probe when the address list actually changes.1 parent 5b524ad commit 443068e
1 file changed
+23
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
115 | 120 | | |
116 | 121 | | |
117 | 122 | | |
| |||
439 | 444 | | |
440 | 445 | | |
441 | 446 | | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
448 | 455 | | |
449 | | - | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
450 | 466 | | |
451 | 467 | | |
452 | 468 | | |
| |||
0 commit comments