Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A performance shootout for REST libraries and frameworks
Scala JavaScript
branch: master

This branch is 19 commits behind Versal:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
blueeyes
finagle
finatra
lift
node.js
pinky
play2-mini
play2
scalatra
servlet-3.0-async
servlet-3.0
spray-can
.gitignore
README.md
fast-test.jmx
load-test.jmx

README.md

About

Scamper is a collection of RESTful libraries and frameworks, organized as a testbed for comparing the raw performance characteristics of each.

Each implementation exposes the same three endpoints:

  • GET /fast blocks for 0 ms
  • GET /medium blocks for 150 ms
  • GET /slow blocks for 300 ms

Each endpoint responds with <h1>slept for { duration } ms</h1>, where duration is the actual amount of time spent blocking.

Each implementation runs on localhost:9000 and can be tested with a variety of tools, such as ApacheBench or JMeter.

Test results

For full test results, see the Wiki.

Summary

Library Fast Test (requests per second)
Servlet 3.0 18772.3
Asynchronous Servlet 3.0 17528.5
BlueEyes (Netty) 14716.7
spray-can 13338.7
Scalatra 12434.7
Play 2 mini (Prod) 9388.8
Node.js 7401.4
Lift 4875.2
BlueEyes (Jetty) 4017.7
Pinky 4008.8
Play 2 (Dev) 1250.5
Finatra 466.4
Finagle DNF

Getting started

Download scamper

git clone git://github.com/Versal/scamper.git

Install JMeter

http://jmeter.apache.org/

Install Node.js

brew install nodejs
npm install -g express
(cd scamper/node.js ; npm link express)

Install sbt (0.12.0 or newer)

https://github.com/harrah/xsbt/wiki/Getting-Started-Setup

Run and test each implementation

Each server can be tested with JMeter or ApacheBench:

jmeter -n -t scamper/load-test.jmx
jmeter -n -t scamper/fast-test.jmx
ab -c 5 -n 10000 127.0.0.1:9000/fast

BlueEyes

(cd scamper/blueeyes ; sbt "run --configFile blueeyes.config")

Finagle

(cd scamper/finagle ; sbt run)

Lift

(cd scamper/lift ; sbt run)

Pinky

(cd scamper/pinky ; sbt update run)

Play 2.0

(cd scamper/play2 ; sbt start)

Play 2.0 mini

(cd scamper/play2-mini ; sbt run)

spray-can

(cd scamper/spray-can ; sbt run)

Servlet 3.0

(cd scamper/servlet-3.0 ; sbt run)

Asynchronous Servlet 3.0

(cd scamper/servlet-3.0-async ; sbt run)

Scalatra

(cd scamper/scalatra ; sbt run)

Node.js

(ulimit -n 4096 ; cd scamper/node.js ; node app.js)

Finatra

(cd scamper/finatra ; sbt run)
Something went wrong with that request. Please try again.