Skip to content

Feature: add dynamic interval support. #652

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

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

remmen-io
Copy link

Dynamic Interval

Add a dynamic interval feature that automatically adjusts the time between pod terminations based on the number of candidate pods in your cluster. This helps ensure appropriate chaos levels in both small and large environments.

How it works

With dynamic interval enabled, chaoskube will calculate the interval between pod terminations using the following formula:

interval = totalWorkingMinutes / (podCount  * factor)

Where:

  • totalWorkingMinutes = 10 days * 8 hours * 60 minutes = 4800 minutes (we assume that all pods should be killed during 2 work weeks)
  • factor is the configurable dynamic interval factor

The dynamic interval factor lets you control the aggressiveness of the terminations:

  • With factor = 1.0: Standard interval calculation
  • With factor > 1.0: More aggressive terminations (shorter intervals)
  • With factor < 1.0: Less aggressive terminations (longer intervals)

Example scenarios

  • Small cluster (100 pods, factor 1.0): interval = 48 minutes
  • Small cluster (100 pods, factor 1.5): interval = 32 minutes
  • Small cluster (100 pods, factor 2.0): interval = 24 minutes
  • Large cluster (1500 pods, factor 1.0): interval = 3 minutes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant