Apache Benchmark
ab tool

SRE

Benchmark

Load Testing

SRE | Apache Benchmark Tool

Apache Benchmark Tool

Intro

This is perfect tool for simple benchmark tests on your web server. It could be used to send a number of concurent HTTP requests so you can verify the app can handle the load or your rate limit config works as expected.

Installation in Ubuntu

    
    sudo apt install apache2-utils     
                

Example - Post JSON

Create 10 concurent sessions and send 100 HTTP POST requests to your API to test /login URL.

    
    ab -c 10 -n 2000 -p ab.txt -T "application/json" https://api/login

    #ab.txt file
    {
        "username": "foo",
        "password": "bar"
    }