どのバージョンのnginxを使うべきか?

先日、元同僚のエンジニアと話した際にnginxのstable版とmainline版との違いについて話題にのぼったんだけど、nginxの中の人的には基本的にmainline版を使え、ということらしい。ソースは以下。

http://nginx.com/blog/nginx-1-6-1-7-released/

上記の一部を抜粋してみる。

Which version should I use?

In general, you should deploy the NGINX mainline branch at all times. You may wish to use stable if you are concerned about possible impacts of new features, such as incompatibility with third-party modules or the introduction of bugs in new features.

要はサードパーティモジュールとの互換性が気になる場合や新機能のリリースで紛れ込んだバグを回避したい場合にstable版を使うとよい、ということだ。

stable版とmainline版の違い

mainline版はまぁ説明するまでもないだろうけど、nginxに新しい機能やバグフィックスが一番最初に取り込まれる場所だ。stable版にはバグ修正のみが取り込まれる。また、mainline版にはAPI非互換な変更が入ることがあるが、stable版にはそのような変更は入らない。

In NGINX nomenclature, “stable” means that no new features are added (the feature set is stable). Only major bugfixes are committed to that version.

ところでstable版の「stable」というのはmainline版よりも安定しているという意味を指しているわけではない。

Note that stable does not mean ‘more reliable or more bug-free’. In fact, mainline is generally regarded as more reliable because only critical fixes are merged to stable. Changes in the stable branch are very unlikely to affect 3rd party modules; we don’t make the same commitment concerning the mainline branch where new features may affect the operation of 3rd party modules.

nginxのバグ修正はまずmainline版に取り込まれる。しかし、stable版には緊急度の高いバグ修正しか取り込まれない。だからmainline版の方がバグはよく取れてるし、安定してるよ、ということらしい。