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

[KSPM] Increase the leader election lease duration #2578

Closed
1 task
amirbenun opened this issue Oct 6, 2024 · 0 comments · Fixed by #2588
Closed
1 task

[KSPM] Increase the leader election lease duration #2578

amirbenun opened this issue Oct 6, 2024 · 0 comments · Fixed by #2588
Assignees
Labels
8.17 candidate bug Something isn't working Team:Cloud Security Cloud Security team related

Comments

@amirbenun
Copy link
Contributor

amirbenun commented Oct 6, 2024

Motivation

When a pod crashes, it takes approximately 30 seconds to restart and begin a new cycle. In our environment, we observed that when Cloudbeat crashes, another pod takes over and becomes the new leader. However, since the new leader has already started its cycle, we are missing data in the findings index during the transition period.
By increasing the LeaseDuration, we can create a stickiness effect, ensuring that the lease remains assigned to the same pod after it crashes and is restarted by the Kubernetes infrastructure.

Definition of done

  • Consider changing the LeaseDuration into a number that will survive the crash.

Tradeoff

In high-availability systems where rapid failover is critical short LeaseDuration is recommended (probably not our case).

Issues

@amirbenun amirbenun added the Team:Cloud Security Cloud Security team related label Oct 6, 2024
@amirbenun amirbenun changed the title [KSPM] Increase the leader lease duration [KSPM] Increase the leader election lease duration Oct 6, 2024
@amirbenun amirbenun linked a pull request Oct 7, 2024 that will close this issue
@oren-zohar oren-zohar added bug Something isn't working 8.17 candidate labels Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.17 candidate bug Something isn't working Team:Cloud Security Cloud Security team related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants