-
Notifications
You must be signed in to change notification settings - Fork 452
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 toxic that closes a connection after given time period #195
base: main
Are you sure you want to change the base?
Conversation
Thanks for the PR @mgkeen. I'll try to look at it at some point next week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can I get approval?
Thanks for the useful addition @mgkeen. The stub select case: |
Any news on this? I've got to say this is the behaviour I was expecting "timeout" to have, and the cli help didn't make it clear it would prevent all data passthrough entirely. Though maybe this could be merged into timeout and the traffic block behaviour would be either a separate toxic to combine with, or an attribute on the toxic? In fact it seems to me traffic blocking could be done by setting Though I guess if you're using the chaotic mode (toxicity != 1) you may want the toxics to always be enabled together… maybe the toxics should be more orthogonal but the toxicity should apply to groups of toxics rather than individual ones? |
As the previous comments suggest my implementation here probably doesn't work all that well. I might be able to have a go at doing this properly at some point soon, but I'm quite busy these days so there's a good chance that won't happen. If anybody else wants to pick it up then feel free! |
I think there is a way to have same with #333.
|
Whilst using toxiproxy to do some testing, i found the timeout toxic didn't quite suit my needs.
If i understand it correctly, the timeout toxic doesn't allow data through at all. I needed a toxic that would allow a connection to carry data, and then cut off after some amount of time.
I took inspiration from the limit_data toxic and introduced a limit_time toxic. There's probably a better name for it that i haven't thought of.