banner
moeyy

moeyy

一条有远大理想的咸鱼。
github
mastodon
email

Website Stress Testing with Webbench/Apache-ab on Linux VPS

Introduction#

Webbench is a very simple website stress testing tool used on linux. It uses fork() to simulate multiple clients accessing the URL we set, testing the performance of the website under pressure, and can simulate up to 30,000 concurrent connections to test the website's load capacity.

Apache ab (the Apache Bench performance testing tool, which is a free performance testing tool included with apache, located in the bin directory of apache, it can simulate multiple concurrent requests, meaning it is mainly used to test how many requests your website can handle per second.

Installation#

If testing https, just use Apache-ab.

1. Install Webbench

#Debian/Ubuntu systems
apt-get install gcc make ctags -y
#Centos systems
yum install gcc make ctags -y

Download webbench-1.5.tarDownload

#Then unzip the file and run
tar zxvf webbench-1.5.tar.gz && cd webbench-1.5
make && make install

2. Install Apache

#Centos systems
yum install httpd -y
#Debian/Ubuntu systems
apt-get install apache2 -y

Usage#

1. Webbench

#Usage help
webbench -h
#Test command, -c is the number of concurrent connections; -t is the duration of the test in seconds; followed by the link
webbench -c 1000 -t 50 http://www.moeyy.cn

2. Apache

#Usage help
ab -h
#Test 1, -n is the number of requests to send; -c is the number of concurrent connections; followed by the link
ab -n 500 -c 400 http://www.baidu.com
#Test 2, -t is the duration of the test in seconds; -c is the number of concurrent connections; followed by the link
ab -t 90 -c 50 http://www.baidu.com

Summary#

The testing effects of Webbench and Apache-ab are both acceptable, but Webbench does not support https websites, while AB does, although the number of concurrent connections for AB should not be too large; it seems that the configuration file needs to be modified, with a default maximum of 1024. If used for CC attacks or website stress testing, it is recommended to find download files or dynamic images to test, and try not to do anything malicious.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.