Thin は、最近話題の軽量・高速が売りのWebサーバです。

Thin is a Ruby web server that glues together 3 of the best Ruby libraries in web history:

  • the Mongrel parser, the root of Mongrel speed and security
  • Event Machine, a network I/O library with extremely high scalability, performance and stability
  • Rack, a minimal interface between webservers and Ruby frameworks

ということで、 RailsアプリケーションでThinを使う方法をメモしておきます。 何はともあれ、まずはsudo gem install thinで thinをインストールします。 あとは、RAILS_ROOT

   1  $ thin start

するだけでOKです。非常に簡単です。 thinコマンドのオプションは以下の通り。

   1  Usage: thin [options] start|stop|restart
   2  
   3  Server options:
   4    -a, --address HOST     bind to HOST address
   5                           (default: 0.0.0.0)
   6    -p, --port PORT        use PORT (default: 3000)
   7    -e, --environment ENV  Rails environment
   8                           (default: development)
   9    -c, --chdir PATH       Change to dir before starting
  10    -s, --servers NUM      Number of servers to start
  11                           set a value >1 to start a cluster
  12    -d, --daemonize        Run daemonized in the background
  13    -l, --log FILE         File to redirect output
  14                           (default: log/thin.log)
  15    -P, --pid FILE         File to store PID
  16                           (default: tmp/pids/thin.pid)
  17    -t, --timeout SEC      Request or command timeout in sec
  18                           (default: 60)
  19    -u, --user NAME        User to run daemon as (use with -g)
  20    -g, --group NAME       Group to run daemon as (use with -u)
  21  
  22  Common options:
  23    -D, --debug                      Set debbuging on
  24    -h, --help                       Show this message
  25    -v, --version                    Show version

見ての通り、デフォルト設定はRailsアプリケーションに 最適化されています。

updated by Png genki on Sat 16 Feb 2008 at 12:48

Trackbacks:

Search Words:

  • thin109 軽量71 rails50 webサーバ46 ruby39 web34 高速25 サーバ23 windows16 サーバー13 webサーバー13 server12 軽量webサーバ10 httpサーバ10 httpd9 http9 redmine8 cluster8 blog5 google5 ウェブサーバ5 軽量webサーバー5 gem4 軽量ブログ4 on3 メモ3 手順2 検索2 gzip2 Webサーバ2 rack2 svn2 軽量httpサーバ2 ウェブ2 install2 ブログ2 httpサーバー2 インストール2 file2 webserver1 apache1 1 how1 root1 軽量webサーバー1 request1 or1 png1 dns1 http)1 軽量httpd1 window.gbar1 高速web1 parse1 httpdサーバー1 speed1 ウェブサーバー1 options1 to1 hew1 rx71 env1 webt[o@y1 1 軽量サーバ1 c1 httpdサーバ1 use1 start1 WEBサーバー1 ec21 service1 swiftiply1 thinサーバ1 googleのウェブサーバ1 vmware1 s31 webt[o[@y1 win1 mongrel1 高速httpサーバー1 (web1

Comments:

or Preview
Tags
thin howto memo
Social Bookmarks
  • Delicious
  • B_entry360
  • Clip_16_12_w360