Skip to content

Commit

Permalink
Update README and man.
Browse files Browse the repository at this point in the history
  • Loading branch information
macournoyer committed Aug 7, 2012
1 parent e26b858 commit baf6a36
Show file tree
Hide file tree
Showing 7 changed files with 118 additions and 71 deletions.
49 changes: 0 additions & 49 deletions README

This file was deleted.

67 changes: 67 additions & 0 deletions README.md
@@ -0,0 +1,67 @@
---

## This is alpha software. Things might break, people will cry and it will be your fault.
### When reporting issues, make sure to mention you're using Thin v2.

---

# Thin
Tiny, fast & funny Ruby server

Thin is a high performance and customizable Ruby server. It's structured much like Nginx. A
master process listen to incoming requests and dispatch to its worker processes, each one
running an EventMachine event loop.

Which makes it, with all humility, the most secure, stable, fast and extensible Ruby web server
bundled in an easy to use gem for your own pleasure.

Site: http://code.macournoyer.com/thin/
Group: http://groups.google.com/group/thin-ruby/topics
Bugs: http://github.com/macournoyer/thin/issues
Code: http://github.com/macournoyer/thin
IRC: #thin on freenode

## Features

* Prefork model with an EventMachine loop running in each worker.
* Optional threaded mode using a pool of threads.
* Easy asynchronous streaming response support with chunked encoding.
* Fast file serving with automatic streaming for large files.
* Keep-alive support.
* SSL support (upcoming).

## Installation
For this pre-release of version 2.0:

$ gem install thin --pre

Or from source:

$ git clone git://github.com/macournoyer/thin.git
$ git checkout v2
$ cd thin
$ bundle install
$ rake install

## Usage
The +thin+ script offers an easy way to start your Rack based application and acts just like
the +rackup+ script.:

$ cd to/your/rack/app
$ thin

To use with Rails, add thin to your Gemfile and use Rails server command:

$ echo "gem 'thin'" >> Gemfile
$ bundle install
$ rails server thin

See examples/thin.conf.rb for a sample configuration file.

Run `thin -h` to list available options.

## License
Ruby License, http://www.ruby-lang.org/en/LICENSE.txt.

## Credits
Thin is copyright Marc-Andre Cournoyer <macournoyer@gmail.com>
9 changes: 0 additions & 9 deletions config.ru

This file was deleted.

26 changes: 23 additions & 3 deletions man/thin-conf.5.ronn
Expand Up @@ -23,7 +23,7 @@ Default: number of processors available or 0 if fork(2) is not available.

Maximum number of file descriptors that a worker may open. This includes socket and file descriptors.

worker_processes 1024
worker_connections 1024

Default: 1024.

Expand All @@ -45,8 +45,12 @@ Listen for incoming connections on a given address.
* `tcp_no_delay`:
Disables the Nagle algorithm for send coalescing. Default: `true`.

* `tcp_no_push`:
Allows the use of the socket options TCP_NOPUSH on FreeBSD or TCP_CORK on Linux.
Setting this option causes Thin to attempt to send it's HTTP response headers in one packet on Linux and FreeBSD 4.x. Default: `false`.

* `ipv6_only`:
do not listen on IPv4 interface. Default: `false`.
Do not listen on IPv4 interface. Default: `false`.

* `backlog`:
Maximum number of clients in the listening backlog. Default: `1024`
Expand All @@ -59,7 +63,23 @@ Default: `false`.

## TIMEOUT (#timeout)

Workers are killed if they don't check-in under this amount of seconds.
Number of seconds before an inactive connection is closed.
Workers are also killed if they don't check-in under this amount of seconds.

## KEEP-ALIVE REQUESTS (#keep_alive_requests)

Maximum number of concurrent requests which can be made over a keep-alive connection.

Default: `100`.

## THREADED MODE (#threaded, #thread_pool_size)

Use threads to process the requests. The Rack app will be called inside a thread. Threads are pooled, you can control the minimum size of that pool using the `thread_pool_size` option.

threaded true
thread_pool_size 20

Defaults: `threaded`: `false`, `thread_pool_size`: `20`.

## LOG PATH (#log_path)

Expand Down
2 changes: 1 addition & 1 deletion man/thin.1.ronn
Expand Up @@ -98,7 +98,7 @@ Single process mode can also be forced by setting the number of worker processes

## COPYRIGHT

Thin is Copyright (C) 2011 Marc-Andre Cournoyer <http://macournoyer.com/>
Thin is Copyright (C) 2012 Marc-Andre Cournoyer <http://macournoyer.com/>

## SEE ALSO

Expand Down
30 changes: 25 additions & 5 deletions site/public/man/thin-conf.5.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions site/public/man/thin.1.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit baf6a36

Please sign in to comment.