KUBE-417: Add a way to do load testing of CC #169
Merged
Conversation
…cked and not cleanup early.
c0f3fc5 to
80433c6
Compare
furkhat
approved these changes
Mar 20, 2025
furkhat
reviewed
Mar 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a "test server" mode to the CC binary.
It will not act as the real CC in this case but like a mock cluster-hub. The goal right now is to be able to write a test scenario and execute it in a real cluster and check the performance.
Under
loadtest, the following is implemented:scenariothe machinery to write scenarios + 2 scenarios.Suggested reviewing order
loadtest->httpandcastaiscenarios/scenario.goand the sample scenarioscmd/testserverHow to run this
Sample command:
Sample command:
Sample command:
This will run cluster controller locally against the test server and simulate 2000 CreateEvent actions and 100 DrainNode actions where a deployment prevents the drain.
Missing items, to be added in this PR:
[] Docs how to run it
[] Handle cleanup when sending SIGTERM to server (right now it does not run cleanup reliably)
Missing items, to be added in separate PR:
Some decisions explained:
What is the expected usage of this?
Why a new mode for the binary and not separate binary?
Easier to start for now, also doesn't need to build brand new binary/image and can just reuse.
Why expose a http server for the load testing?
Makes it easy to test deployed CC by deploying the "testserver" in cluster and changing the URL of CC.
Can this be used to run continuous load testing?
Yes, write a test that keeps pushing actions indefinitely. Might need some tweaks though.
Can this be used to run scheduled tests?
Yes but out of scope for current task.