Skip to content

Instantly share code, notes, and snippets.

@s0enke
Last active August 29, 2015 14:07
Show Gist options
  • Save s0enke/84513e6ff4c3c09e4309 to your computer and use it in GitHub Desktop.
Save s0enke/84513e6ff4c3c09e4309 to your computer and use it in GitHub Desktop.
starting bees
bees up --group=bees-load-testing -k soenke -i  ami-f6b11181 -z eu-west-1c -l ubuntu -s 50 -t m1.small
parallel-ssh -O 'StrictHostKeyChecking=No' -h <(aws ec2 describe-instances --filters "Name=tag-key,Values=Name,Name=tag-value,Values=a bee!" | grep ec2- | cut -d'"' -f4 | sed -e 's/^/ubuntu@/g') sudo apt-get -y install apache2-utils

increase open file limits for apache bench

parallel-ssh -O 'StrictHostKeyChecking=No' -h <(aws ec2 describe-instances --filters "Name=tag-key,Values=Name,Name=tag-value,Values=a bee!" | grep ec2- | cut -d'"' -f4 | sed -e 's/^/ubuntu@/g') sudo wget https://gist.githubusercontent.com/s0enke/97fc447a06a19b50bf04/raw/b95286b25cf6c3baf438a79dd6f78cd876ffa5b4/gistfile1.txt -O /etc/security/limits.conf

Start it in an endless loop with lesser request count because strg+c does not work

while true; do bees attack -u http://kamen-dom.jimdo.com/ -c 40000 -n 50000000; sleep 1; done;

Alternative way as ab somehow needs to be restarted to entfach full speed over time (dunno why):

while true; do timeout 120 bees attack -u http://kamen-dom.jimdo.com/ -c 40000 -n 100000000; parallel-ssh -O 'StrictHostKeyChecking=No' -h <(aws ec2 describe-instances --filters "Name=tag-key,Values=Name,Name=tag-value,Values=a bee!" | grep ec2- | cut -d'"' -f4 | sed -e 's/^/ubuntu@/g') sudo killall -9 ab; done;

check if other site is working during attack:

while true; do echo $(date) $(wget -q --tries=1 --timeout=1 http://derevo-dom.jimdo.com/ && echo OK || echo FAIL); sleep 1; done
@s0enke
Copy link
Author

s0enke commented Oct 21, 2014

Maintaining 3Mreq/minute

  1. use patched https://github.com/Jimdo/beeswithmachineguns/
  2. assemble bees
./bees up --group=bees-load-testing -k soenke -i  ami-f6b11181 -z eu-west-1a -l ubuntu -s 30 -t m1.small
  1. use while loop
while true; do ./bees attack -u http://kamen-dom.jimdo.com/ -c 600 -n 80000000; done;

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