-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: reduce redis traffic caused by app resource tree updates in redis #19722
Conversation
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we document this ARGOCD_APPLICATION_TREE_SHARD_SIZE
? in the deployment env or docs?
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #19722 +/- ##
=========================================
Coverage ? 55.89%
=========================================
Files ? 320
Lines ? 44031
Branches ? 0
=========================================
Hits ? 24611
Misses ? 16863
Partials ? 2557 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Alexander Matyushentsev <[email protected]>
7d4ec8e
to
91e2088
Compare
@gdsoumya agree - updated the docs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Alex!
…is (argoproj#19722) Signed-off-by: Alexander Matyushentsev <[email protected]> Signed-off-by: KangManJoo <[email protected]>
PR reduces the amount of traffic sent from the controller to redis while updated application resource tree.
The application resource tree contains metadata of all resources that belongs to application and stored in redis. Currently, it replaces the whole resources tree in Redis every time any app resource changes. This causes exponential growth of traffic sent from the controller to Redis: the more resources the application has, the more frequently they change, and the more frequently the controller needs to update the resources tree, and the tree is bigger with each resource.
The PR allows to optionally split resources tree into shards using
ARGOCD_APPLICATION_TREE_SHARD_SIZE
env variable. IfARGOCD_APPLICATION_TREE_SHARD_SIZE
is bigger then 0 then controller split app resources into shards and store each shard in a separate Redis key. When any app resource changes then only related shard is updated which significantly reduces amount of Redis traffic.