ApacheBench, the ab command that ships with the Apache HTTP Server, is the quickest way to ask a web server how many requests per second it can serve. You give it a URL, a request count (-n) and a concurrency level (-c), and a few seconds later it prints requests per second, transfer rate and a table of response time percentiles. Teams look for Apache Bench alternatives when that one URL from one machine stops being an honest picture of production: they need HTTP/2, a fixed request rate instead of "as fast as possible", live latency, many URLs, a scripted user journey, pass/fail checks for CI, or more load than one box can produce. Pick the alternative by what you need next. For a better single-URL load testing tool, look at wrk, hey or oha. For a constant request rate, look at Vegeta or wrk2. For scripted performance testing in code, look at k6, Locust or Apache JMeter. For multi-step scenarios on managed cloud load generators, look at PFLB.
At a glance
- The short answer. ab is a benchmarking tool for one URL. Keep it for a quick check of a web server; switch when you need HTTP/2, rate control, many URLs, scenarios or distributed load generation.
- Drop-in command line tools. hey and oha keep ab-style
-nand-cflags and add HTTP/2 and a duration mode; wrk is built to generate significant load from one multi-core machine. - Rate and accuracy. Vegeta, wrk2 and oha (
-qwith--latency-correction) can hold a constant request rate, and their READMEs say they avoid coordinated omission in latency numbers. - Scenarios and CI/CD. k6 (JavaScript), Locust (Python) and Apache JMeter (test plans) turn one URL into a user flow, and k6 adds pass/fail thresholds for CI. PFLB builds the flow in a visual editor, checks it against SLA rules and runs the load on managed cloud generators.
- Sources. Claims about other tools come from each project's own docs, README or source code, read on 30 November 2026. PFLB is one of the nine: we build a cloud load testing platform and run performance testing as a service, and our 150+ performance engineers have worked with 300+ companies since 2008.
What ApacheBench Does Well and Where It Stops
The ab manual describes it as a tool for benchmarking your Apache HTTP server, and it is good at exactly that. It installs with the server, needs no script and reads like a sentence: ab -n 10000 -c 100 -k https://example.com/ sends ten thousand requests, a hundred at a time, over keep-alive connections. Flags add headers (-H), cookies (-C), basic auth (-A), a POST or PUT body from a file (-p, -u), a custom method (-m), a time limit (-t) and CSV or gnuplot output (-e, -g). For a quick before-and-after check on one endpoint, that is often all you need.
Six things push teams to another performance testing tool:
- One URL per run. The synopsis takes a single
hostname:port/path. There is no list of URLs, no flow from login to checkout, and no data that changes per request. - HTTP/1.0 on the wire. In the httpd 2.4 ab.c source, every request line is written as HTTP/1.0, and the manual lists no HTTP/2 option. The manual's own Bugs section says ab "does not implement HTTP/1.x fully" and accepts only some expected forms of responses.
- It can measure itself. The same section warns that heavy string parsing in ab may mean "you would measure the ab performance rather than the server's". The 2.4 source drives every connection from one event loop, so on a fast server one ab process can become the bottleneck.
- No rate control.
-csets how many requests are in flight, not how many go out per second. ab sends the next request as soon as one finishes, so a slow server also gets less load, and you cannot hold a target throughput. - Count or time, not a load profile. You get
-nrequests or-tseconds (which implies-n 50000). There is no ramp-up, no steps and no think time between requests. - No pass/fail result. ab prints numbers; it does not compare response times or error rates with a threshold, so a CI job needs a wrapper script to decide whether the build broke.
Apache Bench Alternatives Compared: Key Features of 9 Load Testing Tools
Eight of the nine are open source tools you run yourself; PFLB is a cloud performance testing tool. Every load testing tool here can send HTTP traffic for API testing and testing web applications, and reports performance metrics such as response times and errors. They differ in how you define the test, where the load comes from and how much they tell you afterwards.
| How you define the test | Where the load runs | Choose it when | |
|---|---|---|---|
| ApacheBench (the baseline) | One URL and flags | The machine you run it on | You need a quick requests-per-second number for one URL |
| PFLB | Visual editor with HTTP and gRPC requests; imports from HAR, Postman, Insomnia and JMeter .jmx | Managed PFLB cloud load generators; region chosen per run | One URL has to become a user journey with SLAs, dashboards and reports |
| wrk | Flags plus an optional LuaJIT script | One multi-core machine | You want significant load from one box with little setup |
| hey | ab-style flags, one URL | The machine you run it on | You want ab's flags with HTTP/2 and a duration mode |
| oha | ab-style flags; a URL, a URL file or a URL pattern | The machine you run it on, with a live terminal UI | You want to watch latency as it happens |
| Vegeta | Targets from stdin or a file; also a Go library | One machine, or several you split the rate across | You need a constant request rate and rich reports |
| Siege | Flags plus a urls.txt file | The machine you run it on | You want many URLs, page assets and delays between requests |
| Grafana k6 | JavaScript test scripts | Your machines, Kubernetes or Grafana Cloud k6 | You want scripted tests with pass/fail thresholds in CI/CD |
| Locust | Python code | Your machines, one or many | Your team writes Python and wants a web UI |
| Apache JMeter | .jmx test plans built in a GUI, run in CLI mode | Your servers, one or many | You need multiple protocols beyond HTTP and an extensible core |
1. PFLB: When One URL Has to Become a User Journey
Pick PFLB over ab when the question changes from "how fast is this endpoint" to "what happens when real users go through the whole flow". In PFLB a test is built from use cases: HTTP or gRPC requests that you drag into transactions, with conditions and loops between them, so a login, a search and a checkout run in order the way a user would run them (JMeter in the cloud). Test data comes from CSV files or literal parameters, so requests can carry values from a file instead of the same body every time. You can also skip the blank page: record the flow in a browser as a HAR file, or import a Postman or Insomnia collection, Google Analytics data or a JMeter .jmx file.
Where ab gives you -n and -c, PFLB gives you load profiles. A stable test ramps up, holds the load for the duration you set and ramps down; a scalability test adds virtual users step by step to find the maximum capacity of the system. The load comes from managed PFLB cloud load generators, and you choose the region for each run, or for each container when you import JMX scripts. SLA rules replace the wrapper script around ab: you set them for the whole test, a transaction, a request or system metrics, and the run passes or fails on them. For real time monitoring, Grafana dashboards show test metrics and system metrics during the run and after it, and PFLB can generate an AI report for a run or compare two runs. The Jenkins and GitLab CI integrations start tests from a pipeline.
Know the limits before you move: PFLB is not a one-line command you run on a laptop for a ten-second check, it works at the protocol level and does not drive browsers, and it does not run wrk, k6 or Locust scripts. For a quick single-URL number, ab, hey or oha is still the faster tool. Our HAR to JMX guide shows how a recorded browser session becomes a test. If you would rather hand the whole job over, our performance testing services team plans the test, runs it and explains the results.
2. wrk: When You Want Heavy Load From One Machine
Choose wrk instead of PFLB when you benchmark a single service from one strong machine and care about raw throughput more than about a user flow. The wrk README calls it a modern HTTP benchmarking tool "capable of generating significant load when run on a single multi-core CPU": it combines a multithreaded design with epoll and kqueue, where the 2.4 ab uses a single event loop. A run is set by threads (-t), open connections (-c) and duration (-d), and --latency prints detailed latency statistics.
wrk has no request count, so you think in seconds rather than in -n. When flags are not enough, an optional LuaJIT script can build requests, process responses and add custom reporting. The README warns that per-request work in Lua, such as building a new request each time, reduces its ability to generate load, and that the client machine needs enough ephemeral ports. If you need a fixed rate, wrk2 is a fork that adds a throughput setting (-R) and HdrHistogram latency recording to avoid coordinated omission; its README calls it experimental. Both are quiet projects: on GitHub, the last push to wrk is from December 2023 and to wrk2 from March 2024 (checked 30 November 2026).
3. hey: When You Want ab's Flags With HTTP/2
Choose hey instead of PFLB when you want a small open source tool that replaces ab, with no scenario to build. The hey README calls it "a tiny program that sends some load to a web application", and its command line interface will look familiar: -n for the number of requests (200 by default), -c for concurrent workers (50 by default), -m for the method, -H for headers, -d or -D for a body and -a for basic auth.
Three additions answer common ab complaints. -h2 turns on HTTP/2. -z runs for a duration instead of a request count, so hey -z 30s replaces ab -t 30. -q sets a rate limit, but per worker, so total throughput is at most -q times -c. Output is a summary or a CSV dump of every response. hey still tests one URL per run from one machine, and binaries are published for Linux, macOS and Windows. The project was first called boom and was renamed to avoid a clash with the tool it was inspired by.
4. oha: When You Want to Watch Latency Live
Choose oha instead of PFLB when you run quick benchmarks from your own terminal and want to see the response time distribution move while the test runs. oha is written in Rust and shows a terminal UI for real time monitoring of the run; its README says it was inspired by hey, and it keeps the same -n, -c and -z style flags, with HTTP/2 through --http2 and experimental HTTP/3 as an optional build feature.
Unlike hey, its -q sets the overall queries per second, not a per-worker rate, and with -q set, --latency-correction measures each request from the time it was scheduled, so waiting for a free connection counts against the server. Instead of one fixed URL you can pass a file of URLs or generate URLs from a regex pattern. Results come out as text, JSON or CSV, and --db-url writes succeeded requests to a SQLite database for later analysis. It remains a single-machine load testing tool with a command line interface.
5. Vegeta: When You Need a Constant Request Rate
Choose Vegeta instead of PFLB when the test is "hold 500 requests per second for five minutes and tell me what breaks", and you want it in a Unix pipeline. The Vegeta README says it was "built out of a need to drill HTTP services with a constant request rate". You set -rate and -duration, and it reports the rate it actually sustained next to the throughput the server delivered, so you see the moment the server stops keeping up. The README lists avoiding coordinated omission among its features.
Targets come from stdin or a file, in a simple HTTP format or as JSON lines with a method, URL, headers and body, so one attack can mix several endpoints. Results are a binary stream you pipe into vegeta report (text, JSON, histogram or HdrHistogram output) or vegeta plot for an HTML chart. Vegeta is also a Go library, handy for test code. When one machine hits its limits, the README shows distributed load testing by hand: split the rate across multiple nodes, run them together and merge the results files.
6. Siege: When You Test Many URLs Like a Website Visitor
Choose Siege instead of PFLB when you want an old-school command line tool that behaves a little more like a website visitor than ab does. The Siege README describes an open source regression test and benchmark utility that can stress one URL or read many URLs into memory and stress them together. Its manual sets simulated users with -c, repetitions with -r or a time limit with -t, and reads a urls.txt file with -f, where each line can carry a POST body and variables such as the host name.
Two options change the shape of the test. --delay sets the pause between each user's page requests, and -b (benchmark mode) removes that pause. -i (internet mode) picks URLs from the file in random order. Siege also parses downloaded HTML and requests the stylesheets, scripts and images it finds, unless you turn the parser off, so a page test is closer to what a browser fetches. The README lists HTTP/1.0 and 1.1, GET and POST, cookies, transaction logging and basic authentication; we found no scripting language or distributed mode in its manual.
7. Grafana k6: When You Want Load Tests as Code With Thresholds
Choose k6 instead of PFLB when your developers want load tests in JavaScript, kept in the same repository as the code and run in CI/CD. Grafana k6 is an open source performance testing tool from Grafana Labs that, in its own words, helps you catch performance issues early. For API testing, a script can do what an ab command cannot: log in, keep the session, call several endpoints in order and check each response. Out of the box it speaks HTTP/1.1, HTTP/2, WebSockets and gRPC (protocols), and its browser API adds browser-level tests next to protocol load. The testing guides cover smoke, average-load, stress testing, soak, spike and breakpoint tests.
The piece that replaces an ab wrapper script is thresholds: pass/fail criteria such as 95% of requests below 200 ms or less than 1% errors. When a threshold fails, k6 exits with a non-zero code and the pipeline stops. For the first port from ab, the options reference notes that --vus with --iterations is a shortcut for a fixed number of iterations shared by a fixed number of virtual users, which is close to -c with -n. For more load than one machine, the docs cover the k6 Operator on Kubernetes and Grafana Cloud k6. Our k6 alternatives guide covers the reverse question.
8. Locust: When Your Team Writes Python
Choose Locust instead of PFLB when your QA engineers or developers write Python and want the test to be ordinary code. The Locust docs describe an open source performance and load testing tool for HTTP and other protocols, where each simulated user runs your Python: loops, conditions, calculations and any library you import. That is the jump ab users usually need when one URL turns into a flow with data that changes per user.
Locust runs from the command line or from a web UI with real time monitoring of throughput, response times and errors, and it lets you change the load while the test is running. Without the UI it fits a CI job. For heavy loads it supports distributed load testing over multiple machines, and the docs claim support for hundreds of thousands of concurrent users. You provide and look after those machines. If you weigh Locust against JMeter, see our JMeter vs Locust comparison.
9. Apache JMeter: When You Need More Than HTTP
Choose Apache JMeter instead of PFLB when you need to test more than web traffic from servers you control and want a performance testing tool you can extend with plugins. Apache JMeter comes from the same Apache Software Foundation as ab, but it is a different kind of tool: a 100% Java application that tests web over HTTP and HTTPS, SOAP and REST web services, FTP, databases over JDBC, LDAP, mail, TCP and native commands. Like ab, it works at the protocol level and is not a browser.
You build a test plan in the GUI, often by recording from a browser, and pull values out of HTML, JSON or XML responses to pass them to the next request. The getting started guide is clear that the GUI is for building the script and CLI mode is for the load test itself; in CLI mode JMeter writes results to CSV or XML and can generate an HTML report at the end. It also supports distributed testing across servers you run. Third-party open source libraries for Maven, Gradle and Jenkins bring it into continuous integration. The trade-off is a steeper learning curve than any one-line tool. If you want to run the same JMX file on cloud generators, see our JMeter alternatives guide.
How to Choose Among Apache Bench Alternatives
Start from what ab could not tell you. If the problem is the client itself, for example you suspect ab is the bottleneck, as its manual warns, or your service speaks HTTP/2, move to wrk, built to generate significant load from one multi-core machine, or to hey and oha, which keep the ab flags. If the problem is that the numbers drift with server speed, you need rate control: Vegeta, wrk2 or oha with -q and --latency-correction. If you test a website rather than one endpoint, Siege with a URL file and delays is the smallest step up.
When your performance testing has to model real world scenarios, such as login, a few pages and a purchase with different data per user, a flag-based tool stops being enough. Pick by the language your team writes: JavaScript for k6, Python for Locust, test plans for JMeter. Add pass/fail rules, such as k6 thresholds or PFLB SLAs, so CI decides, not a person reading output. Then decide where the load runs. Apart from PFLB and Grafana Cloud k6, every tool here runs on machines you provide; that is fine for one box, and real work once you need distributed load generation in several regions. PFLB takes that part over with managed cloud generators, SLA rules and Grafana dashboards, and our engineers can run the test for you.
Moving an ab Command to Another Load Testing Tool
Most teams start by porting one ab command they already trust. Here is the same test, 10,000 requests at 100 concurrent connections with keep-alive, for ab and four other command line load testing tools. Vegeta and wrk do not count requests, so the closest form uses a rate or a duration:
ab -n 10000 -c 100 -k https://example.com/
hey -n 10000 -c 100 https://example.com/
oha -n 10000 -c 100 https://example.com/
wrk -t4 -c100 -d30s https://example.com/
echo "GET https://example.com/" |
vegeta attack -rate=500/s -duration=20s |
vegeta report
hey and oha reuse connections by default (both have a flag to switch keep-alive off), so -k has no equivalent there. Both send GET unless you set -m, while ab's -p alone makes a POST. In k6 an iteration is one run of the script, which can hold several requests, so --iterations equals ab's -n only for a one-request script. The main ab flags map like this:
| ab flag | Meaning | hey | oha | wrk | k6 |
|---|---|---|---|---|---|
-n | total requests | -n | -n | none, use -d | --iterations |
-c | concurrency | -c | -c | -c (plus -t threads) | --vus |
-t | time limit | -z | -z | -d | --duration |
-H | extra header | -H | -H | -H | in the script |
-p / -T | POST body and type | -m POST -D / -T | -m POST -D / -T | Lua script | in the script |
Then run both tools against the same server, at the same concurrency, from the same machine, and compare requests per second and the 95th percentile before you trust the new numbers. If the new tool reports a much higher percentile than ab at the same load, check whether it corrects for coordinated omission; that difference is the point of switching, not a bug.
Apache Bench Alternatives: FAQ
What is the best alternative to Apache Bench?
It depends on what ab could not do. For a drop-in command line replacement with HTTP/2, use hey or oha. For significant load from one multi-core machine, use wrk. For a constant request rate, use Vegeta or wrk2. For scripted scenarios, use k6, Locust or Apache JMeter; k6 has pass/fail thresholds built in. For multi-step scenarios on managed cloud generators, with SLAs and reports, use PFLB.
Does ApacheBench support HTTP/2?
No. The ab manual lists no HTTP/2 option, and in the httpd 2.4 source every request line is sent as HTTP/1.0. hey (-h2), oha (--http2), Vegeta (-http2, on by default when the server supports it) and k6 (automatic upgrade) can test over HTTP/2.
Is ab good enough for load testing?
For a quick benchmark of one URL, yes. For testing web applications under realistic load, usually not: it tests one URL per run, cannot hold a fixed request rate, has no ramp-up or think time, and its manual warns that you may end up measuring ab rather than the server. Use it for a first number, then move to a load testing tool that models real traffic.
Is there a free alternative to Apache Bench?
Yes. wrk, hey, oha, Vegeta, Siege, k6, Locust and Apache JMeter are all open source tools, so the software costs nothing and the machines that generate the load are your cost.
Which ab alternative works in a CI/CD pipeline?
k6 is the most direct: thresholds fail the run with a non-zero exit code. Locust runs without its web UI in CI, JMeter runs in CLI mode through Maven, Gradle or Jenkins, and PFLB starts tests from Jenkins or GitLab CI and marks each run passed or failed by its SLA rules.
Get Help With Your Load Test
A benchmark of one URL is a start, not an answer to how your system behaves at peak. PFLB performance engineers can design the scenario, run the test and walk you through the results. Tell us about your system in the form below.






