fardelay

command
v1.2.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 11 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL