Forum: JRuby Which Rack web server?

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.
58c538d6f6e8fbf54779c5607e567bff?d=identicon&s=25 John B. (john_b)
on 2015-04-27 18:57
(Received via mailing list)
Which Rack web server are folks using with JRuby? Any particularly bad
or
good experiences?

I suppose the only ones that support threading are Puma and Passenger?
4bfcb18ca5298df54d8eb410244d004f?d=identicon&s=25 Uwe Kubosch (donv)
on 2015-04-27 21:29
(Received via mailing list)
We are using Puma and are very happy with it.  We used to use trinidad
and were happy with that to.

The http://www.madebymarket.com/blog/dev/ruby-web-benc...
was a trigger for us to switch in addition to puma supporting both MRI
and JRuby.  heroku’s move to puma as the recommended rack server was
also a factor.

We have been looking at torquebox 4 (not torquebox 3), but we will stick
with puma for a long while, I think.


> On 2015-04-27, at 18:55, John Joseph Bachir <johnjosephbachir@gmail.com> wrote:
>
> Which Rack web server are folks using with JRuby? Any particularly bad or good
experiences?
>
> I suppose the only ones that support threading are Puma and Passenger?

--
Uwe Kubosch
uwe@kubosch.no
http://kubosch.no/
A8f7c2b66fafa83e9537c1f82348f11d?d=identicon&s=25 Doug Hathaway (Guest)
on 2015-04-27 21:31
(Received via mailing list)
Tomcat deployed via Warbler.

On Mon, Apr 27, 2015 at 12:55 PM, John Joseph Bachir <
2c0c4cf3ccc8da22f7c3b9586ce1cd70?d=identicon&s=25 Christian MICHON (Guest)
on 2015-04-28 23:36
(Received via mailing list)
Mizuno (jetty).
- fastest from what I measured with apache-bench on my machines
- simplest configuration (almost none)

Only drawback: CTRL-C does not work well on Windows (the java process
will
be detached and will keep running), you might need to implement a
shutdown
hook in your app.
8ec3fe4f1729b3c07e3ea19421e6b646?d=identicon&s=25 Benjamin Ortega (Guest)
on 2015-04-29 00:05
(Received via mailing list)
We use Trinidad (multithreaded) and are satisfied with it. It's fast
enough
and it scales and can be monitored nicely. We use Passenger for MRI apps
and have considered standardizing on Passenger or puma for everything,
but
don't have any specific plans to do so.

FWIW I think you have to buy Passenger Enterprise to run your app
multithreaded on Passenger.

On Tue, Apr 28, 2015 at 4:34 PM, Christian MICHON <
8c21306523b16ba5dd35c3549bf90994?d=identicon&s=25 Theo Hultberg (Guest)
on 2015-04-30 08:01
(Received via mailing list)
Our experience is that there doesn't exist a good, correct, performant
rack
server for JRuby. We've used most of them, for two use cases: embedded
status APIs in long running applications and as the primary interface
for
applications with a HTTP API.

We package our applications as standalone JAR files with JRuby and all
gems, and run them with `java -jar ...`, and this rules our some of the
options. Either because some servers just don't work when run that way
because they assume they will be able to muck about with the file system
any way they like, or because they need to be in control, they need to
be
the container of the application.

These are the servers we've tried, and our experience. If your use case
is
different, for example serving Rails apps, this may not be your
experience:

* Fishwife is the only one we've found that doesn't have significant
bugs
and can be embedded. It's not perfect, but it works well for us.

* Mizuno is the precursor to Fishwife, and it hasn't been updated in
years.

* Puma is nice and I'd really like to use it, but the error handling is
buggy. It has often filled up disks with error messages. I think the
worst
of this has been fixed, but in our experience it doesn't handle
connection
errors very well. We stay well away from Puma.

* Jubilee showed some great promise but then development stopped. We
haven't tried the last released version, but the last version we tried
had
significant bugs around request body handling.

* rack-jetty was abandoned several years ago and doesn't handle request
bodies over 4 KiB.

* I'm not aware of any major bugs in Trinidad, but it doesn't work when
embedded.

* Torquebox is also not embeddable, and version 4 is starting to feel
like
vaporware.

* WEBrick works surprisingly well for status APIs that don't get called
very often.

As I said, our use case is very different from serving a Rails
application,
so your experience will probably be different.

T#

On Wed, Apr 29, 2015 at 12:04 AM, Benjamin Ortega <ben.ortega@gmail.com>
2c0c4cf3ccc8da22f7c3b9586ce1cd70?d=identicon&s=25 Christian MICHON (Guest)
on 2015-04-30 08:12
(Received via mailing list)
@Theo:

A small correction is needed on this specific sentence: "Mizuno is the
precursor to Fishwife, and it hasn't been updated in years"

Mizuno had a new release 1 week ago and the last one before was less
than 9
months ago...
8c21306523b16ba5dd35c3549bf90994?d=identicon&s=25 Theo Hultberg (Guest)
on 2015-04-30 09:23
(Received via mailing list)
Christian, my bad, last I checked it was dead, but looking at the repo
now
it has had some activity. That said, the diff between now and two years
ago
is just updates between maintenance releases of Jetty and a setting for
the
min number of threads, so I'll revise my statement to "it basically
hasn't
been updated in years". That doesn't mean that it's bad or unstable,
just
that it might be hard to get bugs fixed.

T#

On Thu, Apr 30, 2015 at 8:10 AM, Christian MICHON <
2c0c4cf3ccc8da22f7c3b9586ce1cd70?d=identicon&s=25 Christian MICHON (Guest)
on 2015-04-30 10:51
(Received via mailing list)
Fishwife seems to be a well maintained product.

Yet it may not work with legacy rack applications, as it is not
compatible
with ruby 1.8 mode. In 1.8 mode, you'll get systematically the following
500 error:
[qtp1296674576-15] ERROR fishwife.RackServlet - On service:
uninitialized
constant Fishwife::RackServlet::ASCII_8BIT

But thanks for mentioning this gem Theo. :-)
8c21306523b16ba5dd35c3549bf90994?d=identicon&s=25 Theo Hultberg (Guest)
on 2015-05-01 14:19
(Received via mailing list)
IIRC Fishwife also does not support Java 6 because of it's use of Jetty
9.
On the other hand both Ruby 1.8 and Java 6 are EOL, so I don't think
anyone
can be blamed for not supporting them anymore. I guess you could argue
that
JRuby in 1.8 mode is not EOL just because MRI 1.8 is EOL, though, but
still, legacy code bases that can't be updated will also require legacy
versions of dependencies.

T#

On Thu, Apr 30, 2015 at 10:50 AM, Christian MICHON <
This topic is locked and can not be replied to.