2

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:

  1. Which alternative should work the best with Puma?
  2. 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?
  3. Is there a specific configuration or usage of EventMachine/Celluloid that I should use in order to accomplish that?
  4. As a whole, any thought regarding this scenario would be appreciated.
Community
  • 1
  • 1
naviram
  • 1,445
  • 1
  • 15
  • 26
  • Have you tried pure `Reel`? – digitalextremist Sep 04 '16 at 16:04
  • https://github.com/celluloid/reel – digitalextremist Sep 04 '16 at 16:05
  • I have read about it and was disappointed from the benchmark results here - http://www.madebymarket.com/blog/dev/ruby-web-benchmark-report.html , and after seeing how well puma scales in action, it seems that I will focus my efforts in Puma with jRuby and EM or jubilee. They seem more promising. However, jubilee has issues and in general vert.x in ruby is not something that many people tried on the web, and this is a clear disadvantage. – naviram Sep 05 '16 at 16:34
  • Your information seems skewed but good luck. I've seen companies use Reel and Puma side by side, as well as Rubinius and jRuby side by side. There is plenty of HTTP/S exposure for Ruby, it's just not mainstream. – digitalextremist Sep 05 '16 at 16:37

0 Answers0