Skip to content

Instantly share code, notes, and snippets.

@sathed
Last active February 18, 2025 16:40
Show Gist options
  • Save sathed/4c8a7adb15f37ee64eecc20dc828399d to your computer and use it in GitHub Desktop.
Save sathed/4c8a7adb15f37ee64eecc20dc828399d to your computer and use it in GitHub Desktop.
Installation instructions for 'ab' and 'hey' for both Mac and Windows.

Load Testing Tools Installation Guide

This guide provides installation instructions for two load-testing tools: Apache Benchmark (ab) and hey. These tools can be used to generate high HTTP request loads on a server or load balancer.

Apache Benchmark (ab)

Mac (via Homebrew)

  1. Open Terminal and run:
    brew install httpd
  2. Verify the installation:
    ab -V

Windows (via Chocolatey)

  1. Open PowerShell as Administrator.
  2. Run:
    choco install apache-httpd -y
  3. Close and reopen PowerShell, then verify:
    ab -V

Windows (Manual Installation)

  1. Download Apache HTTP Server from: https://www.apachelounge.com/download/
  2. Extract it to C:\Apache24 (or another location).
  3. Add the bin folder to the System Path:
    • Open System PropertiesEnvironment Variables.
    • Edit the Path variable under System variables.
    • Add: C:\Apache24\bin
  4. Restart the terminal and verify:
    ab -V

hey (Go-based Load Tester)

Mac (via Homebrew)

  1. Open Terminal and run:
    brew install hey
  2. Verify the installation:
    hey -v

Windows (via Chocolatey)

  1. Open PowerShell as Administrator.
  2. Run:
    choco install hey -y
  3. Verify the installation:
    hey -v

Windows (Manual Installation)

  1. Download the latest Windows binary from: https://github.com/rakyll/hey/releases
  2. Extract the .exe file to C:\hey\.
  3. Add C:\hey\ to your System Path:
    • Open System PropertiesEnvironment Variables.
    • Edit the Path variable under System variables.
    • Add: C:\hey\
  4. Restart the terminal and verify:
    hey -v

Running Load Tests

Once installed, you can run a test against your load balancer or web server:

Using Apache Benchmark (ab):

ab -n 500000 -c 500 http://your-load-balancer-dns-name/

Using hey:

hey -z 5m -q 1000 -c 500 http://your-load-balancer-dns-name/

Replace your-load-balancer-dns-name with the actual DNS or public IP of the target server.


Need Help?

If you encounter any issues, feel free to reach out!

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