Skip to content

Instantly share code, notes, and snippets.

@jolynch
Created April 8, 2015 20:35
Show Gist options
  • Save jolynch/cf325c1c38d85749ff4a to your computer and use it in GitHub Desktop.
Save jolynch/cf325c1c38d85749ff4a to your computer and use it in GitHub Desktop.
# Restart haproxy every 100ms
while [ 1 ]; do
sudo nl-qdisc-add --dev=lo --parent=1:4 --id=40: --update plug --buffer &> /dev/null
./haproxy -f /tmp/haproxy.cfg -p /tmp/haproxy.pid -sf $(cat /tmp/haproxy.pid)
sudo nl-qdisc-add --dev=lo --parent=1:4 --id=40: --update plug--release-indefinite &> /dev/null
sleep 0.100
done
$ ab -c 10 -n 1000000 169.254.255.254:16000/
Benchmarking 169.254.255.254 (be patient)
...
Complete requests: 1000000
Failed requests: 0
...
50% 2
95% 2
99% 8
100% 29 (longest request)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment