I am using a puma server for a service that aggregates responses from 14 HTTP Client requests. I have some dependency between the requests, but they can be paralleled in some level. Each request can take 1.8s seconds while the ruby/cpu time is only 50ms (97.3% IO).
Currently, I am working with auto scaled heroku dynos with 2 processes of 25 threads each. With MRI/CRuby and assume that jRuby will increase scalability greatly, since I agree with Elyasin's claim.
Puma is doing a great job in handling concurrent requests while other requests is IO blocked. But I still need and plan to parallel the HTTP client requests in a non-blocking fashion.
Before benchmarking vert.x with jubilee on my scenario. I wish to benchmark standard ruby options like EventMachine::MultiRequest or Celluloid, or other suggested options. In order to really know how much jubilee/vert.x performs better than puma with event-machine. See Ruby benchmarks and jubilee.
And my questions are:
- Which alternative should work the best with Puma?
- Which alternative is deigned in a way that will work the best Puma's event loop and is promised to enable Puma handle concurrent request when EM::HttpRequest(for example) is "non-blockly waiting" for a response?
- Is there a specific configuration or usage of EventMachine/Celluloid that I should use in order to accomplish that?
- As a whole, any thought regarding this scenario would be appreciated.