Forum: Ruby on Rails [ANN] AjpRails; Rails runner using AJP13

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Yugui (Guest)
on 2006-02-02 07:53
(Received via mailing list)
Hello, all.

I released AjpRails 0.1.0. AjpRails is a script for running Ruby on
Rails. Rails this script runs uses AJP13(Apache JServ Protocol 1.3)
instead of CGI or FastCGI, to cooperate with your HTTPd.

Its RubyForge project is:
  http://rubyforge.org/projects/ruby-ajp/
Project home page is:
  http://ruby-ajp.rubyforge.org/wiki/wiki.pl

Now, AjpRails is slower and much more unstable than dispatcher.fcgi or
SCGI Rails Runner. But these weak points will be improved gradually.

Thanks.

--
Yugui
removed_email_address@domain.invalid
http://idm.s9.xrea.com
Jim N. (Guest)
on 2006-02-02 17:42
(Received via mailing list)
Very interesting!  So, would the idea be that one could use mod_jk (or
similar) to talk to a ruby process through a socket?

What's the motivation for this project?
Adam D. (Guest)
on 2006-02-02 18:19
(Received via mailing list)
i am curious about this as well.  Does this work with mod_jk ?  Any
performance numbers on this way vs FCGI ?
Yugui (Guest)
on 2006-02-04 17:00
(Received via mailing list)
2006/2/3, Jim N. <removed_email_address@domain.invalid>:
> Very interesting!  So, would the idea be that one could use mod_jk (or
> similar) to talk to a ruby process through a socket?

Yes, you can use mod_jk on the HTTPd-side.

 * The load balancing of mod_jk is attractive.
 * mod_jk is familiar to Java programmers and even their pointy-haired
bosses.
So I think it is worth trying to implement AJP13 in Ruby.

I started implementing it just for fun. But now, I think Ruby's AJP
implementation can save some programmers from the pointy-haired.
Yugui (Guest)
on 2006-02-04 17:33
(Received via mailing list)
2006/2/3, Adam D. <removed_email_address@domain.invalid>:
> i am curious about this as well.  Does this work with mod_jk ?  Any
> performance numbers on this way vs FCGI ?

I tested performance numbers using the depot application of "Agile Web
Development with Rails" ("/store/index").

== net/http ver.
The following is the results of my casual tests using net/http.

=== AJP13:
                              user     system      total        real
1 thread * 1000 reqs:     0.870000   0.240000   1.110000 ( 52.369711)
10 threads * 100 reqs:    0.000000   0.010000   0.010000 (  0.006555)
100 threads * 10 reqs:    0.040000   0.010000   0.050000 (  0.134293)
1000 threads * 1 req:     1.670000   0.150000   1.820000 (  6.378787)

=== FCGI(mod_fcgid)
                              user     system      total        real
1 thread * 1000  reqs:    1.240000   0.170000   1.410000 ( 12.498863)
10 threads * 100 reqs:    0.000000   0.000000   0.000000 (  0.005302)
100 threads * 10 reqs:    0.090000   0.020000   0.110000 (  0.221380)
1000 threads * 1  req:    2.080000   0.170000   2.250000 (  4.680722)


== Apache bench
The following is by apache bench.

=== AJP13
Concurrency Level:      100
Time taken for tests:   130.928882 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Total transferred:      34950000 bytes
HTML transferred:       31890000 bytes
Requests per second:    76.38 [#/sec] (mean)
Time per request:       1309.289 [ms] (mean)
Time per request:       13.093 [ms] (mean, across all concurrent
requests)
Transfer rate:          260.68 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.4      0       5
Processing:   278 1301  77.7   1297    1887
Waiting:      277 1301  77.7   1297    1887
Total:        283 1301  77.5   1297    1891

Percentage of the requests served within a certain time (ms)
  50%   1297
  66%   1319
  75%   1335
  80%   1345
  90%   1377
  95%   1410
  98%   1476
  99%   1516
 100%   1891 (longest request)


=== FCGI
Concurrency Level:      100
Time taken for tests:   29.289262 seconds
Complete requests:      10000
Failed requests:        1731
   (Connect: 0, Length: 1731, Exceptions: 0)
Write errors:           0
Non-2xx responses:      8303
Total transferred:      11793228 bytes
HTML transferred:       9194509 bytes
Requests per second:    341.42 [#/sec] (mean)
Time per request:       292.893 [ms] (mean)
Time per request:       2.929 [ms] (mean, across all concurrent
requests)
Transfer rate:          393.18 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.9      0       6
Processing:    46  291 607.2    192   13346
Waiting:       45  283 555.3    192    9417
Total:         47  291 607.4    192   13346

Percentage of the requests served within a certain time (ms)
  50%    192
  66%    215
  75%    231
  80%    239
  90%    277
  95%    807
  98%   1993
  99%   4199
 100%  13346 (longest request)

Hmm..., there is too many non-2xx response, is there?

--
Yugui
removed_email_address@domain.invalid
http://idm.s9.xrea.com
This topic is locked and can not be replied to.