Varnish vs Apache Traffic Server

羊驼君 发布于 2016/10/26 16:10
阅读 519
收藏 2

测试了两个 Web 代理缓存, Varnish 和 Apache Traffic Server
在同一台服务器上使用 ab 测试一张 logo.png 大小 4Kb 的图片
Varnish版本: 5.0.0
Traffic 版本:6.2.0 
Varnish 和 Traffic 分别进行 5 次压测

Varnish 压测数据: 

# ab -c 1000 -n 10000 http://192.168.1.200/logo.png

Requests per second:    11881.18 [#/sec] (mean)
Requests per second:    11973.74 [#/sec] (mean)
Requests per second:    11974.43 [#/sec] (mean)
Requests per second:    11977.81 [#/sec] (mean)
Requests per second:    11827.24 [#/sec] (mean)

# ab -c 5000 -n 10000 http://192.168.1.200/logo.png

Requests per second:    5815.44 [#/sec] (mean)
Requests per second:    5816.46 [#/sec] (mean)
Requests per second:    5802.96 [#/sec] (mean)
Requests per second:    5798.86 [#/sec] (mean)
Requests per second:    3017.68 [#/sec] (mean)

Apache Traffic Server 压测数据: 

# ab -c 1000 -n 10000 http://192.168.1.200/logo.png

Requests per second:    11927.59 [#/sec] (mean)
Requests per second:    11953.17 [#/sec] (mean)
Requests per second:    9932.58 [#/sec] (mean)
Requests per second:    11217.80 [#/sec] (mean)
Requests per second:    9318.23 [#/sec] (mean)


# ab -c 5000 -n 10000 http://192.168.1.200/logo.png

Requests per second:    14260.29 [#/sec] (mean)
Requests per second:    14506.04 [#/sec] (mean)
Requests per second:    11901.59 [#/sec] (mean)
Requests per second:    14637.71 [#/sec] (mean)
Requests per second:    8111.50 [#/sec] (mean)

结论: 之前有人说 Varnish 在高并发下确实性能会有下降,而 Apache Traffic Server 高并发下表现令人满意,测试中两者几乎没有 Failed Requests。如果直接用 Nginx ,1000 并发下平均 11112.33/rps, 当5000 并发下则会出现严重的连接错误。




返回顶部
顶部