Benchmark A Website Using Apache

Back in the early days of DDOS attacks this would have been a highly dangerous tool. Thankfully it is very easy to block a basic attack like this, so i don’t see the risk of explaining how to use this method. Apache has a tool built into it that will allow you to send a predefined number of requests to a website in order to see if it can handle the load. Here is what you need to do to benchmark a website using Apache.

Apache has a fantastic benchmark tool that you can use to check the performance of your website. If you are expecting a flood of traffic for some particular reason, it would be good to know if your server is capable of handling such a flood. This tool will give you a good idea on whether the server is going to be able to handle the load of traffic.

The format of the command is very simple. You can run it on any server that is using apache. Since most web servers that run apache, will be using some flavor of Linux, i will give you the linux command line method of performing this. The application is called ApacheBench. It may already be installed, but if it isn’t it should be easy to install it.

apt-get install apache2-utils

Once you have it installed you can run a quick test to see how your server handles it. The format of the request is very simple. The first number is the total number of requests you want to send and the second is the amount of requests you want to send at the same time (concurrently). The concurrent value is the most important as this is the one that is most likely to crash the server if it receives too many requests at once. You can play around with the values as you please.

The following command will send a total of 1000 requests to a single URL by grouping them in sets of 100 requests at a time. Make sure to include the “/” at the end of the website path.

ab -n 1000 -c 100 http://website.com/

If i run the above command against this website I get the following results.

Server Software:        Apache
Server Hostname:        yomotherboard.com
Server Port:            443
SSL/TLS Protocol:       TLSv1.2,ECDHE-RSA-AES256-GCM-SHA384,2048,256

Document Path:          /
Document Length:        148622 bytes

Concurrency Level:      100
Time taken for tests:   25.496 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      148908061 bytes
HTML transferred:       148622000 bytes
Requests per second:    39.22 [#/sec] (mean)
Time per request:       2549.582 [ms] (mean)
Time per request:       25.496 [ms] (mean, across all concurrent requests)
Transfer rate:          5703.60 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       40 1256 702.3   1207    2685
Processing:    33 1134 738.5   1212    2494
Waiting:       25  261 307.3    158    1896
Total:        122 2390 769.8   2273    4754

Percentage of the requests served within a certain time (ms)
  50%   2273
  66%   2430
  75%   2510
  80%   2612
  90%   3543
  95%   4080
  98%   4477
  99%   4578
 100%   4754 (longest request)

 

Related Articles

Related Questions

What’s the Best Way to Start Learning Crypto Coding?

Hey everyone! I'm totally new to coding and I'm really eager to learn. I recently watched a video that mentioned picking a specific area...

Looking for Guidance to Transition from Front-End to Full-Stack Development

Hey everyone! I've been working as a front-end developer for over five years, primarily with React. Lately, I've been feeling a bit stuck, especially...

Help! My Old Employer Changed My Apple ID After I Quit

I made a mistake by using my personal Apple ID on my work Mac, and now I'm in a bit of a jam. When...

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Latest Tools

Raffle Ticket Generator

If you're running a fundraiser, charity draw, or local event and need raffle tickets fast, this free online tool lets you generate and print...

Random Number Generator – Create Multiple Random Numbers Instantly

Welcome to our free, browser-based Random Number Generator – a fast and flexible tool designed to help you generate as many random numbers as...

Instant Online Dice Roller

Need a quick, trustworthy way to roll dice without digging through a board‑game box or cluttering your desk? Our free online dice roller is...

Docx To PDF

Need to turn a Word document into a fully‑formatted PDF—without installing software or handing over your email address? Our free DOCX‑to‑PDF converter does exactly...

xAI Grok Token Calculator

This tool is a simple xAI Grok token calculator that helps you estimate the number of tokens your input text might consume when working...

DeepSeek Token Calculator

This tool is a straightforward DeepSeek token calculator, created to help you estimate how many tokens your text may use when working with DeepSeek...

Latest Posts

Latest Questions