Home

Awesome

Ruby Application Server Experiments

How to Test?

First run:

./bin/slow-server.rb

This would simulate a slow remote server, which has two possible behaviours, one for responding very slowly, and another for responding a very large response. 4M data, to be precise. Then you can run the desired server to be tested. After you launched the desired server, you can siege it via:

http://localhost:8080/cpu

which is a CPU bound request.

http://localhost:8080/latency

which would try to get response from the slow remote server for slow response.

http://localhost:8080/through

which would try to get response from the slow remote server for large data.

TL;DR

Recommendation

What Server to Pick?

Thread pool based: (for fast clients (i.e. have nginx or so in front) and should setup pool size accordingly)

Thread spawn based: (for fast clients (i.e. have nginx or so in front))

Fiber pool based: (not recommended)

Fiber spawn based: (not recommended)

EventMachine based: (for slow clients (i.e. no nginx or so in front) and non-CPU bound apps)

EventMachine and thread pool based: (for slow clients (i.e. no nginx or so in front) and should setup pool size accordingly)

EventMachine and thread spawn based: (for slow clients (i.e. no nginx or so in front))

EventMachine and fiber spawn based: (for slow clients (i.e. no nginx or so in front) and for non-CPU bound apps)