apache ab压力测试
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> ab的原理:ab命令会创建多个并发访问线程,模拟多个访问者同时对摸一个URL地址进行访问。它的测试目标是基于URL的,因此它既可以用来测试apache的负载压力,也可以测试nginx、lighthttp、tomcat、IIS等其他web服务器的压力。 $ ab -n1000 -c10 http://localhost:3000/ 1000条请求,10个并发 相关参数: -n requests Number of requests to perform -c concurrency Number of multiple requests to make at a time -t timelimit Seconds to max. to spend on benchmarking This implies -n 50000 -s timeout Seconds to max. wait for each response Default is 30 seconds -b windowsize Size of TCP send/receive buffer, in bytes -B address Address to bind to when making outgoing connections -p