SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Guru Skyblaze's Avatar
    Join Date
    Jul 2005
    Location
    Italy
    Posts
    734
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How many mongrel processes?

    I read the final chapter of the book and i wonder if i need to start up as many mongrel processes as many rails applications i've got on my server. If it is so i have to start every new mongrel process (that serves a particular rails application on the server) on a different port right?

  2. #2
    SitePoint Guru silver trophy Luke Redpath's Avatar
    Join Date
    Mar 2003
    Location
    London
    Posts
    794
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, you need a free port on whatever IP you bind the mongrel process to (if you have multiple IPs on assigned to your machine) for each one. For low-traffic apps you should be ok with a single mongrel process but for most production apps 2 is really the minimum.

  3. #3
    SitePoint Guru Skyblaze's Avatar
    Join Date
    Jul 2005
    Location
    Italy
    Posts
    734
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Luke Redpath View Post
    Yes, you need a free port on whatever IP you bind the mongrel process to (if you have multiple IPs on assigned to your machine) for each one. For low-traffic apps you should be ok with a single mongrel process but for most production apps 2 is really the minimum.
    ok but i have to start a mongrel process (with its script) for every application from each application main directory is that right?
    Each rails application is attached to its mongrel process?
    So on every server/pc there will be many applications each with its mongrel process running and each on a different port right?

  4. #4
    SitePoint Guru Skyblaze's Avatar
    Join Date
    Jul 2005
    Location
    Italy
    Posts
    734
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For low-traffic apps you should be ok with a single mongrel process but for most production apps 2 is really the minimum.
    I can start 2 or more mongrell processes on the same rails application? How can i do that?

  5. #5
    SitePoint Evangelist
    Join Date
    Feb 2006
    Location
    Worcs. UK
    Posts
    404
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  6. #6
    SitePoint Enthusiast
    Join Date
    Dec 2004
    Location
    sheffield
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You will need at least one mongrel process for each web app, it is usually advisable to have at least two. As reggieB said have a look at mongrel cluster for this.

    You could considor using mongrel as your backend server and proxying to it from a frontend server, such as apache with mod_proxy or something like nginx, I've found nginx works well for me. Doing this allows you to use virtualhosts, so you only need one IP. Then you can use 127.0.0.1:someport number(something like to 8000) to 127.0.0.1:another port number (eg if you had 4 mongrel processes 8003)

    Have a look at

    http://mongrel.rubyforge.org/docs/ch...eployment.html

    as it goes through the various deployment options for using mongrel in different circumstances.
    Mongolia Overland - The Greatest Adventure on Earth


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
  •