如何模拟DDOS/Slashdotting?
因此,我希望获得更多使用高流量网站的经验,但不幸的是,互联网并没有打开我博客的大门。
如何在我的博客上模拟每秒数十/数百次点击并测试其性能?我在共享服务器上使用 SSH 帐户托管我的博客。
So, I'd like to get more experience working with high-traffic websites, but unfortunately the Internet is not beating down the doors to my blog.
How can I simulate tens/hundreds of hits per second on my blog and test its performance? I'm hosting my blog with an SSH account on a shared server.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您可以使用以下工具向服务器发送大量请求:
第一个,ab,只允许您向单个 URL 发送大量请求——这对于对单个脚本/页面进行基准测试非常有用;但不反映用户浏览您网站的真实模式(例如,CSS/JS/图像未加载)。
第二个,siege,将允许您向文本文件中指定的 URL 列表发送请求 - 正确构建该 URL 列表(有一个代理)将为您带来一些好处测试还不错。
第三个,JMeter,将允许您创建更复杂的场景。
那个更复杂,您需要一些时间来使用它 - 但这可能会给您带来最好的结果。
You can send lots of requests to your server, using tools such as :
The first one, ab, will only allow you to send lots of a requests to a single URL -- which is great to benchmark a single script / page ; but doesn't reflect the real pattern of a user browsing your website (CSS/JS/images don't get loaded, for example).
The second one, siege, will allow you to send requests to a list of URLs, specified in a text file -- building that list of URLs properly (there is a proxy for that) will get you some not too bad tests.
And the third one, JMeter, will allow you to create more complex scenarios.
That one is more complex, and you'll need a bit of time to use it -- but that's probably what will get you the best results.
HTTP(S) 基准测试工具、测试/调试以及restAPI (RESTful)
按字母顺序排列(不喜欢)
HTTP(S) 基准测试工具
ab – 速度慢且单线程,用
C
编写
apib – ApacheBench 的大部分功能(
ab
),也被设计为更现代的替代品,编写在C
中
baloo – 富有表现力的端到端 HTTP API用 Go (
golang
) 编写,测试变得简单接力棒 – HTTP 负载测试,用 Go 编写 (
golang
)bombardier – 快速跨平台 HTTP 基准测试工具,用 Go 编写(
golang
)curl-loader – 性能加载各种应用程序服务并生成流量,用
C
编写
fasthttploader –基于 fasthttp 库的基准测试(有点 ab),具有自动调整和图表,用 Go 编写(
golang
)fortio< /a> – 加载测试库和命令行工具以及 Web UI。允许指定一组每秒查询负载并记录延迟直方图和其他有用的统计信息,用 Go 编写 (
golang
)gadling – 基于Scala、Akka和Netty的高性能负载测试框架,用
Scala
编写go-wrk –一个基于优秀 wrk 工具精神的 HTTP 基准测试工具 (
wg/wrk
), 用 Go 编写 (golang
)goad – Goad 是一个AWS Lambda 支持的高度分布式负载测试工具,用 Go 编写 (
golang
)gobench< /a> – HTTP/HTTPS 负载测试和基准测试工具,用 Go 编写 (
golang
)gohttpbench – < code>ab类在多核cpu上运行的基准测试工具,用Go编写(
golang
)hey – HTTP(S) 负载生成器,ApacheBench (
ab
) 替代品,以前称为 rakyll/boom,用 Go 编写 (golang
)htstress – 多线程高负载基准测试服务 (>5K rps),用
C
/Linux
编写
httperf – 配置困难,速度慢且单线程,用
C
编写
inundator – 一个简单且高级的吞吐量 HTTP 洪水程序,用
C
/Linux
编写
jmeter – Apache JMeter™,纯粹的应用程序,旨在在静态和动态资源上加载测试性能,用
Java
编写
locust – 易于使用的分布式负载测试工具,具有实时 Web UI。模拟一群并发用户,每个用户的行为都由您的 python 代码定义。用
Python
编写mgun –用于负载测试 HTTP 服务器的现代工具,用 Go 编写 (
golang
)pounce – 事件,但结果波动较大,有时比用
C
编写的htstress
更快siege – 速度慢且单线程,用
C
编写
slapper – 简单的负载测试工具实时更新的请求时间直方图,用 Go 编写 (
golang
)slow_cooker< /a> – 专注于生命周期问题和长时间运行测试的负载测试器,在很长一段时间内提供可预测负载和并发级别的服务,用 Go 编写 (
golang
)狙击手 – 强大且强大高性能 http 负载测试器,用 Go 编写 (
golang
)tsung – 模拟压力用户,以测试基于 IP 的客户端/服务器应用程序的可扩展性和性能
HTTP
、WebDAV
、SOAP
、PostgreSQL
、MySQL
、LDAP
和Jabber
/XMPP
服务器,用Erlang
编写
vegeta – HTTP 负载测试工具和库,用 Go 编写 (
golang
)< /p>weighttp – 多线程,但是比没有 keepalive 的 htstress 慢,用
C
编写wrk – 多线程~~,但不提供并发连接和keepalive开关~~,用
C
/Lua
编写
wrk2 – 恒定吞吐量、正确延迟记录 wrk 变体,用
C
/Lua
编写
yandex- Tank – 负载和性能基准测试工具,用
Python
/C|C++|Asm
编写 (幻影)用于测试/调试 HTTP(S) 和 RestAPI (RESTful) 的工具包
golang
)C
编写Python
编写编写C
SaaS/PaaS
链接
Mac、
Windows
和Linux
)来源:https://github.com/denji/awesome-http-benchmark
HTTP(S) benchmark tools, testing/debugging, & restAPI (RESTful)
Located in alphabetical order (not prefer)
HTTP(S) Benchmark Tools
ab – slow and single threaded, written in
C
apib – most of the features of ApacheBench (
ab
), also designed as a more modern replacement, written inC
baloo – Expressive end-to-end HTTP API testing made easy, written in Go (
golang
)baton – HTTP load testing, written in Go (
golang
)bombardier – Fast crossplatform HTTP benchmarking tool, written in Go (
golang
)curl-loader – performance loading of various application services and traffic generation, written in
C
fasthttploader – benchmark (kinda ab) with autoadjustment and charts based on fasthttp library, write in Go (
golang
)fortio – load testing library and command line tool and web UI. Allows to specify a set query-per-second load and record latency histograms and other useful stats, write in Go (
golang
)gatling – High performance load testing framework based on Scala, Akka and Netty, write in
Scala
go-wrk – a HTTP benchmarking tool based in spirit on the excellent wrk tool (
wg/wrk
), write in Go (golang
)goad – Goad is an AWS Lambda powered, highly distributed, load testing tool, write in Go (
golang
)gobench – HTTP/HTTPS load testing and benchmarking tool, write in Go (
golang
)gohttpbench –
ab
-like benchmark tool run on multi-core cpu, write in Go (golang
)hey – HTTP(S) load generator, ApacheBench (
ab
) replacement, formerly known as rakyll/boom, written in Go (golang
)htstress – multithreading high-load bechmarking services (>5K rps), written in
C
/Linux
httperf – difficult configuration, slow and single threaded, written in
C
inundator – A simple and high-throughput HTTP flood program, written in
C
/Linux
jmeter – Apache JMeter™, pure application designed to load test performance both on static and dynamic resources, written in
Java
locust – easy-to-use, distributed load testing tool with real-time web UI. Simulates a swarm of concurrent users, the behavior of each of them is defined by your python code. Written in
Python
mgun – A modern tool for load testing HTTP servers, written in Go (
golang
)pounce – evented, but results fluctuate, it's sometimes faster than
htstress
, written inC
siege – slow and single threaded, written in
C
slapper – Simple load testing tool with real-time updated histogram of request timings, written in Go (
golang
)slow_cooker – A load tester focused on lifecycle issues and long-running tests, service with a predictable load and concurrency level for a long period of time, written in Go (
golang
)sniper – powerful & high-performance http load tester, written in Go (
golang
)tsung – Simulate stress users in order to test the scalability and performance of IP based client/server applications
HTTP
,WebDAV
,SOAP
,PostgreSQL
,MySQL
,LDAP
andJabber
/XMPP
servers, written inErlang
vegeta – HTTP load testing tool and library, written in Go (
golang
)weighttp – multithreaded, but slower than htstress without keepalive, written in
C
wrk – multithreaded~~, but doesn't offer concurrent connections and a keepalive switch~~, written in
C
/Lua
wrk2 – constant throughput, correct latency recording variant of wrk, written in
C
/Lua
yandex-tank – Load and performance benchmark tool, written in
Python
/C|C++|Asm
(phantom)Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)
golang
)C
Python
C
SaaS/PaaS
Links
Mac
,Windows
, andLinux
)SOURCE: https://github.com/denji/awesome-http-benchmark
除了像 ab 这样明显的工具之外,您可能还想看看 tsung - 一个 erlang 之类的东西基于负载测试生成器。一个很好的功能是它能够执行分布式负载测试(即将流量生成分散到多台机器上)。
Apart from the obvious tools like ab, you might want to take a look at something like tsung - an erlang based load test generator. One nice feature is it's ability to perform distributed load tests (that is, splitting the traffic generation over a number of machines).
我使用 jmeter 对我的 Web 应用程序进行负载测试。它可能会满足您的需求。
http://jmeter.apache.org/
I use jmeter to the load test my web applications. It might do what you are looking for.
http://jmeter.apache.org/
Apache Bench 简单明了。有大量教程。
Apache Bench is easy and straightforward. There are plenty of tutorials.