mod_wsgi には embeded mode (Apache のプロセスと一心同体) とdaemon mode があるのですが、小さなWSGIスクリプト以外では daemon mode を使った方が応用が利きます。 そこで、mod_wsgi の daemon mode について調べてみました。 まず、 mod_wsgi の daemon mode (以降、WSGIDaemonProcess で表します) を図で表すと次のようになります(たぶん)。WSGIDaemonProcess と Apache は Proxy でゆるくつながっていて、設定ファイルでの WSGIDaemonProcess 宣言1つにつき複数の DaemonProcess が存在し、それぞれにまた複数のスレッドがぶら下がっています。 以下、 WSGIDaemonProcess の特徴です。 Apache のプロセスとは
![mod_wsgi: WSGIDaemonProcess - Pyxis 開発ブログ](https://cdn-ak-scissors.b.st-hatena.com/image/square/c8812de60103084eb793d30611ce436111482c07/height=288;version=1;width=512/https%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2Fj%2Fjunya_hayashi%2F20080617%2F20080617101759.png)