Traffic Generators

= Siege = Siege is an open source stress / regression test and benchmark utility. siege -c100 -t30S -d10 -b -v aman.info.tm

Some Extensions --header="Cookie: SESSb43b2d1d084de3872c89b0b125b64564=Jafuk06rppYAXIxWaU0LY2VmqxN997DsKU3BSgfArCM" -f /path/to/some-urls.txt

The some-urls.txt file is just a simple list of URLs on newlines: http://www.mywebsite.com/about-us http://www.mywebsite.com/contact-us

= Httperf =

Installation: sudo apt install httperf

Usage: httperf --server waf.avitest.com --port 80 --num-conns 100 --rate 10 --timeout 1

= Curl = curl -s -o /dev/null -w "%{http_code}" http://waf.avitest.com seq 100 | parallel -j0 curl -s -o /dev/null -w "%{http_code}" http://waf.avitest.com

for i in `seq 1 99999`; do echo "Status Code:"; curl -s -o /dev/null -w "%{http_code}" https://10.1.1.1; sleep 1; done

= Apache Benchmark = ab -t 1 -n 1000 -c 300 http://waf.avitest.com/

Increase Apache MaxClients (now called MaxRequestWorkers in new versions) on Backend Server: sudo nano /etc/apache2/mods-available/mpm_event.conf MaxRequestWorkers        1000 ServerLimit        565

= Locust =

Installation: sudo apt-get update sudo apt-get -y install python-pip python-dev libxml2-dev libxslt-dev sudo pip install locustio

Install pyzmq for tests across multiple servers to increase the testing capacity: sudo pip install pyzmq

Set file limit to unlimited to ensure there is no OS problems with files at concurrency: ulimit -n 9999

Locust File
Single “task” which gets a specific webpage:

The test below logs a user in to groupster then requests what will be their home page 1 time for every 3 times it requests a group page:

Executing
locust -f ./locastfile.py --host=http://somedomain.io --master
 * Go to the directory with locust file & execute below command:
 * This only starts the interface to control the tests it does not actually start a test:

Go to the web interface to control the test variables and to start and stop it. http://localhost:8089

Distributed Mode
ulimit -n 9999
 * To generate significant load it is almost always necessary to run it in distributed mode.
 * Master server do not simulate any user itself.
 * For this we have to start one or more slaves using –slave flag
 * Both the master and each slave machine, must have a copy of the locust test scripts when running Locust distributed.
 * Run below command on each slave nodes as well

Start “master” node: locust --host=http://somedomain.io --master

Then start any “slave” nodes, giving them a reference to the master node: locust --host=http://somedomain.io --slave --master-host=192.168.10.100

Without WebUI
Runs the cli mode as below: locust -f locustfile.py --no-web -c 1000 -r 100 --run-time 1h30m

In Distributed mode it will wait until all slave nodes have connected before starting the test: locust -f locustfile.py --no-web -c 1000 -r 100 --run-time 1h30m --expect-slaves

= Slowhttptest =

Source: ubuntu.com

= Bombardier =

Source: softwaretester.info


 * References