Ddosify
Distributed Performance Testing Platform
What is Ddosify?
Ddosify is a comprehensive performance testing platform, designed specifically to evaluate backend load and latency. It offers three distinct deployment options to cater to various needs: Ddosify Engine, Ddosify Self-Hosted, and Ddosify Cloud.
Installation
ddosify
is available via Docker, Docker Extension, Homebrew Tap, and downloadable pre-compiled binaries from the releases page for macOS, Linux and Windows. For auto-completion, see: Ddosify Completions.
Here I explain the setup with Docker, If Docker is not installed on your OS you should install it.
docker run -it --rm ddosify/ddosify
Simple load test:
ddosify -t http://target_site.com
The above command runs a load test with the default value that is 100 requests in 10 seconds.
Using some of the features:
ddosify -t http://target_site.com -n 1000 -d 20 -m PUT -T 7 -P http://proxy_server.com:80
OR
ddosify -t https://test.mom.ir -n 100 -d 10
Ddosify sends a total of 1000 PUT requests to https://target_site.com over proxy http://proxy_server.com:80 in 20 seconds with a timeout of 7 seconds per request.
Easy Start
This section aims to show you how to use Ddosify without deep dive into its details easily.
1.Simple load test
ddosify -t http://target_site.com
The above command runs a load test with the default value that is 100 requests in 10 seconds.
2.Using some of the features:
ddosify -t http://target_site.com -n 1000 -d 20 -m PUT -T 7 -P http://proxy_server.com:80
Ddosify sends a total of 1000 PUT requests to https://target_site.com over proxy http://proxy_server.com:80 in 20 seconds with a timeout of 7 seconds per request.
3.Usage for CI/CD pipelines (JSON output):
ddosify -t http://target_site.com -o stdout-json | jq .avg_duration
Ddosify outputs the result in JSON format. Then jq
(or any other command-line JSON processor) fetches the avg_duration
. The rest depends on your CI/CD flow logic.
4.Scenario based load test:
ddosify -config config_examples/config.json Ddosify first sends HTTP/2 POST request to https://test_site1.com/endpoint_1 using basic auth credentials test_user:12345 over proxy http://proxy_host.com:proxy_port and with a timeout of 3 seconds. Once the response is received, HTTPS GET request will be sent to https://test_site1.com/endpoint_2 along with the payload included in config_examples/payload.txt file with a timeout of 2 seconds. This flow will be repeated 20 times in 5 seconds and response will be written to stdout.
5.Load test with Dynamic Variables (Parameterization):
ddosify -t http://target_site.com/{{_randomInt}} -d 10 -n 100 -h 'User-Agent: {{_randomUserAgent}}' -b '{"city": "{{_randomCity}}"}'
Ddosify sends a total of 100 GET requests to https://target_site.com/{{_randomInt}} in 10 seconds. {{_randomInt}}
path generates random integers between 1 and 1000 in every request. Dynamic variables can be used in URL, headers, payload (body) and basic authentication. In this example, Ddosify generates a random user agent in the header and a random city in the body. The full list of the dynamic variables can be found in the docs.
6.Correlation (Captured Variables):
ddosify -config ddosify_config_correlation.json
Ddosify allows you to specify variables at the global level and use them throughout the scenario, as well as extract variables from previous steps and inject them to the next steps in each iteration individually. You can inject those variables in requests url, headers and payload(body). The example config can be found in correlation-config-example.
7.Test Data:
ddosify -config ddosify_data_csv.json
Ddosify allows you to load test data from a file, tag specific columns for later use. You can inject those variables in requests url, headers and payload(body). The example config can be found in test-data-example.
Details
You can configure your load test by the CLI options or a config file. Config file supports more features than the CLI. For example, you can’t create a scenario-based load test with CLI options.
CLI Flags
ddosify [FLAG]