Contents

Preface
1 Introduction
 1.1 Language Agnostic
 1.2 Asynchronous
 1.3 Message Protocol
 1.4 Application Oriented
 1.5 Automated Management
 1.6 Using This Manual
2 Installing
 2.1 Install Dependencies
 2.2 Getting Mongrel2
  2.2.1 Using the .tar.bz2 File
  2.2.2 Using git
 2.3 Building And Installing
  2.3.1 Other platforms than Linux
 2.4 Testing The Installation
 2.5 Up Next
3 Managing
 3.1 Model-View-Controller
 3.2 Trying m2sh
  3.2.1 What The Hell Just Happened?
 3.3 A Simple Configuration File
 3.4 How A Config Is Structured
  3.4.1 Server
  3.4.2 Host
  3.4.3 Route
  3.4.4 Dir
  3.4.5 Proxy
  3.4.6 Handler
  3.4.7 Others
 3.5 A More Complex Example
 3.6 Routing And Host Patterns
  3.6.1 How Routing Works
  3.6.2 JSON/XML Message Routing Syntax
 3.7 Deployment Logs And Commits
 3.8 Control Port
 3.9 Multiple Servers
 3.10 Tweakable Expert Settings
 3.11 SSL Configuration
  3.11.1 SNI Support
  3.11.2 Experimental SSL Caching
 3.12 Configuring Filters (BETA)
4 Deploying
 4.1 Mongrel2 Deployment Requirements
  4.1.1 Introducing procer
  4.1.2 Installing procer
 4.2 The Plan
 4.3 Step 1: The Deployment Area
 4.4 Step 2: The mongrel2.org Configuration
 4.5 Step 3: Setup procer
  4.5.1 The Python Examples
  4.5.2 Testing The New Setup
  4.5.3 Nice Features of Procer
 4.6 Step 4: Static Content
 4.7 Step 5: Testing And Troubleshooting
 4.8 Further Improvements
 4.9 Deployment Tips
5 Hacking
 5.1 Front-end Goodies
  5.1.1 HTTP
  5.1.2 Proxying
  5.1.3 WebSockets
  5.1.4 JSSocket
  5.1.5 Long Poll
  5.1.6 Streaming
  5.1.7 N:M Responses
  5.1.8 Async Uploads
  5.1.9 Experimental large-upload streaming
 5.2 Introduction to ZeroMQ
 5.3 Handler ZeroMQ Format
  5.3.1 Socket Types Used
  5.3.2 UUID Addressing
  5.3.3 Numbers Identify Listeners
  5.3.4 Paths Identify Targets
  5.3.5 Request Headers And Body
  5.3.6 Complete Message Examples
  5.3.7 TNetStrings Alternative Protocol
  5.3.8 Python Handler API
 5.4 Basic Handler Demo
 5.5 Async File Upload Demo
 5.6 MP3 Streaming Demo
 5.7 Chat Demo
 5.8 Extended Reply Format
 5.9 Writing A Filter (BETA)
 5.10 Other Language APIs
 5.11 Writing Your Own m2sh
 5.12 Config From Anything: Experimental
6 Contributing