惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
Stack Overflow Blog
Stack Overflow Blog
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
T
The Blog of Author Tim Ferriss
博客园 - 叶小钗
N
Netflix TechBlog - Medium
腾讯CDC
C
Check Point Blog
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
S
SegmentFault 最新的问题
F
Fortinet All Blogs
美团技术团队
U
Unit 42
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 司徒正美
F
Full Disclosure
Recorded Future
Recorded Future
D
DataBreaches.Net
博客园 - 【当耐特】
Martin Fowler
Martin Fowler
J
Java Code Geeks
I
InfoQ
Y
Y Combinator Blog
A
About on SuperTechFans
AI
AI
爱范儿
爱范儿
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Forbes - Security
Forbes - Security
W
WeLiveSecurity
M
MIT News - Artificial intelligence
雷峰网
雷峰网
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
Schneier on Security
Schneier on Security
The GitHub Blog
The GitHub Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
aimingoo的专栏
aimingoo的专栏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
Latest news
Latest news
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
D
Docker
Recent Commits to openclaw:main
Recent Commits to openclaw:main
量子位
V2EX - 技术
V2EX - 技术
Project Zero
Project Zero

Rat's Blog - Apache

Apache环境强制http 301跳转https的方法 - Rat's Blog CentOS 6系统Apache环境配置SSL证书教程 - Rat's Blog Linux VPS下Nginx与Apache环境防盗链设置方法 - Rat's Blog apache端口被异常占用导致无法启动的解决方法 - Rat's Blog
Linux VPS使用Webbench/Apache-ab进行网站压力测试 - Rat's Blog
博主: Rat's · 2018-04-28 · via Rat's Blog - Apache

简介

Webbench是一个在linux下使用的非常简单的网站压测工具。它使用fork()模拟多个客户端同时访问我们设定的URL,测试网站在压力下工作的性能,最多可以模拟3万个并发连接去测试网站的负载能力。

Apache abApache Bench性能测试工具,这是apache免费自带的性能测试工具,就在apachebin目录下,它能模拟多个并发请求,也就是说它主要是用来测试你的网站每秒能处理多少请求的。

安装

如果是测试https的话,使用Apache-ab就可以了。

1、安装Webbench

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

#安装Webbench
wget https://www.moerats.com/usr/down/webbench-1.5.tar.gz
tar zxvf webbench-1.5.tar.gz && cd webbench-1.5
make && make install

2、安装Apache

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

使用

1、Webbench

#使用帮助
webbench -h
#测试命令,-c为并发数;-t为测试时长,单位秒;后面为链接
webbench -c 1000 -t 50 http://www.baidu.com

2、Apache

#使用帮助
ab -h
#测试1,-n为发送请求次数;-c并发数;后面为链接
ab -n 500 -c 400 http://www.baidu.com
#测试2,-t为测试时长,单位秒;-c并发数;后面为链接
ab -t 90 -c 50 http://www.baidu.com

总结

WebbenchApache-ab的测试效果都还可以,只是Webbench不支持https网站,AB倒是可以,不过AB的并发数不能过大,好像需要改配置文件,默认最大1024,如果是用来CC攻击或者网站压力测试,建议找下载文件或者动态图片来试,尽量别做坏事。


版权声明:本文为原创文章,版权归 Rat's Blog 所有,转载请注明出处!

本文链接:https://www.moerats.com/archives/606/

如教程需要更新,或者相关链接出现404,可以在文章下面评论留言。