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

Support smart network fault injections through predicates #192

Open
aoak opened this issue Oct 24, 2024 · 0 comments
Open

Support smart network fault injections through predicates #192

aoak opened this issue Oct 24, 2024 · 0 comments

Comments

@aoak
Copy link

aoak commented Oct 24, 2024

Problem: To simulate certain failure scenarios, it is important to have control over when network failure happens. For example, the application layer sends message A and B in succession, and we want the network partition to kick in after A is sent but before B is sent on a TCP connection. Equivalent on UDP maybe something like when A and B are sent, drop A but allow B.

Currently it is hard to simulate those kinds of failures. It would be great to add a support to take a predicate that is run on message stream and when the predicate returns true, a fault is introduced.

For example, following would introduce a partition between host 1 and 2 after a particular message is sent from host1 to host2

turmoil::partition_after("host1", "host2", |msg| matches!(msg, Msg::PrepareAck);
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

No branches or pull requests

1 participant