Commit 0340ef5
committed
fix: throttle cache synchronization to prevent API call feedback loop
SynchronizeCachesAsync was running on every heartbeat check interval (1s),
causing thousands of HostnameCache API calls per minute. Each sync lists
ClusterCache and HostnameCache CRDs, and any save triggers the DNS
reconciler which lists them again — creating a feedback loop that never
reaches quiescence.
Changes:
- Decouple cache sync from heartbeat loop with a separate CacheSyncInterval
(default 30s), configurable via values.yaml
- Skip sync if one is already in progress (non-blocking WaitOne) instead of
queuing callers
- Force immediate sync only when a cluster is actually removed
- Increase DNS probe timeouts from 1s to 5s1 parent 4704e5d commit 0340ef5
6 files changed
Lines changed: 576 additions & 532 deletions
File tree
- charts/multicluster-ingress
- templates
- src/Cyclops.MultiCluster/Services
- Default
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
219 | 223 | | |
220 | 224 | | |
221 | 225 | | |
| |||
Lines changed: 33 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
| |||
132 | 136 | | |
133 | 137 | | |
134 | 138 | | |
135 | | - | |
| 139 | + | |
136 | 140 | | |
137 | 141 | | |
138 | 142 | | |
| |||
234 | 238 | | |
235 | 239 | | |
236 | 240 | | |
237 | | - | |
| 241 | + | |
238 | 242 | | |
239 | 243 | | |
240 | 244 | | |
| |||
440 | 444 | | |
441 | 445 | | |
442 | 446 | | |
| 447 | + | |
443 | 448 | | |
444 | 449 | | |
445 | 450 | | |
| |||
454 | 459 | | |
455 | 460 | | |
456 | 461 | | |
| 462 | + | |
457 | 463 | | |
458 | 464 | | |
459 | 465 | | |
460 | 466 | | |
461 | 467 | | |
462 | 468 | | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
463 | 478 | | |
464 | 479 | | |
465 | 480 | | |
466 | 481 | | |
467 | 482 | | |
468 | 483 | | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
475 | 487 | | |
476 | | - | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
477 | 501 | | |
478 | 502 | | |
479 | 503 | | |
| |||
0 commit comments