-
Notifications
You must be signed in to change notification settings - Fork 805
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
Introduce a locally runnable matching simulator #6203
Merged
taylanisikdemir
merged 10 commits into
cadence-workflow:master
from
taylanisikdemir:taylan/matching_simulator
Aug 1, 2024
Merged
Introduce a locally runnable matching simulator #6203
taylanisikdemir
merged 10 commits into
cadence-workflow:master
from
taylanisikdemir:taylan/matching_simulator
Aug 1, 2024
Conversation
This file contains 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
taylanisikdemir
requested review from
Shaddoll,
neil-xie,
davidporter-id-au,
Groxx,
shijiesheng,
agautam478,
jakobht,
3vilhamster,
sankari165,
dkrotx and
demirkayaender
as code owners
July 31, 2024 03:47
taylanisikdemir
force-pushed
the
taylan/matching_simulator
branch
from
July 31, 2024 20:20
698c0ec
to
e749bd4
Compare
Shaddoll
reviewed
Jul 31, 2024
Shaddoll
reviewed
Jul 31, 2024
Shaddoll
approved these changes
Aug 1, 2024
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.
What changed?
Partitioned tasklist matching logic could use some improvements in order to match the tasks with pollers as soon as possible. We observed some sub-optimal behavior which becomes bottleneck for heavy traffic partitioned tasklists. Especially with isolation groups feature enabled. Therefore we are revisiting matching partitioning/routing/forwarding/isolation features.
This PR introduces a locally runnable matching simulation with various knobs and collects/reports useful information via a new structured event logging.
Simulator configuration looks like this:
The structured event logs are added all over the matching code for better visibility. These event logs are only printed when
MATCHING_LOG_EVENTS=true
so they will only be available for simulation runs for now. Example event look like this:The main simulator logic is in
host/matching_simulation_test.go
.Rest of the changes are updates to integration test framework to satisfy the simulator's needs such as
How did you test it?
This script runs the test for 1 minute and prints a simulation summary by querying the event logs via jq.
Example simulation summary output: https://gist.github.com/taylanisikdemir/7cebe12fdf6aaf72e0005bd13bbec7e0
One weird thing (which I hope is a bug in my setup) is that sync matches only happen for tasks forwarded to root partition. This needs to be debugged a bit to make sure the setup is not acting weird.
Next steps