diff options
-rw-r--r-- | doc/site/src/attributions.page | 19 | ||||
-rw-r--r-- | doc/site/src/default.template | 71 | ||||
-rw-r--r-- | doc/site/src/docs/apache.page | 2 | ||||
-rw-r--r-- | doc/site/src/docs/camping.page | 14 | ||||
-rw-r--r-- | doc/site/src/docs/choosing_deployment.page | 170 | ||||
-rw-r--r-- | doc/site/src/docs/frameworks.page | 34 | ||||
-rw-r--r-- | doc/site/src/docs/gem_plugin.page | 1 | ||||
-rw-r--r-- | doc/site/src/docs/howto.page | 28 | ||||
-rw-r--r-- | doc/site/src/docs/litespeed.page | 82 | ||||
-rw-r--r-- | doc/site/src/docs/nitro.page | 8 | ||||
-rw-r--r-- | doc/site/src/docs/pen_balance.page | 45 | ||||
-rw-r--r-- | doc/site/src/docs/performance.page | 10 | ||||
-rw-r--r-- | doc/site/src/docs/rails_to_handler.page | 10 | ||||
-rw-r--r-- | doc/site/src/docs/ruby_on_rails.page | 8 | ||||
-rw-r--r-- | doc/site/src/docs/security.page | 28 | ||||
-rw-r--r-- | doc/site/src/docs/started.page | 3 | ||||
-rw-r--r-- | doc/site/src/docs/upload_progress.page | 5 | ||||
-rw-r--r-- | doc/site/src/docs/win32.page | 46 | ||||
-rw-r--r-- | doc/site/src/index.page | 9 | ||||
-rw-r--r-- | doc/site/src/news.page | 39 | ||||
-rw-r--r-- | doc/site/src/plugins.page | 1 |
21 files changed, 481 insertions, 152 deletions
diff --git a/doc/site/src/attributions.page b/doc/site/src/attributions.page index 1f53aee..fa12093 100644 --- a/doc/site/src/attributions.page +++ b/doc/site/src/attributions.page @@ -9,16 +9,10 @@ h1. Commercial Sponsorship Mongrel is a free open source web server and will always remain that way, but that doesn't mean that companies don't help to make it better. -Mongrel now has sponsorship from "EastMedia":http://www.eastmedia.com +Mongrel received sponsorship from "EastMedia Group":http://www.eastmedia.com in partnership with "VeriSign":http://www.verisign.com/ to make Mongrel -fast and stable enough for enterprise class loads (meaning "gigantic", -not "Java style"). Their sponsorship has made it possible to get large -pools of test servers, payment to myself for work done, and a real -application to use Mongrel on. Everyone should toss out a thanks -to them since this may mean I'll get to work on Mongrel full time -in the near future and it will raise the quality of Ruby application -hosting in general. Not to mention the fact that they are letting all -of my Mongrel work stay LGPL licensed and open source. +fast and stable enough for their "PIP":http://pip.verisignlabs.com/ +which should be a great Single Sign-On application and is being released open source. Other companies benefiting from Ruby should take this as an example. I can think of quite a few things (Ruby 1.9 and a real virtual machine are @@ -27,10 +21,6 @@ you're making cash off Ruby consider hiring a developer part-time, full-time, or posting a bounty for something you need as well as the community needs. There's no better time for enlightened self-interest than now. -The kind folks at "railsmachine.net":http://railsmachine.com/ have also donated -three VPS accounts for testing various installations on their hosting service. -They plan to use Mongrel as the default hosting setup in the very near future. - h1. The People Who Made It Possible @@ -79,7 +69,8 @@ h2. Coding * "Rick Olson (aka technoweenie)":http://techno-weenie.net/ was the first to grab Mongrel and cram "Camping":http://redhanded.hobix.com/bits/campingAMicroframework.html into it. * "Why the lucky stiff":http://whytheluckystiff.net/ did work on getting the "Camping Framework":http://redhanded.hobix.com/bits/campingAMicroframework.html working with Mongrel more completely. - +* Dan Kubb hooked up sweet Conditional HTTP Response support for Mongrel making it pretty damn fast for static files. +* Lots of other folks have sent in patches and tweaks. Let me know if I missed you. h2. Tools diff --git a/doc/site/src/default.template b/doc/site/src/default.template index 74074bf..98e5258 100644 --- a/doc/site/src/default.template +++ b/doc/site/src/default.template @@ -46,9 +46,20 @@ <h4>NEWS</h4> <dl> + <dt>Jun-16-2006</dt> + <dd> + <h5><a href="{relocatable: news.html}">Mongrel 0.3.13 Officially Released!</a></h5> + + <p>It's finally out! Mongrel 0.3.13 with all the goodies for both win32 and everyone else + in the whole world. + </p> + <a href="{relocatable: news.html}" title="Read About It">Read About It</a> + <a href="{relocatable: news.html}"><img src="{relocatable: images/li4.gif}" alt="more" /><br /></a></p> + </dd> + <dt>Jun-5-2006</dt> <dd> - <h5><a href="{relocatable: news.html}">Mongrel 0.3.13 Pre-Release -- Kitana Suicide Concurrency</a></h5> + <h5><a href="{relocatable: news.html}">Mongrel 0.3.13 Pre-Release -- Katana Suicide Concurrency</a></h5> <p>Well, you asked for it. Lots of fixes, days away from official release, and allow_concurrency can murder your children. @@ -119,64 +130,6 @@ <a href="{relocatable: news.html}"><img src="{relocatable: images/li4.gif}" alt="more" /><br /></a></p> </dd> - <dt>Mar-27-2006</dt> - <dd> - <h5><a href="{relocatable: news.html}">Mongrel 0.3.12 -- Pre-Release</a></h5> - - <p>A pre-release of the 0.3.12 Mongrel which suppot tons of functionality, so it - needs more testing than normal. Read the news for changes and install instructions.</p> - <a href="{relocatable: news.html}"><img src="{relocatable: images/li4.gif}" alt="more" /><br /></a></p> - </dd> - - <dt>Mar-15-2006</dt> - <dd> - <h5><a href="{relocatable: news.html}">Mongrel 0.3.11 -- Edge Rails Compliant</a></h5> - - <p>This release makes sure that Mongrel is edge Rails compliant, and fixes up - many little things with GemPlugins. The <b>big</b> part of the release is - the mongrel_config plugin which support win32 and Unix.</p> - <a href="http://rubyforge.org/frs/?group_id=1306" title="Downloads">Download</a> - <a href="{relocatable: news.html}"><img src="{relocatable: images/li4.gif}" alt="more" /><br /></a></p> - </dd> - - <dt>Mar-12-2006</dt> - <dd> - <h5><a href="{relocatable: news.html}">Mongrel 0.3.10.1 -- Big Release Day</a></h5> - - <p>I normally do frequent little releases, but this - release involved lots of little touches all over the entire code base. It - now has a ton of features and should have the best Rails support yet. It's - even got <b>GemPlugin</b> to a level that anyone can use it. Read the - news for the full scoop. - </p> - <a href="http://rubyforge.org/frs/?group_id=1306" title="Downloads">Download</a> - <a href="{relocatable: news.html}"><img src="{relocatable: images/li4.gif}" alt="more" /><br /></a></p> - </dd> - - <dt>Mar-06-2006</dt> - <dd> - <h5><a href="{relocatable: news.html}">Mongrel 0.3.9 -- Gem Based Plugins</a></h5> - - <p>This release features not only gem based plugins, but a new sub-project - named <a href="/gem_plugin_rdoc">GemPlugin</a> to support it. There's a - sample plugin you can try out as well. Read the news for more info. - </p> - <a href="http://rubyforge.org/frs/?group_id=1306" title="Downloads">Download</a> - <a href="{relocatable: news.html}"><img src="{relocatable: images/li4.gif}" alt="more" /><br /></a></p> - </dd> - - <dt>Mar-04-2006</dt> - <dd> - <h5><a href="{relocatable: news.html}">Mongrel 0.3.8 -- Bug Fixes</a></h5> - - <p>A small release to close off some of the bugs in the tracker. This also - adds the ability to get at the RailsHandler from within a Rails application. - This is necessary to properly map URI's to their physical locations. - </p> - <a href="http://rubyforge.org/frs/?group_id=1306" title="Downloads">Download</a> - <a href="{relocatable: news.html}"><img src="{relocatable: images/li4.gif}" alt="more" /><br /></a></p> - </dd> - </dl> </div> <hr noshade="noshade" size="1" /> diff --git a/doc/site/src/docs/apache.page b/doc/site/src/docs/apache.page index f397a45..89466e8 100644 --- a/doc/site/src/docs/apache.page +++ b/doc/site/src/docs/apache.page @@ -6,4 +6,4 @@ directoryName: Apache h1. Apache Best Practice Deployment - +Coming soon... diff --git a/doc/site/src/docs/camping.page b/doc/site/src/docs/camping.page deleted file mode 100644 index 6fabf5a..0000000 --- a/doc/site/src/docs/camping.page +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: Camping Issues -inMenu: true -directoryName: Camping Issues ---- - -h1. Camping Issues - -This is just a short list of issues people have encountered -while using Camping with Mongrel. - -* Running Camping and Rails in the same Ruby interpreter - causes all sorts of problems with ActiveRecord. You either - run one or the other but not both. diff --git a/doc/site/src/docs/choosing_deployment.page b/doc/site/src/docs/choosing_deployment.page index 776b3a3..7a91e25 100644 --- a/doc/site/src/docs/choosing_deployment.page +++ b/doc/site/src/docs/choosing_deployment.page @@ -6,5 +6,173 @@ directoryName: Choosing Deployment h1. Choosing The Best Deployment -Coming soon ... +A major motivation for writing Mongrel was to make it easy to deploy Ruby web applications +within existing infrastructures and organizations. Most of the companies I tried to +pitch "Ruby on Rails":http://www.rubyonrails.org/ to loved how fast and easy it was to develop, +but ran screaming when I talked about FastCGI. + +Mongrel fixes this by just being a plain HTTP server that is still very fast. It's easy to +deploy, cluster, manage, and scale with existing web application technologies. You can +put it behind hardware load balancers, load balancing web servers, proxy servers, or just +by itself. + +With this flexibility comes a bit of confusion though. Many people start off wondering how best to +deploy Mongrel and then get confused with all the different options available. This document +hopefully will help you pick the right deployment for your needs. They are listed in order +from smallest/simpler to largest/complex. + +h2. Deployment Considerations + +There are a few initial things you'll have to consider when picking a deployment: + +* Concurrency -- Rails is not thread safe, so if you have giant actions that take +minutes to complete then take that into consideration. +* Requests/Second -- Notice I didn't say "users"? Users is a useless measurement of +your performance requirements. You want to know how many *requests per second* you have to process. +* Content Size -- What's the size of the content you're serving. Mongrel is pretty decent +at static files, but it can't beat a good solid web server for pushing out big files. +* Dynamic vs. Static -- Mongrel can serve static content for small sites, and of course do +dynamic Ruby generated content, but you'll want to figure out what the mix is so you can scale it later. +* Available Resources -- You can't cram a truck into a breadbox. Make sure you have the right deployment +for your resources such as memory, disk, CPU, etc. + +h3. Scalability Means Expansion Not Speed + +I'm not sure where the term "scalability" changed from it's original meaning, but you should +throw out any notion of scalability meaning "high performance". Scalability is about resources +and how easy it is for you to expand those resources to meet new demand. This does not mean +how many resources you can buy now for *all* the demand you'll ever need. It means the ability +to start small now, and then *after* you're the next google you can expand. + +h3. Start Small + +Everyone immediately jumps to the end of this document and starts with the absolute most complex and +"scalable" deployment they can muster. What you really want to do is start with a very small and simple +setup, and then expand as needed. This mitigates the risk that you'll buy a bunch of stuff you really +don't need and keeps your initial pain and costs low. + +h3. Automate, Automate, Automate + +You're a damn programmer. You should be scripting the hell out of your deployment just like +you do your testing. Automation reduces human error, makes your setups consistent, and many +times can become a project itself just like "Capistrano":http://manuals.rubyonrails.com/read/book/17 +did. + +h1. The Recommendations + +Once you've figured out all the basic things about your planned deployment you can start deciding +which one you need at the moment, and what you might need in the future. + +Wait. You did *plan* this deployment right? Ok, go back and actually plan it. This document +is part of your planning, but you need to do your homework first to make a good decision. + +h2. Just Mongrel + +Mongrel is actually pretty fast even when compared with web servers like "Apache":http://httpd.apache.org/ +for serving static files. If your web application is just starting out, doesn't need to coexist with +things like PHP, and you don't need SSL, then consider just running Mongrel by itself. + +This is especially attractive if your application can utilize page caching. Mongrel is pretty quick +for page cached sites and is able to handle quite a few concurrent connections. + +h3. Disadvantages + +Mongrel will break down pretty quick if you have lots of people accessing Rails actions that are +slow. It can still perform like a champ for most small needs, but if you start getting more +serious then you need one of the next solutions. + +h3. Advantages + +The easiest to manage, especially on win32. You just turn it on and go home. Maybe write a +few /etc/init.d/ start-up scripts for your server if you're running a POSIX system. + + +h2. Behind TCP Balancers + +You still don't need SSL, but you do need to make a small cluster of Mongrel servers. If this +is the case, then you can simply grab "mongrel_cluster":/docs/mongrel_cluster.html and either +get "Pen":http://siag.nu/pen/ or "Balance":http://www.inlab.de/balance.html and do a simple +cluster. + +h3. Advantages + +This configuration is very easy to setup, gives you decent throughput and concurrency, and is +easy to manage. Using mongrel_cluster gives you simple commands to control whole clusters of +Mongrel servers and Pen or Balance simply accepts connections on one port and forwards them +to one of the backend Mongrel ports. + +h3. Disadvantages + +No SSL and you're still relying on Mongrel to serve the files. A cluster of Mongrel servers +is no slouch though. I think many sites that don't need SSL could run with this configuration +happily for years. A real good mix is to combine this with Rails' @asset server@ configuration +and a simple "thttpd":http://www.acme.com/software/thttpd/ install to serve your static files. + +h2. Behind HTTP Balancers + +If you need something like the above, but you also need SSL, then simply swap out Balance or Pen +and use "Pound":/docs/pound.html instead. Pound is a very flexible HTTP balancer that +also supports SSL. This gives you the same advantages of simple deployment but adds the security +you need. + +h3. Advantages + +The same as using a TCP balancer, except you now have SSL and you can do some more creative +routing. A good example is if your site has to use a PHP web app for serving ads. You can +have pound take requests for the advertising URIs and route them to the PHP application, and +then transmit everything else to your Mongrels. It's very flexible and much easier to install. + +h3. Disadvantages + +You're still relying on Mongrel to serve the files and passing that through Pound, but as +mentioned before Mongrel is pretty quick with static files. Don't underestimate it. + +h2. Behind Web Servers + +If you have complex static file serving needs, need to host a PHP application at the same time, +or have complex authentication requirements, then you should use a regular web server. Mongrel +has good instructions for quite a few web servers and supports any server that has some form +of @mod_proxy@ style support. + +* "Apache":/docs/apache.html +* "Litespeed":/docs/litespeed.html +* "Lighttpd":/docs/lighttpd.html *not recommended* + +Each of the above documents describe how to get an initial configuration of Mongrel running behind +that type of web server. You should also combine this with "mongrel_cluster":/docs/mongrel_cluster.html +to manage the cluster of mongrel servers. + +h3. Advantages + +Since you have a real web server handling the initial HTTP traffic you can easily do page caching +and other magic to speed things up and avoid even talking to Mongrel. It also means you can put +in authenticators, other web platforms, and extensions that your application might need. Many +web servers are also installed and configured by default on most platforms and you just need +to add the Mongrel specifics to get it going. + +h3. Disadvantages + +This configuration can quickly descend into madness with complexity. Apache is +notorious for having a horribly complex configuration file. Another +disadvantage of real web servers is they almost always start of as web servers, +and then proxy support is bolted on as an extra. Apache's latest proxy support is +really good as well as Litespeed's, but Lighttpd's proxy support is really bad (as of Mongrel 0.3.13). + + +h2. Behind Hardware + +If you are getting really really serious about your web application and you need to +serve up lots of Mongrels then you should take a look at a hardware load balancer. +They're really expensive, but they're usually worth it if you're in the big leagues. + +h3. Advantages + +Big big big loads and the ability to handle the SSL in hardware for many products. +Also things like smart virus filtering, routing and other goodies, but you'll +pay for it. + +h3. Disadvantages + +Expensive, Expensive, Expensive. Did I mention Expensive. One more time Expensive. +They're also a royal pain to setup properly, but then that's why their Expensive. diff --git a/doc/site/src/docs/frameworks.page b/doc/site/src/docs/frameworks.page new file mode 100644 index 0000000..7a55edb --- /dev/null +++ b/doc/site/src/docs/frameworks.page @@ -0,0 +1,34 @@ +--- +title: Frameworks +inMenu: true +directoryName: Frameworks +--- + +h1. Framework Issues + +As known issues specific to different frameworks are reported they get +posted here. Problems reported here aren't a sign that a framework is +worse or better than others, just a reflection of people's experiences. + +h2. Rails + +* Rails is not thread safe so if you have long running actions then you can potentially +block the server. Keep in mind that this is the case for *any* server, it's just more +pronounced for Rails. +* You can easily kill a Rails server by not closing files. Always open files in blocks. +* If you turn on @allow_concurrency@ them Mongrel will run your application without any thread locking. +This can be dangerous so test it first, and I'm pretty sure it won't work for most complex applications. +* Mongrel will honor a HUP request and try to do an internal reload, but this usually doesn't work the +way you think. Mongrel's shutdown process is very nice and safe, so just restart. + + +h2. Camping + +* Running Camping and Rails in the same Ruby interpreter +causes all sorts of problems with ActiveRecord. You either run one or the +other but not both. + + +h2. Nitro + +* None reported yet. diff --git a/doc/site/src/docs/gem_plugin.page b/doc/site/src/docs/gem_plugin.page index 40586bf..70debf1 100644 --- a/doc/site/src/docs/gem_plugin.page +++ b/doc/site/src/docs/gem_plugin.page @@ -4,6 +4,7 @@ inMenu: true directoryName: Documentation --- +* Jun 16: These docs are out of date and will be updated soon. * h1. Writing Mongrel Plugins with GemPlugin diff --git a/doc/site/src/docs/howto.page b/doc/site/src/docs/howto.page index b86657e..ac8c010 100644 --- a/doc/site/src/docs/howto.page +++ b/doc/site/src/docs/howto.page @@ -65,7 +65,7 @@ Address to bind to when listening for connections. <dl> <dt>-l, --log (:log_file)</dt> <dd> -Where to dump log messages in daemon mode. +Where to dump log messages in daemon mode. Use an *absolute* paths. <b>No Win32.</b> <ul><li><b>Default:</b> log/mongrel.log</li></ul> </dd> @@ -75,7 +75,7 @@ Where to dump log messages in daemon mode. <dt>-P, --pid (:pid_file)</dt> <dd> Where to write the PID file so <b>start</b> and -<b>stop</b> commands know the Process ID. +<b>stop</b> commands know the Process ID. Use *absolute* paths. <b>No Win32.</b> <ul><li><b>Default:</b> log/mongrel.pid</li></ul> </dd> @@ -142,11 +142,11 @@ This option makes Mongrel <b>very</b> slow. </dl> <dl> -<dt>-c, --config (NONE)</dt> +<dt>-C, --config (NONE)</dt> <dd> Specifies a configuration YAML file that sets options you're reading about right now. Read "Command Line Settings" below -for more information. +for more information. Use *absolute* paths. <ul><li><b>Default:</b> You can't set this.</li></ul> </dd> </dl> @@ -184,7 +184,25 @@ possible. When you need to run Mongrel in production (or if you're doing wicked fancy stuff) then you'll need to start using a few -configuration files. +configuration files. Problem is the configuration file is in +this weird YAML syntax that most people just hate. Rather than +describe the file's syntax and all possible options, Mongrel has +a -G (generate) feature that will take any command line options +you give it, generate the YAML file to replicate those options, and +then exit. For example, you could make a config file like this: + + @mongrel_rails start -G mongrel_8080.yml -e production -p 8080@ + +And it'll write all the options possible to mongrel_8080.yml, but +with your specific changed for environment (-e production) and +port (-p 8080). + +When you run a configuration file with -C, don't pass other options. +Rather than have complex rules about whether a configuration file or +command line option wins, mongrel_rails just uses configuration file +and defaults, or command line options and defaults. Basically don't mix, +it won't work. + h2. MIME Types diff --git a/doc/site/src/docs/litespeed.page b/doc/site/src/docs/litespeed.page index de4d96e..bf8c3e2 100644 --- a/doc/site/src/docs/litespeed.page +++ b/doc/site/src/docs/litespeed.page @@ -1,8 +1,84 @@ --- -title: Litespeed +title: LiteSpeed inMenu: true -directoryName: Litespeed +directoryName: LiteSpeed --- -h1. Litspeed Best Practice Deployment +h1. LiteSpeed Best Practice Deployment + +h3. by "Alison Rowland":http://blog.alisonrowland.com + +LiteSpeed makes setting up a reverse proxy to Mongrel a snap with its excellent, web-based control panel. LiteSpeed has a built-in load balancer, so it also works well in conjunction with the "Mongrel_Cluster":mongrel_cluster.html plugin. + +h2. Requirements + +These instructions assume you have already completed the following steps: + +* installed the LiteSpeed Webserver, version 2.1.16 or greater[1] (note: not available for Windows), +* set up your application as a virtual host[2], +* installed and configured Mongrel, +* and confirmed that you can start Mongrel and access your app by appending Mongrel's port number to your domain (e.g. mysite.com:8000). + +If you've done all that, then continue reading! + +h2. Configuring Mongrel as an External App + +# Enter your LiteSpeed Administration Panel (usually yourdomain:7080). +# Go to *Server Configuration*. +# Select your app under *Virtual Hosts* in the sidebar at left. +# Go to the *External Apps* tab and click *Add*. +# Choose *Web Server* for the *Type* and click *Next*. + +Fill in the following fields: + +* *Name*: Give this instance of Mongrel a name, such as @myapp-1@. +* *Address*: This should be @127.0.0.1:XXXX@, where @XXXX@ is the port number your mongrel instance is running on. + +The other fields are up to you. Here are some values to start you off with a workable setup: + +* *Max Connections*: 20 +* *Connection Keepalive Timeout*: 1000 +* *Environment*: __leave blank__ +* *Initial Request Timeout (secs)*: 1 +* *Retry Timeout (secs)*: 0 +* *Response Buffering*: No + +Finally, click *Save*. If you're only running a single instance of Mongrel, skip down to the instructions on *Configuring a Context.* Otherwise, read on. + +h2. Load Balancing across Multiple Mongrel Instances + +If you're running more than one instance of Mongrel, or are using Mongrel_Cluster, you'll need to repeat the above directions for every instance of Mongrel, changing the name and port number as appropriate for each. Next, you need to set up a load balancer. + +# Back on the *External Apps* tab, click *Add*. +# Choose *Load Balancer* for *Type* and click *Next*. +# Give it a *Name*, such as @MyApp@ +# In the *Workers* field, enter all of the mongrel instances you set up, using the names you gave them, like so: <br /> +@proxy::myapp-1, proxy::myapp-2, proxy::myapp-3@ +# *Save*. + +h2. Configuring a Context + +Configuring a context prevents LiteSpeed from displaying Mongrel's port number in the URL. + +# Go to your virtual host's *Context* tab, and click *Add*. +# If you're set up to run on just a single Mongrel instance, select *Proxy*. Otherwise, select *Load Balancer*. +# Enter @/@ in *URI*. +# Make sure your *Web Server* or *Load Balancer* is selected in the next field's drop-down menu. +# The other settings are up to you. Most can be left blank. +# *Save*. + +h2. Finishing Up + +The only thing left is to make sure Mongrel is fired up, and, in your LiteSpeed admin panel, click *Apply Changes*, then *Graceful Restart*. You should be good to go! + + +h2. References + +Thanks go to Bob Silva[2] and Rick Olson[3], for their trailblazing articles on LiteSpeed deployment for Rails. + +fn1. "LiteSpeed Technologies":http://litespeedtech.com + +fn2. "Launching Rails at the Speed of Lite with LiteSpeed Webserver":http://www.railtie.net/articles/2006/01/21/up-and-running-in-the-speed-of-light + +fn3. "Setting up LiteSpeed with Mongrel":http://weblog.techno-weenie.net/2006/4/11/setting-up-litespeed-with-mongrel diff --git a/doc/site/src/docs/nitro.page b/doc/site/src/docs/nitro.page deleted file mode 100644 index f6ba529..0000000 --- a/doc/site/src/docs/nitro.page +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: Nitro -inMenu: true -directoryName: Nitro ---- - -h1. Nitro Issues - diff --git a/doc/site/src/docs/pen_balance.page b/doc/site/src/docs/pen_balance.page index be6162e..c961708 100644 --- a/doc/site/src/docs/pen_balance.page +++ b/doc/site/src/docs/pen_balance.page @@ -6,3 +6,48 @@ directoryName: Pen/Balance h1. Pen/Balance Best Practice Deployment +Using "Pen":http://siag.nu/pen/ or "Balance":http://www.inlab.de/balance.html to serve +a cluster of Mongrel servers is a simple way to get good concurrency without +going wild on your deployment complexity. What these two programs do is listen on one +port and then proxy the requests to one of the Mongrel servers in your cluster. + +h2. Requirements + +First up, you should learn to use "mongrel_cluster":/docs/mongrel_cluster.html to manage +a cluster of Mongrel servers. It's a simple GemPlugin that simplifies things and also +works better with Capistrano. + +Second, you need to install wither Pen or Balance. Either use your package management +system or install from source. + +Finally, you probably can't do this on win32 unless you use Cygwin. + +h2. Pen + +Once you get Pen installed you just use it like this: + +# Make sure that you can run your application like normal and then +setup "mongrel_cluster":/docs/mongrel_cluster.html so that all of the running Mongrels work. +# Run this command: pen ... +# Check port 4000 to make sure that Pen is proxying correctly. + +As with the Balance instructions below you'll want to create a start-up script so that +Pen gets started on machine reboots. + +h2. Balance + +Balance is pretty simple: + +# Make sure that you can run your application like normal and then +setup "mongrel_cluster":/docs/mongrel_cluster.html so that all of the running Mongrels work. +# Run this command: balance -p 4000 localhost:3001 localhost:3002 ... +# Hit port 4000 with a browser to see if it's working. + +That's all there is to it. You might want to write a little start-up script that +starts balance on machine reboots. Balance has many other options available if +you need to do more complex stuff, but this is usually all people need. + +h2. Limitations + +We found that Balance has an upper limit of 15 backend servers. I haven't heard much +about Pen. diff --git a/doc/site/src/docs/performance.page b/doc/site/src/docs/performance.page deleted file mode 100644 index c80acc7..0000000 --- a/doc/site/src/docs/performance.page +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: Performance -inMenu: true -directoryName: Performance ---- - -h1. Performance Measurement, Tuning, Tweaking (in that order) - - - diff --git a/doc/site/src/docs/rails_to_handler.page b/doc/site/src/docs/rails_to_handler.page deleted file mode 100644 index fa4f893..0000000 --- a/doc/site/src/docs/rails_to_handler.page +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: Rails To Handlers -inMenu: true -directoryName: Rails To Handlers ---- - -h1. Writing Handlers to Speed Rails - - - diff --git a/doc/site/src/docs/ruby_on_rails.page b/doc/site/src/docs/ruby_on_rails.page deleted file mode 100644 index ef60a3d..0000000 --- a/doc/site/src/docs/ruby_on_rails.page +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: Rails Issues -inMenu: true -directoryName: Rails Issues ---- - -h1. Ruby On Rails Issues - diff --git a/doc/site/src/docs/security.page b/doc/site/src/docs/security.page index 6ec39d3..ee7781f 100644 --- a/doc/site/src/docs/security.page +++ b/doc/site/src/docs/security.page @@ -6,3 +6,31 @@ directoryName: Security h1. Web Application Security Issues +Mongrel takes a different approach to security than most web servers. Rather than +relying on massive human efforts to audit all possible code, Mongrel is implemented +using algorithms and methods that are difficult to subvert. There is still auditing +and checks, but Mongrel simply tries to avoid errors by not doing things that cause them. + +Read the "Iron Mongrel Security page":/security.html for information on how security +is done in Mongrel. The main points to remember with Mongrel's security are: + +* Mongrel uses a "Ragel":http://www.cs.queensu.ca/home/thurston/ragel/ generated parser +instead of a hand coded HTTP handler. The grammar is very close to the ABNF specification, so +if you see "BAD CLIENT" errors in your logs, that probably is a bad client. +* Security tests have found that Mongrel stops most security attacks at the protocol level due to +it's correctly written parser *and* it's explicit limits on the sizes of everything. +* The Mongrel reaction to a protocol violation is to close the socket immediately. It doesn't waste +time and resources on bad clients since this is *always* a hack attempt. If it isn't then it's a +poorly written client and the author should learn to write a correct one. +* Mongrel works with all the main clients out there, and ones it doesn't work with are crap living +in a tiny tiny niche of the internet designed by horrible programmers. +* While Mongrel is more strict than other servers, it isn't draconian. The clients that can't get +through are typically skating on the edge of the HTTP grammar where they do not belong. + +Mongrel isn't infallible, but if Mongrel complains about something then you should investigate it. +If you think Mongrel is wrong then shoot a message to the mailing list detailing what it should do +and we'll consider adjusting the grammar. If you think Mongrel should violate the grammar so that +your little WebDAV++ Social Network Book Mark Chat Web 2.0 monstrosity can see the light of day, then +you "should write your own web server":/not_mongrel.html instead. + + diff --git a/doc/site/src/docs/started.page b/doc/site/src/docs/started.page index 810ba9e..5c6f23c 100644 --- a/doc/site/src/docs/started.page +++ b/doc/site/src/docs/started.page @@ -28,6 +28,7 @@ get picked up for some people as a dependency. You'll need to do this instead: $ gem install win32-service (pick the most recent one) $ gem install mongrel (pick the win32 pre-built) + $ gem install mongrel_service Now you're installed. "Read the Win32 HOWTO for more instructions.":win32.html @@ -79,4 +80,4 @@ Before you start asking for features you should read about "bikeshedding":http://www.catb.org/jargon/html/B/bikeshedding.html and understand that we're really nice, but sometimes code speaks better than rhetoric. -Finally there's lots of other "documentation.":index.html
\ No newline at end of file +Finally there's lots of other "documentation.":index.html diff --git a/doc/site/src/docs/upload_progress.page b/doc/site/src/docs/upload_progress.page index bc171fe..9de539d 100644 --- a/doc/site/src/docs/upload_progress.page +++ b/doc/site/src/docs/upload_progress.page @@ -6,3 +6,8 @@ directoryName: Upload Progress h1. Mongrel Upload Progress Plugin +There's a plugin for Rails that gives folks a fancy "upload progress" but which really +only works with FastCGI. There's plans in the works to create a similar system +for Mongrel, but until that's made official you're pretty much on your own. + + diff --git a/doc/site/src/docs/win32.page b/doc/site/src/docs/win32.page index c0d9b65..7b226d4 100644 --- a/doc/site/src/docs/win32.page +++ b/doc/site/src/docs/win32.page @@ -13,24 +13,38 @@ pre-compiled gems available for people to use. *Before reading this document you need to read "Getting Started.":started.html and make sure it works.* -h2. Stopping The mongrel_rails Script +h2. Installing Service Support + +Mongrel used to have a separate mongrel_rails_service script but this +caused problems and has since been unified into just mongrel_rails +and a special GemPlugin that gives you a set of service:: commands. + +To install the mongrel_service GemPlugin you simply install mongrel and +then do: + + > gem install mongrel_service + +This will give you a set of service commands that you can find out about +by just running mongrel_rails and then passing each one the -h option to +get help. -Just like in POSIX systems, you use CTRL-C to exit the mongrel_rails script. h2. Running The Service After you do the gem install, find a Rails application you want to run and do: - $ mongrel_rails_service install -n myapp \ + $ mongrel_rails service::install -N myapp \ -r c:\my\path\to\myapp -p 4000 -e production - $ mongrel_rails_service start -n myapp + $ mongrel_rails service::start -N myapp Now hit the port and poof, works (or should). The application will stop if you use: - $ mongrel_rails_service stop -n myapp + $ mongrel_rails service::stop -N myapp + +@NOTE: Stop reports an exception but does stop the service.@ Now the really great thing is that you can just do all this from the Services control panel like your Rails application is a regular @@ -47,37 +61,37 @@ subversion check-out and run my tests again. h2. Other Service Commands -There is a full set of service control commands in the mongrel_rails_service script. +There is a full set of service control commands in the mongrel_service plugin. This lets you use either the Services control panel or a command line script to manage your Rails applications. What's also nice is that you can register as many applications as you want, and even the same one with different names. -h3. install +h3. service::install -If you want to run the same app in different modes then use the *-n* option to the *install* +If you want to run the same app in different modes then use the *-N* option to the *install* command: - $ mongrel_rails_service install -n myapp_dev \ + $ mongrel_rails service::install -N myapp_dev \ -r c:\my\path\to\myapp -p 4000 -e development - $ mongrel_rails_service start -n myapp + $ mongrel_rails service::start -N myapp You can also use the *-d* option to give the service a different display name in the Services console. -h3. start +h3. service::start Pretty much just takes a service name to start up. It will run and print a message until the service finally starts, which sometimes can take 10-60 seconds. -h3. stop +h3. service::stop -Sort of works right now and also only takes a -n parameter. It has a few errors +Sort of works right now and also only takes a -N parameter. It has a few errors when it tries to stop a service so we're working on making it cleaner. -h3. delete +h3. service::remove -Takes the name (-n) of the service to delete and then removes it from the list. +Takes the name (-N) of the service to remove and then removes it from the list. *This would be how you'd remove a service so you can change it's start-up options.* @@ -92,7 +106,7 @@ It's pretty easy to use, just pass the *-c or --cpu* option to the *install* command and give a CPU of 1-X. That means if you have 4 CPUs and you want Mongrel on #4 then do: - $ mongrel_rails_service install -n myapp \ + $ mongrel_rails service::install -N myapp \ -r c:\my\path\to\myapp -p 4000 -e production -c 4 Pretty much the same command, just one more option and you're done. diff --git a/doc/site/src/index.page b/doc/site/src/index.page index 4da199e..ce40eeb 100644 --- a/doc/site/src/index.page +++ b/doc/site/src/index.page @@ -11,6 +11,7 @@ FastCGI or SCGI. It is framework agnostic and already supports "Ruby On Rails":http://www.rubyonrails.org, "Og+Nitro":http://www.nitroproject.org/, and "Camping":http://camping.rubyforge.org/files/README.html frameworks. +@You need Ruby 1.8.4 just like the gem says you do.@ h2. Getting Started @@ -36,7 +37,13 @@ for information on getting started. The main thing with Win32 support is that there is no *fork* API for Ruby, so you have to use the services features to -get persistent servers running. +get persistent servers running. You can get this services +support by doing: + + > gem install mongrel_service + +And then just run @mongrel_rails@ to see what @services::@ commands +are available. h1. Next Steps diff --git a/doc/site/src/news.page b/doc/site/src/news.page index 16a8de2..bfd4632 100644 --- a/doc/site/src/news.page +++ b/doc/site/src/news.page @@ -7,6 +7,45 @@ ordering: 2 h1. Latest News +h2. Jun 16: Mongrel 0.3.13 -- Finally Out! + +After a huge push, tons of delays to fix bugs and add enhancements, and lots of +feedback and contributions from many great people, I'm happy to announce the +official *release of Mongrel 0.3.13*. + +This release features lots of documentation, cleaned status output, improved IO processing, +a major bug fix for a thread leak, and an improvement in the win32 support. + +Read below from past news for all the stuff that was fixed. The main change that *win32* folks +should be aware of is they have to install a second little gem to get the services support. +This is slightly annoying, but the change makes it possible to work independently on the services +support and not hold back future Mongrel releases. + +h3. Getting The Release + +For normal people you should do this: + + $ sudo gem install mongrel + +Of use update. If update don't work then remove mongrel and re-install. + +h3. Win32: Getting The Release + +For *win32* people, you just do this: + + $ gem install mongrel + $ gem install mongrel_service + +When you do the install, pick the mswin32 version. After you install the +mongrel_service you now just use @mongrel_rails@ like everyone else, but +you get some new fancy @service::@ commands. + +h3. Reporting Bugs + +Send them to the mailing list and make sure you have your OS, versions, web server, +etc. + + h2. Jun 5: Mongrel 0.3.13 Pre-Release -- Katana Suicide Concurrency We are *days* away from the official 0.3.13 release, which will be followed diff --git a/doc/site/src/plugins.page b/doc/site/src/plugins.page index 040fa16..8a5fdeb 100644 --- a/doc/site/src/plugins.page +++ b/doc/site/src/plugins.page @@ -20,7 +20,6 @@ and will answer your questions. * mongrel_cluster -- Very sweet plugin that lets you manage a pack of Mongrels easily as well as dealing with Capistrano issues. - h2. Getting Your Plugin Listed Just shoot a message to the "mailing list":http://rubyforge.org/mail/?group_id=1306 |