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

toxicity parameter ignored #272

Closed
tboloo opened this issue Feb 21, 2020 · 2 comments
Closed

toxicity parameter ignored #272

tboloo opened this issue Feb 21, 2020 · 2 comments

Comments

@tboloo
Copy link

tboloo commented Feb 21, 2020

My setup:
toxicity 2.1.4 in docker, redis 5.0.7 also in docker.

I have created proxy to redis, and later added toxicity with probablity 0.7 to it. Inspect shows that proxy was configured correctly,

/go/bin # ./toxiproxy-cli  inspect redis
Name: redis     Listen: [::]:26379      Upstream: redis:6379
======================================================================
Upstream toxics:
Proxy has no Upstream toxics enabled.

Downstream toxics:
timeout:        type=timeout    stream=downstream       toxicity=0.70   attributes=[    timeout=5000    ]

With such proxy I would expect that 7 out of 10 times the connection would timeout, however in reality it does not timeout at all, or at most once:

$ docker run -it --rm --net toxic redis:5.0.7 redis-cli -h proxy -p 26379
proxy:26379> get test
"100"
proxy:26379> get test2
"abcd"
proxy:26379> get adasd
(nil)
proxy:26379> set asdasd sadasd
OK
proxy:26379> get efas
(nil)
proxy:26379> get t
(nil)
proxy:26379> get t
(nil)
proxy:26379> get t
(nil)
proxy:26379> get t
(nil)
proxy:26379> get t
(nil)
proxy:26379> get t
(nil)
proxy:26379> get t
(nil)
proxy:26379>
@tboloo
Copy link
Author

tboloo commented Feb 23, 2020

My bad, redis-cli keeps connection open, so obviously it will affect at most one operation...

@tboloo tboloo closed this as completed Feb 23, 2020
@zhengziyi0117
Copy link

I also encountered the same problem. Is there a way to simulate timeout in an established connection?

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

2 participants