What does HackerNews think of rack?

A modular Ruby web server interface.

Language: Ruby

#11 in Ruby
I did 65k concurrent requests back in 2018 on a single core in Ruby 2.4/2.5 or so (see https://wjwh.eu/posts/2018-10-29-double-hijack.html) as long as each request doesn't do much. Having 6k open connections is not that much. Did you actually mean request/seq?

EDIT: I was curious on how many req/s modern Ruby would actually do for simple hello world, so I coded up the smallest Hello world example from https://github.com/rack/rack and ran it with the (default) Puma webserver, limited to 4 threads (and thus cores) with `-t 4`. According to `ab`, it averages around 8500 requests per second over a sample size of 100k requests. I didn't find out how to run rack apps with YJIT yet, but it seems reasonable to expect that to speed it up a bit further.

Coming from the Ruby ecosystem, a lot of this played out similarly to how the Rack[1] middleware conventions developed in the early Rails v1 and v2 days. Prior to Rack there was a lot of fragmentation in HTTP server libraries, post-Rack everything more or less played nicely as long as libraries implemented Rack interfaces.

I don't write Rust professionally, but it was a bummer seeing that this seems to be a place that was figured out (painfully) in ecosystems used heavily for web development--Javascript and Elixir have their own Rack equivalents[2][3]. I hope that Tower plays a similar role to unify the library ecosystem in Rust.

1. https://github.com/rack/rack

2. http://expressjs.com/en/guide/writing-middleware.html

3. https://github.com/elixir-plug/plug

Note, this is from the creator of Ruby's Rack https://github.com/rack/rack
Checkout Rack (https://github.com/rack/rack) and Hanami (https://github.com/hanami/hanami).

I myself learn a lot from these projects. The code is clean, with good tests and documents.

Route directly how?

Well, instead of fighting rails, you could just use the lower level stuff it is based on which does the bits you want:

Routing - https://github.com/rack/rack

Templates - http://www.ruby-doc.org/stdlib-2.1.1/libdoc/erb/rdoc/ERB.htm...

Rails adds quite a lot of overhead and complexity, not to mention memory usage, so if you're going to bypass most of it, it might be better to start with something more bare-bones?

I agree, and to go further, even _if_ a non-developer did on github (maybe higher in the search rankings), for many popular projects you can generally find the consumer facing url via the "homepage" link.

Example: https://github.com/rack/rack homepage url points to http://rack.rubyforge.org/

https://github.com/tenderlove/nokogiri => http://nokogiri.org/

https://github.com/mxcl/homebrew => http://mxcl.github.com/homebrew/

https://github.com/joyent/node => http://nodejs.org/

etc, etc.

It also seems fairly common to put the 'consumer' url near the top or bottom of the README.