Apache is more like Microsoft Word with millions of
options, but only six things are really needed.
Nginx can do these six things and it can do five of
them 50 times faster than Apache.

                             - Chris Lea, ChrisLea.com
NGINX
 開発 高村
利用例から。
80
8000




 80
8001




80




     8002
8001
            2



80




     8002
8001


80
8001


80
8001




80




     8002
8001




80   ?
         8002
(セッションを使ったアプリの説明)
8001




80




     8002
(うまくいく例)
1. 追加モジュールは、ビルド時に読み込ませる


2.プロセスアーキテクチャ


3.ディレクティブ、値の継承、変数とその使い道


4.apacheとのあっさりとした比較
1. 追加モジュールは、ビルド時に読み込ませる
http://wiki.nginx.org/Modules
http://wiki.nginx.org/3rdPartyModules
2. プロセスアーキテクチャ
マスタプロセス



ワーカプロセス
(関連して)graceful restart
3. ディレクティブ、値の継承、変数とその使い道
モジュール   (Main, HTTP Core, FastCGI, Proxy ....)



        ディレクティブ            (server, location, listen, root ...)




             変数      ($http_user_agent, $sent_http_content_type,

                        $args_XXX ...)
ディレクティブ   (server, location, worker_connections ...)




          ブロック     (server, location, events, if ...)




          ディレクティブ           (worker_connections, rewrite ...)
ディレクティブ


 どのブロックに置けるかが決まっている(コンテキスト)


 上位ブロックの値が、下位ブロック内でも有効になる場合が
 ある(継承)
変数


ディレクティブの値として。
(変数を受け付けるディレクティブは多くないので注意)


条件定義に使う。
http://wiki.nginx.org/HttpCoreModule#error_page
4. apacheとのあっさりとした比較
Apache is more like Microsoft Word with millions of
options, but only six things are really needed.
Nginx can do these six things and it can do five of
them 50 times faster than Apache.

                             - Chris Lea, ChrisLea.com
- Static file service
- SSL/TLS support
- Virtual hosts
- Load balancing
- WebDAV
- URL rewriting
- FLV streaming
ApacheBench v2.3

                              (社内ネットワーク)
      Mac Book Pro 10.7.5                      Debian 6.0.6




                                 Nginx                  Apache
                                 1.2.4              2.2.16(Debian)

Requests per second:
                                 25.51                   29.07
      [#/sec]
CREDITS

Nginx wiki http://wiki.nginx.org/Main

アイコン素材 http://iconhoihoi.oops.jp/


ハイパフォーマンスHTTP サーバNginx 入門(ASCII)

Nginx