banner
moeyy

moeyy

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

Linux VPS uses Webbench/Apache-ab for website stress testing.

title: Website Stress Testing with Webbench/Apache-ab on Linux VPS
tags: Linux
id: '1074'
categories:

    • Sharing
      date: 2019-11-18 12:18:25
      cover:
      ai: true

Introduction#

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

Apache ab (Apache Bench performance testing tool) is a free performance testing tool that comes with 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 you are testing HTTPS, you can use Apache-ab.

1. Install Webbench

# Debian/Ubuntu system
apt-get install gcc make ctags -y
# CentOS system
yum install gcc make ctags -y

Download webbench-1.5.tarDownload

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

2. Install Apache

# CentOS system
yum install httpd -y
# Debian/Ubuntu system
apt-get install apache2 -y

Usage#

1. Webbench

# Help
webbench -h
# Test command, -c for concurrency; -t for test duration in seconds; followed by the link
webbench -c 1000 -t 50 http://www.moeyy.cn

2. Apache

# Help
ab -h
# Test 1, -n for number of requests to be sent; -c for concurrency; followed by the link
ab -n 500 -c 400 http://www.baidu.com
# Test 2, -t for test duration in seconds; -c for concurrency; followed by the link
ab -t 90 -c 50 http://www.baidu.com

Conclusion#

Both Webbench and Apache-ab have decent testing effects. However, Webbench does not support HTTPS websites, while AB does. However, the concurrency of AB cannot be too high, as it seems to require modifying the configuration file, with a default maximum of 1024. If used for CC attacks or website stress testing, it is recommended to try downloading files or dynamic images and avoid doing anything malicious.

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