This one's a doozy, but bear with me.
What's the difference between HAProxy, apache/nginx, rack, (thin, puma, mongrel, webrick) and an application server?
It seems that Rack always uses one of the aforementioned web servers, so why doesn't it ever use nginx? Seems like nginx is some other breed of server.
Rack is an interface, a specification, for application servers in Ruby. These application servers typically take in HTTP requests and return HTTP responses over either TCP ports or unix sockets. Ruby web apps will leverage one of the app servers that implement the Rack specification (thin, puma, unicorn, etc). You wouldn't usually expose the application server directly to the internet for a variety of reasons, one of the most important being that these application servers are meant to be a bridge between application code and http, not to stand up to the wide open internet. So, the app server typically has a web server, like nginx or apache, sitting in front of it. It's very common to have http requests coming into nginx on port 80 and then having nginx distributing those requests to one or more rack application servers running on a different port.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With