1. 什么是httpd
httpd is the Apache HyperText Transfer Protocol (HTTP) server program.
It is designed to be run as a standalone daemon process. When used
like this it will create a pool of child processes or threads to
handle requests.
2. 什么是ab
ab is a tool for benchmarking your Apache Hypertext Transfer Protocol
(HTTP) server. It is designed to give you an impression of how your
current Apache installation performs. This especially shows you how
many requests per second your Apache installation is capable of
serving.
2.1. ab命令及其参数
ab
[ -A auth-username:password ]
[ -b windowsize ] [ -B local-address ] [ -c concurrency ] [ -C cookie-name=value ] [ -d ] [ -e csv-file ] [ -E client-certificate file ] [ -f protocol ] [ -g gnuplot-file ] [ -h ] [ -H custom-header ] [ -i ] [ -k ] [ -l ] [ -m HTTP-method ]
[ -n requests ] [ -p POST-file ] [ -P proxy-auth-username:password ] [ -q ] [ -r ]
[ -s timeout ] [ -S ] [ -t timelimit ] [ -T content-type ] [ -u PUT-file ] [ -v verbosity] [ -V ] [ -w ] [ -x <table>-attributes ] [ -X proxy[:port] ] [ -y <tr>-attributes ] [ -z <td>-attributes ] [ -Z ciphersuite ] [http[s]://]hostname[:port]/path
3. 小结
httpd
是apache
提供的一个http服务器,它可以创建多个线程或进程处理请求ab
是httpd
附带的一款测试工具,利用该工具提供的命令可以测试服务器请求处理能力