几种基于java/scala的REST框架性能简单测试

2018-12-15  本文已影响0人  禅大师

测试服务器:DELL R420 CPU Intel(R) Xeon(R) CPU E5-2420 内存 32G
操作系统:centos6.3
JVM: 1.6

测试客户端:
同上

网络环境:
100M交换机直连

基准测试: java/Jetty
依赖库:jetty-all-7.6.8, servlet-api-2.5

ab -c 100 -n 1000 Requests per second: 18041.10 [#/sec]
ab -c 200 -n 1000 Requests per second: 17087.59 [#/sec]
ab -c 500 -n 1000 Requests per second: 15134.78 [#/sec]

scala/scalatra
依赖库:Scala 2.9.2, jetty8.17
ab -c 100 -n 1000 Requests per second: 1004.86 [#/sec]
ab -c 200 -n 1000 Requests per second: 1093.27 [#/sec]
ab -c 500 -n 1000 Requests per second: 1134.84 [#/sec]

scala/play-mini
依赖库:Scala 2.10.0, akka2.10
ab -c 100 -n 1000 Requests per second: 8328.75 [#/sec]
ab -c 200 -n 1000 Requests per second: 8392.29 [#/sec]
ab -c 500 -n 1000 Requests per second: 7466.20 [#/sec]

scala/spray
依赖库:Scala 2.10.0, spray1.1
ab -c 100 -n 1000 Requests per second: 4564.86 [#/sec]
ab -c 200 -n 1000 Requests per second: 4665.01 [#/sec]
ab -c 500 -n 1000 Requests per second: 4330.07 [#/sec]

java/spring
依赖库:jetty-8.1.1, spring3
ab -c 100 -n 1000 Requests per second: 13579.39 [#/sec]
ab -c 200 -n 1000 Requests per second: 16049.56 [#/sec]
ab -c 500 -n 1000 Requests per second: 14456.09 [#/sec]

java/resteasy
依赖库:jetty-6.1,
ab -c 100 -n 1000 Requests per second: 4807.99 [#/sec]
ab -c 200 -n 1000 Requests per second: 4721.93 [#/sec]
ab -c 500 -n 1000 Requests per second: 4440.28 [#/sec]

上一篇下一篇

猜你喜欢

热点阅读