Mongrel is an
open-source software
Open-source software (OSS) is computer software that is released under a license in which the copyright holder grants users the rights to use, study, change, and distribute the software and its source code to anyone and for any purpose. Ope ...
HTTP
The Hypertext Transfer Protocol (HTTP) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, ...
library
A library is a collection of materials, books or media that are accessible for use and not just for display purposes. A library provides physical (hard copies) or digital access (soft copies) materials, and may be a physical location or a vi ...
and
web server
A web server is computer software and underlying hardware that accepts requests via HTTP (the network protocol created to distribute web content) or its secure variant HTTPS. A user agent, commonly a web browser or web crawler, initi ...
written in
Ruby
A ruby is a pinkish red to blood-red colored gemstone, a variety of the mineral corundum (aluminium oxide). Ruby is one of the most popular traditional jewelry gems and is very durable. Other varieties of gem-quality corundum are called sapp ...
by
Zed Shaw. It is used to run Ruby
web application
A web application (or web app) is application software that is accessed using a web browser. Web applications are delivered on the World Wide Web to users with an active network connection.
History
In earlier computing models like client-serve ...
s and presents a standard HTTP interface. This makes layering other servers in front of it possible using a
web proxy
In computer networking, a proxy server is a server application that acts as an intermediary between a client requesting a resource and the server providing that resource.
Instead of connecting directly to a server that can fulfill a request ...
, a
load balancer, or a
combination of both, instead of having to use more conventional methods employed to run
scripts
Script may refer to:
Writing systems
* Script, a distinctive writing system, based on a repertoire of specific elements or symbols, or that repertoire
* Script (styles of handwriting)
** Script typeface, a typeface with characteristics of ha ...
such as
FastCGI
FastCGI is a binary protocol for interfacing interactive programs with a web server. It is a variation on the earlier Common Gateway Interface (CGI). FastCGI's main aim is to reduce the overhead related to interfacing between web server and CGI p ...
or
SCGI to communicate. This is made possible by integrating a custom high-performance HTTP request
parser
Parsing, syntax analysis, or syntactic analysis is the process of analyzing a string of symbols, either in natural language, computer languages or data structures, conforming to the rules of a formal grammar. The term ''parsing'' comes from Lati ...
implemented using
Ragel.
Mongrel was the first web server used by
Twitter
Twitter is an online social media and social networking service owned and operated by American company Twitter, Inc., on which users post and interact with 280-character-long messages known as "tweets". Registered users can post, like, and ...
, and inspired
Node.js according to Ryan Dahl.
Shaw subsequently created
Mongrel2
Mongrel2 is an open-source "language agnostic" web server written by Zed Shaw, and is the successor to Shaw's Mongrel server. The server supports HTTP, Flash XMLSockets, WebSocket
WebSocket is a computer communications protocol, providing full ...
, an open-source "
language agnostic" web server and the successor to Mongrel server.
Deployment
One popular configuration was to run
Apache HTTP Server 2.2 as a
load balancer using
mod_proxy_balancer in conjunction with several Mongrel instances. Each Mongrel instance would run on a separate
TCP port, configured via the mongrel_cluster management utility. Until 2010,
Twitter
Twitter is an online social media and social networking service owned and operated by American company Twitter, Inc., on which users post and interact with 280-character-long messages known as "tweets". Registered users can post, like, and ...
was a notable instance of this configuration; they then switched to
Unicorn
The unicorn is a legendary creature that has been described since Classical antiquity, antiquity as a beast with a single large, pointed, spiraling horn (anatomy), horn projecting from its forehead.
In European literature and art, the unicor ...
.
Mongrel was capable of serving
Ruby on Rails
Ruby on Rails (simplified as Rails) is a server-side web application framework written in Ruby under the MIT License. Rails is a model–view–controller (MVC) framework, providing default structures for a database, a web service, and web ...
powered sites without requiring any other web servers, though as a
single-threaded
In computer science, a thread of execution is the smallest sequence of programmed instructions that can be managed independently by a scheduler, which is typically a part of the operating system. The implementation of threads and processes dif ...
application this configuration is unsuitable for all but light loads.
Deprecation
After the original author
Zed Shaw left the
Ruby on Rails
Ruby on Rails (simplified as Rails) is a server-side web application framework written in Ruby under the MIT License. Rails is a model–view–controller (MVC) framework, providing default structures for a database, a web service, and web ...
-scene the releases of Mongrel stopped. The current release 1.1.5 is no longer able to install in Ruby versions higher than 1.9.2 which is recommended for Rails 3, the fix is to use the much older 1.2.0-pre2 release of Mongrel which isn't stable.
A new and maintained server, called Thin,
uses the Mongrel parser. The Mongrel parser has also been forked by
Unicorn
The unicorn is a legendary creature that has been described since Classical antiquity, antiquity as a beast with a single large, pointed, spiraling horn (anatomy), horn projecting from its forehead.
In European literature and art, the unicor ...
and by
Puma
Puma or PUMA may refer to:
Animals
* ''Puma'' (genus), a genus in the family Felidae
** Puma (species) or cougar, a large cat
Businesses and organisations
* Puma (brand), a multinational shoe and sportswear company
* Puma Energy, a mid- and d ...
.
References
External links
Official websitean alternative, event based wrapper around Mongrel that conforms to the Mongrel API.
{{DEFAULTSORT:Mongrel (Web Server)
Free web server software
Ruby (programming language)
Web server software for Linux