You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
agent: implement hash-based config polling with configurable cache timeout
Replace aggressive 5-second full config polling with hash-based change
detection. The agent now:
- Checks config hash every 5 seconds (64 bytes)
- Only fetches and applies full config when hash changes
- Forces full config check after timeout (default 60s) as safety net
This dramatically reduces:
- Network bandwidth (99%+ when config unchanged)
- EOS device load (no config application when unchanged)
- Agent CPU (hash computed only when fetching new config)
Add --config-cache-timeout-in-seconds flag to control the forced full
config check interval.
Refactor main loop:
- Split pollControllerAndConfigureDevice into focused functions
- Add computeChecksum() helper for SHA256 hashing
- Add fetchConfigFromController() to get config and compute hash
- Add applyConfig() to apply config to EOS device
- Rename variables: cachedConfigHash, configCacheTime, configCacheTimeout
Add GetConfigHashFromServer() client function to call new gRPC endpoint.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -253,6 +253,8 @@ All notable changes to this project will be documented in this file.
253
253
- feat(smartcontract): add use_onchain_deallocation flag to MulticastGroup ([#2748](https://github.com/malbeclabs/doublezero/pull/2748))
254
254
- CLI
255
255
- Remove restriction for a single tunnel per user; now a user can have a unicast and multicast tunnel concurrently (but can only be a publisher _or_ a subscriber) ([2728](https://github.com/malbeclabs/doublezero/pull/2728))
256
+
- Device agents
257
+
- Reduce config agent network and CPU usage by checking config checksums every 5 seconds, and reducing full config check frquency to 1m
Copy file name to clipboardExpand all lines: controlplane/controller/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ The design includes two optimizations:
12
12
1. Applying configuration to an Arista EOS device causes the EOS ConfigAgent process CPU to spike, so the agent only applies the config when the config generated by the controller is different than the last polling cycle
0 commit comments