动态web页面 的速度跟nginx服务下的静态页面的支持速度,天壤之别啊。 (dynamic pages is so slow comparing to static pages served by nginx)

访问量: 1565

今天心血来潮,比较了一下静态服务器和动态WEB服务器,在同样并发下的相应速度。 前者是后者速度的50倍。 在我的机器上轻松支撑到 15K req/s, 而 使用了cache的 rails : 300 req/s. 哎。。。 (in short: nginx serving static page is 50 faster then rails server using cache)

thin:  

Concurrency Level:      1000
Time taken for tests:   3.068 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      574000 bytes
HTML transferred:       311000 bytes
Requests per second:    325.98 [#/sec] (mean)
Time per request:       3067.652 [ms] (mean)
Time per request:       3.068 [ms] (mean, across all concurrent requests)
Transfer rate:          182.73 [Kbytes/sec] received

nginx:

Concurrency Level:      1000
Time taken for tests:   0.068 seconds
Complete requests:      1000
Failed requests:        1000
   (Connect: 0, Receive: 0, Length: 766, Exceptions: 234)
Write errors:           0
Non-2xx responses:      481
Total transferred:      415286 bytes
HTML transferred:       271101 bytes
Requests per second:    14735.35 [#/sec] (mean)
Time per request:       67.864 [ms] (mean)
Time per request:       0.068 [ms] (mean, across all concurrent requests)
Transfer rate:          5975.96 [Kbytes/sec] received

订阅/RSS Feed

Subscribe

分类/category