3

如何去消耗服务端资源

 3 years ago
source link: https://lineuman.github.io/blog/2018/04/18/%E5%A6%82%E4%BD%95%E5%8E%BB%E6%B6%88%E8%80%97%E6%9C%8D%E5%8A%A1%E7%AB%AF%E8%B5%84%E6%BA%90.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Neuman’s blog

如何去消耗服务端资源

Apr 18, 2018

本篇文章主要记录消耗服务端资源的方法,可以当作性能测试的一部分。

首先我们大致列出服务端资源都有什么: 网络宽带,内存,CPU,文件句句柄,socket连接,mysql连接数,redis缓存,发送邮件,发送短信验证码

如何占用宽带?

设置网卡流量限速

如何占用socket资源

ddos攻击,例如syn泛洪攻击

如何保持http连接占用?

你是否还记得当初的slowhttptest?今天突然想到了她,眼泪不自觉的流了下来

https://null-byte.wonderhowto.com/how-to/dos-using-slowhttptest-0159548/

你是否还记得小巧强悍的性能测试工具wrk

./wrk -t4 -c1001 -d30s $url

如何保持mysql连接占用?

用户在转账时候数据库连接数满了 比如你想模拟数据库资源被占满的情况,那么你就可以使用jdbc执行sql但是不close. 例如使用jdbc不close就会占用连接。

Neuman's blog

My name is neuman, I am a primary coder. Last two years, I worked as a software test engineer. Now, I spend time on security and web development. If you like my blog, please give me some advice.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK