Instiki
Mongrel (changes)

Showing changes from revision #7 to #8: Added | Removed | Changed

The default WEBrick server that runs when you launch Instiki is OK for light loads. For a more heavily-trafficked wiki, you might want to switch to Mongrel. Fortunately, this is extremely easy.

If you don’t already have Mongrel, install it,

 % gem install mongrel

Then, instead of typing

 % ./instiki

to start Instiki, type

 % mongrel_rails start -d -e production -m config/mime_types.yml -p 2500

Running at Startup

See the general instructions for launching Instiki at startup. Here, I’ll just list suitable startup scripts for different operating systems.

MacOSX

A suitable launchd script is

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
 "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
     <key>Label</key>
     <string>org.instiki</string>
     <key>UserName</key>
     <string>instiki</string>
     <key>OnDemand</key>
     <false/>
     <key>RunAtLoad</key>
     <true/>
     <key>ProgramArguments</key>
            <array>
                 <string>mongrel_rails</string>
                 <string>start</string>
                 <string>-e</string>
                 <string>production</string>
                 <string>-p</string>
                 <string>2500</string>
                 <string>-c</string>
                 <string>/path/to/Instiki/directory</string>
                 <string>-m</string>
                 <string>config/mime_types.yml</string>
           </array>
     <key>EnvironmentVariables</key>
     <dict>
          <key>PATH</key>
          <string>/sw/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
     </dict>
     <key>ServiceDescription</key>
     <string>Instiki Wiki</string>
</dict>
</plist>

The comments that apply to the usual launchd script apply to this one as well.

Linux

A suitable init.d script is trivially adapted fromthis one

Mongrel_cluster

As with WEBrick, you can proxy your Mongrel instance behind a conventional webserver, like Apache. For yet higher performance, you can run multiple Mongrel instances using mongrel_cluster and Apache’s mod_proxy_balancer.

But now you’ve plumbed the depths of my knowledge, so someone who’s actually done this will have to fill in the details.