FastNetMon

Wednesday 20 January 2010

Nginx 0.7.64 + reload ( graceful ) - насколько хорошо работает?

Протестируем следующим образом.

На тестовой машине:
while true; do /etc/init.d/nginx reload ; sleep 1; done


На машине, где запускаем ab:
ab -c 10 -n 1000 http://test1.ru:80/


В итоге имеем отличные результаты:

Server Software: nginx
Server Hostname: test1.ru
Server Port: 80

Document Path: /
Document Length: 4970 bytes

Concurrency Level: 10
Time taken for tests: 19.418320 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 5163000 bytes
HTML transferred: 4970000 bytes
Requests per second: 51.50 [#/sec] (mean)
Time per request: 194.183 [ms] (mean)
Time per request: 19.418 [ms] (mean, across all concurrent requests)
Transfer rate: 259.60 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.5 0 9
Processing: 0 220 31.0 216 311
Waiting: 0 219 31.0 216 310
Total: 0 220 31.0 216 311

Percentage of the requests served within a certain time (ms)
50% 216
66% 224
75% 229
80% 235
90% 257
95% 271
98% 279
99% 287
100% 311 (longest request)


То есть не потеряно ни одного пакета и нету явных провалов по скорости.

Nginx при этом занимался проксированием Apache:

location / {
proxy_pass http://xx.xx.xx.xx:8080;
proxy_redirect http://v1.test.ru:8080/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}

No comments :

Post a Comment

Note: only a member of this blog may post a comment.