Skip to content

Instantly share code, notes, and snippets.

@andersondanilo
Last active January 24, 2022 18:42
Show Gist options
  • Save andersondanilo/d689412d5bd305474b83705908a256a0 to your computer and use it in GitHub Desktop.
Save andersondanilo/d689412d5bd305474b83705908a256a0 to your computer and use it in GitHub Desktop.
testing slow connection to one service

Example with redis (using https://github.com/bcoe/crapify)

./crapify start --port 7070 --speed 1000

Let this port forwarding the redis through the proxy:

socat TCP-LISTEN:6381,reuseaddr,fork PROXY:localhost:redis:6379,proxyport=7070

And connected to redis

redis-cli -p 6381

When i get some big payload after some idle time it was coming fast, however if i repeated the GET command in redis (with a very small interval), it would be slow (2 ~ 3s delay)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment