Skip to content
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

Replace status.observedAt with redis pub/sub channels for resource tree updates #1340

Closed
jessesuen opened this issue Mar 29, 2019 · 2 comments · Fixed by #4208
Closed

Replace status.observedAt with redis pub/sub channels for resource tree updates #1340

jessesuen opened this issue Mar 29, 2019 · 2 comments · Fixed by #4208
Labels
component:api API bugs and enhancements enhancement New feature or request type:scalability Issues related to scalability and performance related issues
Milestone

Comments

@jessesuen
Copy link
Member

Currently, to support the Application watch API, which powers the UI view which displays live changes in a resource tree, the controller updates the k8s application object with a new observedAt timestamp whenever any of the application's resources changes. The Argo CD API server have a K8s watch, and are notified about the update, which forwards the updated application object to the argocd client watchers.

The problem with this approach is:

  1. It causes application objects to get updated very frequently (as frequent as an app's resources are updated). This causes a lot of chatter to k8s and unnecessarily bumps the resourceVersion of app objects

  2. we unnecessarily involve the k8s api server for notifications about a change in an applications resource tree.

  3. for a very active application, sometimes 1-second level granularity of observedAt is not sufficient, and we miss the last event(s) that happened (e.g. a pod going from terminating to missing). A manual refresh fixes this.

The solution is that instead of updating status.observedAt to notify the Argo CD API server about changes in the resource tree view, the API server could subscribe to a redis channel about changes in the resource tree (in addition to the application watch). By doing this, we:

  1. no longer need to update the application object which is simply updating a timestamp.
  2. we should no longer miss the last event(s) that happens with an application resources
@alexec alexec added the enhancement New feature or request label Apr 9, 2019
@stale
Copy link

stale bot commented Jun 8, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Jun 8, 2019
@stale stale bot closed this as completed Jun 15, 2019
@jessesuen jessesuen reopened this Jun 15, 2019
@stale stale bot removed the wontfix This will not be worked on label Jun 15, 2019
@stale
Copy link

stale bot commented Aug 14, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Aug 14, 2019
@alexmt alexmt removed the wontfix This will not be worked on label Aug 19, 2019
@jannfis jannfis added component:api API bugs and enhancements type:tech-debt Enhancement invisible for the end user labels May 14, 2020
@jessesuen jessesuen added this to the v1.8 milestone Aug 29, 2020
@jessesuen jessesuen added type:scalability Issues related to scalability and performance related issues and removed type:tech-debt Enhancement invisible for the end user labels Aug 29, 2020
alexmt added a commit to alexmt/argo-cd that referenced this issue Aug 31, 2020
alexmt pushed a commit that referenced this issue Aug 31, 2020
alexmt pushed a commit that referenced this issue Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:api API bugs and enhancements enhancement New feature or request type:scalability Issues related to scalability and performance related issues
Projects
None yet
4 participants