wrk -t4 -c400 -d10s http://127.0.0.1:1337/
Running 10s test @ http://127.0.0.1:1337/
4 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 7.02ms 6.94ms 82.86ms 85.27%
Req/Sec 827.17 552.85 2.38k 66.54%
22543 requests in 10.07s, 3.61MB read
Socket errors: connect 151, read 22680, write 86, timeout 0
Requests/sec: 2238.19
Transfer/sec: 367.20KB
Running 10s test @ http://127.0.0.1:1337/
4 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 20.34ms 4.50ms 125.04ms 97.89%
Req/Sec 3.09k 1.93k 6.06k 55.00%
122838 requests in 10.02s, 23.66MB read
Socket errors: connect 151, read 69, write 73, timeout 0
Requests/sec: 12263.37
Transfer/sec: 2.36MB
Node.js v6
Running 10s test @ http://127.0.0.1:1337/
4 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 33.73ms 11.66ms 276.14ms 89.75%
Req/Sec 2.78k 246.07 3.09k 92.50%
110714 requests in 10.01s, 21.33MB read
Requests/sec: 11061.55
Transfer/sec: 2.13MB
PHP 5.6 + StreamSelectLoop
Running 10s test @ http://127.0.0.1:1337/
4 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 21.47ms 100.17ms 1.75s 98.43%
Req/Sec 797.22 161.79 1.25k 63.00%
31743 requests in 10.01s, 5.09MB read
Socket errors: connect 0, read 31743, write 0, timeout 29
Requests/sec: 3169.99
Transfer/sec: 520.08KB
PHP 5.6 + LibEventLoop
Running 10s test @ http://127.0.0.1:1337/
4 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 22.29ms 99.64ms 1.77s 98.33%
Req/Sec 759.40 211.63 1.30k 69.00%
30235 requests in 10.01s, 4.84MB read
Socket errors: connect 0, read 30250, write 0, timeout 22
Requests/sec: 3020.05
Transfer/sec: 495.48KB
PHP 5.6 + ExtEventLoop
Running 10s test @ http://127.0.0.1:1337/
4 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 21.13ms 92.95ms 1.89s 98.73%
Req/Sec 721.25 192.93 1.16k 62.75%
28728 requests in 10.01s, 4.60MB read
Socket errors: connect 0, read 28725, write 0, timeout 26
Requests/sec: 2869.25
Transfer/sec: 470.74KB
PHP 5.6 + LibEvLoop
Running 10s test @ http://127.0.0.1:1337/
4 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 27.46ms 121.37ms 1.62s 97.54%
Req/Sec 766.31 243.96 1.25k 67.50%
30526 requests in 10.01s, 4.89MB read
Socket errors: connect 0, read 30525, write 0, timeout 23
Requests/sec: 3048.09
Transfer/sec: 500.08KB
PHP 7.0 + StreamSelectLoop
Running 10s test @ http://127.0.0.1:1337/
4 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 33.61ms 152.67ms 1.93s 96.21%
Req/Sec 1.18k 342.69 2.07k 65.25%
46961 requests in 10.01s, 7.52MB read
Socket errors: connect 0, read 46960, write 0, timeout 37
Requests/sec: 4691.54
Transfer/sec: 769.71KB
PHP 7.0 + ExtEventLoop
Running 10s test @ http://127.0.0.1:1337/
4 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 30.01ms 132.79ms 1.92s 96.86%
Req/Sec 1.04k 411.40 2.26k 65.99%
41411 requests in 10.01s, 6.63MB read
Socket errors: connect 0, read 41409, write 0, timeout 48
Requests/sec: 4135.73
Transfer/sec: 678.52KB
ReactPHP 0.4.1 + PHP 7.1 + StreamSelectLoop
Running 10s test @ http://127.0.0.1:1337/
4 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 24.44ms 121.70ms 1.88s 97.26%
Req/Sec 1.18k 316.86 1.96k 68.00%
47053 requests in 10.01s, 7.54MB read
Socket errors: connect 0, read 47053, write 0, timeout 36
Requests/sec: 4698.87
Transfer/sec: 770.91KB
ReactPHP Dev + PHP 7.1 + StreamSelectLoop
Running 10s test @ http://127.0.0.1:1337/
4 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 33.93ms 149.99ms 1.88s 95.62%
Req/Sec 1.39k 406.67 2.76k 68.25%
55544 requests in 10.06s, 8.90MB read
Socket errors: connect 0, read 55543, write 0, timeout 46
Requests/sec: 5520.35
Transfer/sec: 0.88MB
Notes:
Note that we are using ratchet-php as light WAMP socket server for two years now, it used to be buggy and resource hug but since the last year it became pretty much stable. I ran these benchmark to see if we can put under more traffic.