Commit 558ff24
authored
client: increase default latency probe interval from 30s to 5m (#3532)
## Summary of Changes
- Increase the default `-probe-interval` for `doublezerod` from 30s to
300s (5 minutes), reducing steady-state ICMP control-plane load on DZDs
by ~10x. With ~1700 clients each pinging ~90 devices, the old 30s
interval contributed ~170+ ICMP pps per device — enough to compete with
TWAMP telemetry packets under Arista COPP rate-limiting, causing
spurious asymmetric link-down events.
- When the first probe finds no reachable devices (e.g. daemon starts
before network is ready), retry at a fast interval (min of configured
interval and 30s) until a device responds, then switch to the
steady-state interval. The first probe still fires immediately on
startup, and `probeReady` is set unconditionally after the first pass so
the CLI can proceed.
## Diff Breakdown
| Category | Files | Lines (+/-) | Net |
|--------------|-------|-------------|-------|
| Core logic | 2 | +25 / -2 | +23 |
| Tests | 1 | +79 / -0 | +79 |
| Docs | 1 | +5 / -0 | +5 |
| Generated | 1 | +2 / -0 | +2 |
Mostly test coverage for the new fast-retry behavior; core logic change
is compact.
<details>
<summary>Key files (click to expand)</summary>
-
[`client/doublezerod/internal/latency/manager_test.go`](https://github.com/malbeclabs/doublezero/pull/3532/files#diff-1e1223e68dfc0889b16b7cb9e53ec168040a8d4451fe536972f662abcf36555f)
— new test verifying fast-retry when first probe finds no reachable
devices, and that probeReady is set regardless
-
[`client/doublezerod/internal/latency/manager.go`](https://github.com/malbeclabs/doublezero/pull/3532/files#diff-5143bb1dcfda29287bc188c5574b0e0ee849b79fc690f0fb4a95dacdf3713eb9)
— add `converged` flag and `hasReachable()` check to control fast/slow
probe interval; add `maxInitialProbeInterval` constant
-
[`client/doublezerod/cmd/doublezerod/main.go`](https://github.com/malbeclabs/doublezero/pull/3532/files#diff-dee5a14f6d31f63f5de844ef5718568970a7d72d34482ba90b2dbeccd9032eb7)
— change `-probe-interval` default from 30 to 300
</details>
## Testing Verification
- New unit test `TestLatencyManager_FastRetryWhenUnreachable` verifies:
probeReady is set after first probe even when all unreachable; second
probe fires at the fast interval (~30s) rather than the steady-state
interval (1h in test); probe count advances as expected
- All existing latency manager tests pass (14/14)
- E2E tests unaffected — client entrypoint hardcodes `-probe-interval 5`
- Operators can still override with `-probe-interval <seconds>`1 parent fb9d996 commit 558ff24
5 files changed
Lines changed: 111 additions & 2 deletions
File tree
- client/doublezerod
- cmd/doublezerod
- internal/latency
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
424 | 425 | | |
425 | 426 | | |
426 | 427 | | |
427 | | - | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
428 | 447 | | |
429 | 448 | | |
430 | 449 | | |
431 | 450 | | |
432 | 451 | | |
433 | 452 | | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
434 | 457 | | |
435 | 458 | | |
436 | 459 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
1574 | 1575 | | |
1575 | 1576 | | |
1576 | 1577 | | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
1577 | 1656 | | |
1578 | 1657 | | |
1579 | 1658 | | |
| |||
0 commit comments