HTTPS的压力测试工具 -- http_load

http_load是一款用于测试web服务器吞吐量的工具,它能在单个进程中并发执行多个HTTPS请求,避免客户端资源占用过多。该工具允许指定URL列表、并发连接数、总请求次数或持续时间等参数,还可以进行速率限制、错误检查等功能。根据给出的示例,http_load显示了详细的性能指标,如请求次数、平均响应时间和字节传输速率。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

http_load

1. 官方描述:
  • http_load runs multiple http fetches in parallel, to test the throughput of a web server. However unlike most such test clients, it runs in a single process, so it doesn't bog down the client machine. It can be configured to do https fetches as well.
  • You give it a file containing a list of URLs that may be fetched, a flag specifying how to start connections (either by rate or by number of simulated users), and a flag specifying when to quit (either after a given number of fetches or a given elapsed time). There are also optional flags for checksums, throttling, random jitter, and progress reports.

reference: http://www.acme.com/software/http_load/

 


2. 安装方法:

 

  • 将MakeFile中的SSL_TREE,SSL_DEFS,SSL_INC,SSL_LIBS注释去掉。其中SSL_TREE是openssl的安装路径。
  • 如果是Solaris这样的SystemV系统,将SYSV_LIBS注释去掉

 

3. 使用方法:
http_load -parallel 5 -fetches 1000 urls.txt  
http_load -rate 2 -seconds 300 urls.txt  
样例含义
  • -parallel 简写-p :含义是并发的用户进程数。
  • -fetches 简写-f :含义是总计的访问次数
  • -rate 简写-r :含义是每秒的访问频率
  • -seconds简写-s :含义是总计的访问时间
  • urls.txt 是一个url 列表,每个url 单独的一行;不可以直接跟一个url,有些博客主说的可以跟一个url是错误的说法。
4. 结果分析:
49 fetches, 2 max parallel, 289884 bytes, in 10.0148 seconds
5916 mean bytes/connection
4.89274 fetches/sec, 28945.5 bytes/sec
msecs/connect: 28.8932 mean, 44.243 max, 24.488 min
msecs/first-response: 63.5362 mean, 81.624 max, 57.803 min
HTTP response codes:
  code 200 -- 49
  • 49 fetches, 2 max parallel, 289884 bytes, in 10.0148 seconds
  • 一共发送了49次请求,最大并发数是2,发送了289884 字节, 用时10.0148秒
  • 5916 mean bytes/connection 
  • 每次请求平均发送5916字节
  • 4.89274 fetches/sec, 28945.5 bytes/sec  
  • 每秒请求数是4.89274(qps) , 每秒发送28945.5字节 
  • msecs/connect: 28.8932 mean, 44.243 max, 24.488 min
  • 平均每个请求耗时28.8932msecs, 请求耗时最大44.243 msecs, 最小耗时24.488 msecs
  • msecs/first-response: 63.5362 mean, 81.624 max, 57.803 min
  • 首次平均响应时间63.5362msecs, 最大耗时81.624msecs, 最小耗时57.803msecs
  • HTTP response codes: code 200 -- 49
  • http响应码,返回200的有49次

 

由于http_load自身https的算法问题,发送压力测试请求的client机器成为了瓶颈,无法体现真实的https数据。所以又采用了httperf进行测试。
压力测试集合
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值