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

Is Max’s Context Window Larger than 200k?

I'm considering buying Max, but I'm concerned about its 200k context window length, especially when compared to Gemini. Is Max planning to offer a...

Will a Hacker’s Access Show Up in My Account Activity Logs?

I've been thinking about security after learning about session hijacking. Suppose I'm using my computer and a hacker steals my cookies and session ID....

How do I find the right BIOS update for my MSI B450M Bazooka Plus?

I'm working on a build with my MSI B450M Bazooka Plus motherboard and I'm stuck trying to find the correct BIOS update. I've been...

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

Online Hash Generator – String to Hash Converter

Need to quickly generate a hash from a string? Whether you're verifying file integrity, securing data, or just experimenting with cryptographic tools, this simple...

Convert CSV To HTML Table

Need to quickly turn CSV data into an HTML table? Whether you're copying data from Excel, Google Sheets, or another spreadsheet, this tool makes...

Student Group Randomizer

Creating fair and balanced groups in the classroom can be time-consuming — especially when you're trying to avoid repetition, manage different skill levels, or...

Random Group Generator

Need to split a list of people, items, or ideas into random groups? Our free Random Group Generator makes it quick and easy. Whether...

Flip Text Upside Down – Free Online Tool

Ever wanted to flip your text upside down just for fun or to grab someone’s attention in a creative way? This free online Upside...

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...

Latest Posts

Latest Questions