Welcome to Centmin Mod Community
Become a Member

Nginx [nginx-announce] nginx-1.9.1

Discussion in 'Nginx and PHP-FPM news & discussions' started by eva2000, May 27, 2015.

Tags:
  1. eva2000

    eva2000 Administrator Staff Member

    36,860
    8,067
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,425
    Local Time:
    10:47 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Changes with nginx 1.9.1 26 May 2015

    *) Change: now SSLv3 protocol is disabled by default.

    *) Change: some long deprecated directives are not supported anymore.

    *) Feature: the "reuseport" parameter of the "listen" directive.
    Thanks to Sepherosa Ziehau and Yingqi Lu.

    *) Feature: the $upstream_connect_time variable.

    *) Bugfix: in the "hash" directive on big-endian platforms.

    *) Bugfix: nginx might fail to start on some old Linux variants; the bug
    had appeared in 1.7.11.

    *) Bugfix: in IP address parsing.
    Thanks to Sergey Polovko.


    --
    Maxim Dounin
    http://nginx.org/

    _______________________________________________
    nginx-announce mailing list
    [email protected]
    http://mailman.nginx.org/mailman/listinfo/nginx-announce

    Continue reading...
     
  2. eva2000

    eva2000 Administrator Staff Member

    36,860
    8,067
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,425
    Local Time:
    10:47 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    sweet been waiting for listen reuseport option for a while now nginx: 4f6efabcb09b

    Module ngx_http_core_module
    benchmarks from Tengine The Tengine Web Server
     
    • Informative Informative x 2
  3. eva2000

    eva2000 Administrator Staff Member

    36,860
    8,067
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,425
    Local Time:
    10:47 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    One very long and detailed explanation that covers SO_REUSEPORT at linux - Socket options SO_REUSEADDR and SO_REUSEPORT, how do they differ? Do they mean the same across all major operating systems? - Stack Overflow !

    Another article on SO_REUSEPORT Free Programmer's Blog | Linux 3.9 introduced new way of writing socket servers
     
    Last edited: May 27, 2015
  4. eva2000

    eva2000 Administrator Staff Member

    36,860
    8,067
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,425
    Local Time:
    10:47 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    works fine :)
     
  5. rdan

    rdan Premium Member Premium Member

    4,365
    1,053
    113
    May 25, 2014
    Ratings:
    +1,522
    Local Time:
    8:47 AM
    Mainline
    10.2
    Is not possibe to use on Kernel 2.6.32-504.16.2.el6.x86_64 ?
     
  6. eva2000

    eva2000 Administrator Staff Member

    36,860
    8,067
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,425
    Local Time:
    10:47 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Redhat/CentOS backported SO_REUSEPORT to 2.6.32 :)
     
    • Informative Informative x 1
  7. rdan

    rdan Premium Member Premium Member

    4,365
    1,053
    113
    May 25, 2014
    Ratings:
    +1,522
    Local Time:
    8:47 AM
    Mainline
    10.2
    To use?
    listen 80 reuseport;

    That's it? :)
     
  8. eva2000

    eva2000 Administrator Staff Member

    36,860
    8,067
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,425
    Local Time:
    10:47 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    AFAIK yup
     
    • Like Like x 1
  9. rdan

    rdan Premium Member Premium Member

    4,365
    1,053
    113
    May 25, 2014
    Ratings:
    +1,522
    Local Time:
    8:47 AM
    Mainline
    10.2
    Applying it to only 2 of my domain, I got this error:
    Code:
    nginx: [emerg] duplicate listen options for 0.0.0.0:80 in /usr/local/nginx/conf/conf.d/mydomain.conf:8
    nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
    
    My listed line:
    Should I use?
    On every listed directive?
     
  10. eva2000

    eva2000 Administrator Staff Member

    36,860
    8,067
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,425
    Local Time:
    10:47 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    reuseport can only use one instance per ip address, listen 80 will default to main ip

    so only list reuseport once for entire server if you only have 1 ip address i.e. put it in virtual.conf server default context
     
  11. eva2000

    eva2000 Administrator Staff Member

    36,860
    8,067
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,425
    Local Time:
    10:47 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
  12. rdan

    rdan Premium Member Premium Member

    4,365
    1,053
    113
    May 25, 2014
    Ratings:
    +1,522
    Local Time:
    8:47 AM
    Mainline
    10.2
    And it will automatically apply in all domain hosted?
     
  13. eva2000

    eva2000 Administrator Staff Member

    36,860
    8,067
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,425
    Local Time:
    10:47 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    from manual Module ngx_http_core_module

    so it applies per ipaddress:port pair
     
    • Like Like x 1
  14. eva2000

    eva2000 Administrator Staff Member

    36,860
    8,067
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,425
    Local Time:
    10:47 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    FYI just updated forums to Nginx 1.9.1 with lua support as well as reuseport option enabled :D
     
  15. eva2000

    eva2000 Administrator Staff Member

    36,860
    8,067
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,425
    Local Time:
    10:47 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Nginx blog also covers SO_REUSEPORT at Socket Sharding in NGINX Release 1.9.1 - NGINX

    beautiful chart for SO_REUSEPORT benchmarks

    upload_2015-5-28_14-45-47.png
     
    • Informative Informative x 1
  16. rdan

    rdan Premium Member Premium Member

    4,365
    1,053
    113
    May 25, 2014
    Ratings:
    +1,522
    Local Time:
    8:47 AM
    Mainline
    10.2
    Since enabling this, I experience an increase in CPU usage, from 1-2 % usage now 4% average.
     
  17. eva2000

    eva2000 Administrator Staff Member

    36,860
    8,067
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,425
    Local Time:
    10:47 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    too minor a change i think
     
  18. rdan

    rdan Premium Member Premium Member

    4,365
    1,053
    113
    May 25, 2014
    Ratings:
    +1,522
    Local Time:
    8:47 AM
    Mainline
    10.2
    Yeah, if it helps to speed the the site then why not ? :) same as ngx_pagespeed which consumes more cpu :).
     
    • Like Like x 1
  19. eva2000

    eva2000 Administrator Staff Member

    36,860
    8,067
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,425
    Local Time:
    10:47 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    i switched to 1.9.1 reuseport about 22 1/2hrs ago and newrelic shows my cpu load average.

    far left spike is the nginx recompile

    upload_2015-5-28_19-3-41.png
     
  20. rdan

    rdan Premium Member Premium Member

    4,365
    1,053
    113
    May 25, 2014
    Ratings:
    +1,522
    Local Time:
    8:47 AM
    Mainline
    10.2
    To verify if I enable it correctly.
    I have 8 domains on the server with each vhost file and server name.
    Just adding the reuseport on single instance of listen 80; directive will make it enable on all domain right?

    Not required on the hostname right?
    And I also changed my default_server as it defaults into the hostname after install.
     
..