News for hackers. Stuff that matters.
Re:How we’ve made Raptor fast by coned88 on Monday November 10, 2014 @02:25PM (#8585636)
what are these instead of just using a webserver like apache or nginx?
Re:How we’ve made Raptor fast by SpikeGronim on Monday November 10, 2014 @07:37PM (#8587593)
You generally use Unicorn etc. behind something like nginx. The last time I did that I used nginx to handle thousands of concurrent connections that were forwarded to nCPUs Unicorn instances. Nginx is very good at handling lots of connections, Unicorn is good at handling a Rack app.
Re:How we’ve made Raptor fast by tryp on Monday November 10, 2014 @09:46PM (#8588008)
To be a bit more explicit, using a separate httpd and application server allows a division of labor between the resource-bound task of handling the request + building the response from the network-bound task of dibbling bytes back to the original requestor.

Nginx (and the general class of highly concurrent servers) is good at handling lots of connections largely because it tries to minimize the resources (memory, process scheduler time, etc) required to manage each connection as it slowly feeds the result down the wire.

The application server generally wants an instance per CPU so that it can hurry up and crank through a memory-, cpu-, or database-hungry calculation in as few microseconds as possible, hand the resulting data back to the webserver and proceed to put the memory, DB, and CPU to the task of processing the next request.

This is in contrast to the (simplified here) old-school CGI way that say ancient Apache would receive a request, then fork off a copy of PHP or Perl for each one, letting the app get blocked by writing to the stdio pipe to Apache then Apache to the requesting socket. All the while maintaining a full OS process for each request in play.

Re:How we’ve made Raptor fast by lbotos on Monday November 10, 2014 @07:42PM (#8587610)
This is an "application server". When you are doing anything that isn't PHP you basically need a process behind your web server (Apache/Nginx) that runs your actual ruby/python/java application code and speaks HTTP.
Re:How we’ve made Raptor fast by girvo on Monday November 10, 2014 @08:47PM (#8587803)
Even in PHP you want that for decent performance: php-fpm is similar in concept to a Ruby/Python application server, albeit slightly different due to PHP being a web language first and foremost, and it's interesting execution method. Still, you run a process and connect nginx to it :)
Re:How we’ve made Raptor fast by jrochkind1 on Monday November 10, 2014 @08:43PM (#8587783)
Even for PHP you do, it's just delivered as an apache module. (Passenger can be run as an apache module too, fwiw).

Although to be fair, the PHP model doesn't require a _persistent_ process between requests (I think?). But most other platforms do.

Re:How we’ve made Raptor fast by lucaspiller on Monday November 10, 2014 @09:06PM (#8587877)
It isn't required for Ruby either, but loading a Rails app is slow so it's better to persist it between requests.
Re:How we’ve made Raptor fast by Rapzid on Monday November 10, 2014 @09:23PM (#8587932)
Unless you also need high density multi-tenancy in which case you probably want to use mpm-itk for security..
Re:How we’ve made Raptor fast by est on Monday November 10, 2014 @07:43PM (#8587611)
because you need something between your Ruby code and nginx/apache.