agoo

Build Status

A High Performance HTTP Server for Ruby

Usage

require 'agoo'

server = Agoo::Server.new(6464, 'root')

class MyHandler
  def initialize
  end

  def call(req)
    [ 200, { }, [ "hello world" ] ]
  end
end

handler = TellMeHandler.new
server.handle(:GET, "/hello", handler)
server.start()

Installation

gem install agoo

What Is This?

Agoo is Japanese for a type of flying fish. This gem flies. It is a high performance HTTP server that serves static resource at hundreds of thousands of fetchs per second. A a simple hello world Ruby handler at over 100,000 requests per second on a desktop computer. That places Agoo at about 80 times faster than Sinatra and 1000 times faster than Rails. In both cases the latency was an order of magnitude lower or more. Checkout the benchmarks on OpO benchmarks. Note that the benchmarks had to use a C program called hose from the OpO downloads to hit the Agoo limits. Ruby benchmarks driver could not push Agoo hard enough.

Agoo supports the Ruby rack API which allows for the use of rack compatible gems.

Releases

See CHANGELOG

Follow @peterohler on Twitter for announcements and news about the Agoo gem.