SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Evangelist
    Join Date
    Oct 2003
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Mongrel on Apache 1.3 - ok?

    Hi,

    I plan on running Mongrel on Apache 1.3 (I'm kinda stuck with 1.3 for a little while). I also don't know much about RoR yet. People write all this stuff about the Apache 2.x/Mongrel combo vs the Apache 1.3/fast cgi combo, and I don't understand why people go for fast cgi when they could use Mongrel. Are there any big, obvious downsides to running Mongrel on Apache 1.3 that I should be aware of? I'm serving up data from MySQL, stylesheets, images, and some SWF/DCR type stuff; no SSL.

    Thanks

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    I think proxying works better in Apache 2.0 which is why it's the preferred way to go if you're using Mongrel.

  3. #3
    SitePoint Evangelist dev_cw's Avatar
    Join Date
    Dec 2005
    Posts
    454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So are you saying that it is not good to use mongrel with Apache 1.3? I am also stuck with Apache 1.3 and have RoR running with fastcgi, and I suffered to get FastCGI to play right on my VPS. I was looking into mongrel and it looks like a nice modern alternative. But I can't go to 2.0 just yet.
    "You can just hang outside in the sun all day tossing a ball around...
    Or you can sit at your computer and do something that matters."
    - Cartman

  4. #4
    SitePoint Guru silver trophy Luke Redpath's Avatar
    Join Date
    Mar 2003
    Location
    London
    Posts
    794
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You won't be able to successfully proxy to mongrel with anything less than apache 2.2 - you need its mod_proxy_balancer module. You could try lighttpd/pound.

  5. #5
    SitePoint Member
    Join Date
    Nov 2004
    Location
    Tampa, FL
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Proxying in Apache 1.3 works fine. However, you will only be able to proxy back to one mongrel instance per application. This is only a problem because Rails is NOT thread-safe, so to protect your application, Mongrel throws a lock around your rails thread. What this means is that Mongrel will only process one request at a time... all the others get queued up.

    With Apache 2.2 and mod_proxy_balancer, you can have Apache load balance requests for one resource back to a pack of mongrels. This way, you can process as many rails requests simultaneously as you have mongrel processes running.

    For a far better explanation, see http://mongrel.rubyforge.org/docs/apache.html

    Short answer: in as much time as you have spent fiddling with FastCGI, you could have upgraded Apache to 2.2.

  6. #6
    SitePoint Wizard silver trophy redemption's Avatar
    Join Date
    Sep 2001
    Location
    Singapore
    Posts
    5,269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you're really stuck with Apache 1.3 (as opposed to running lighttpd or upgrading to Apache 2.2.x), you can consider running pound (a load balancer) and proxying to it.

    Basically, set up Apache to proxy to pound (using a ProxyPass directive is one way), and have pound load-balance among the Mongrels in your Mongrel cluster.

    See http://www.entanke.se/blog/2006/06/2...ound-on-a-vps/


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •