Documentation
¶
Overview ¶
Command fardelay makes a TCP server, usually a store, look far away, as a process: a TCP proxy that listens on the loopback, forwards every connection to a target, and holds each write of the client back by a fixed delay before it forwards it. Point a tool at the address it prints and every command costs the delay, the way it would against a server that far away. It is the proxy tests use (testredis.Far), run by hand for an interactive drive; both run pkg/delayproxy.
example: fardelay --listen 127.0.0.1:7001 --target 127.0.0.1:7000 --delay 64ms LISTEN OK addr=127.0.0.1:7001 target=127.0.0.1:7000 delay=64ms (a client of 127.0.0.1:7001 now sees the store at 7000 a round trip of 64ms away) ^C STOP OK writes=12 shortest=64.1ms
Click to show internal directories.
Click to hide internal directories.