54

There seem to be two active branches of the nginx web server: a “mainline” branch (currently 1.9.x) and a “stable” branch (currently 1.8.x). Can anyone provide an official source that describes the difference between these two branches and how one would choose between them?

  • Besides the obvious? – Michael Hampton Aug 18 '15 at 16:20
  • 8
    @MichaelHampton The difference would be obvious if the branches were “stable” and “development”: “Don’t use the ‘development’ branch in production”. Is the “mainline” branch suitable to use in production settings? It kind of sounds like that to me. – bdesham Aug 18 '15 at 16:32
  • 4
    @MichaelHampton this question discussed via mailing list over time. Nginx mainline (development) branch does not mean unstable but possible changes that affect 3rd party modules via internal API, good example is Tengine build with Lua and hundred other modules. Nginx developers recommend to use mainline edition in production. – Anatoly Aug 19 '15 at 11:48
76

The difference between mainline and stable is explained here:

https://www.nginx.com/blog/nginx-1-6-1-7-released/

A graphical summary:

enter image description here

Among other differences:

Note that stable does not mean more reliable or more bug-free. In fact, the mainline is generally regarded as more reliable because we port all bug fixes to it, and not just critical fixes as for the stable branch. On the other hand, changes in the stable branch are very unlikely to affect third-party modules. We don’t make the same commitment concerning the mainline, where new features can affect the operation of third-party modules.

Also:

We recommend that in general you deploy the NGINX mainline branch at all times.

  • Do you know how often the fork happens? That is, roughly when 1.9 will become the next stable version? – ColinM Apr 12 '16 at 15:41
  • No idea. Did not see such historic data and even if you extrapolate an average out of it, you wouldn't want to sit there waiting for the date to hit and find out it's well over the average. If you want the latest quite stable faster, you can always check out the Tengine web server fork by Taobao. It's stable enough to do billions in revenue for Taobao so should be fine. – JayMcTee Apr 12 '16 at 15:45
  • 1
    Updated post from 12 April 2017: nginx.com/blog/nginx-1-12-1-13-released – SauceCode Apr 20 '17 at 18:34
  • In other words, unless you use 3rd-party modules that may break with mainline, use mainline. – codewise Nov 21 '18 at 8:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.