Discover Centmin Mod today
Register Now

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

    30,956
    6,917
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,418
    Local Time:
    11:19 AM
    Nginx 1.13.x
    MariaDB 5.5
    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
    nginx-announce@nginx.org
    http://mailman.nginx.org/mailman/listinfo/nginx-announce

    Continue reading...
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,956
    6,917
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,418
    Local Time:
    11:19 AM
    Nginx 1.13.x
    MariaDB 5.5
    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

    30,956
    6,917
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,418
    Local Time:
    11:19 AM
    Nginx 1.13.x
    MariaDB 5.5
    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

    30,956
    6,917
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,418
    Local Time:
    11:19 AM
    Nginx 1.13.x
    MariaDB 5.5
    works fine :)
     
  5. RoldanLT

    RoldanLT Well-Known Member

    3,978
    965
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,329
    Local Time:
    9:19 AM
    1.11
    10.2
    Is not possibe to use on Kernel 2.6.32-504.16.2.el6.x86_64 ?
     
  6. eva2000

    eva2000 Administrator Staff Member

    30,956
    6,917
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,418
    Local Time:
    11:19 AM
    Nginx 1.13.x
    MariaDB 5.5
    Redhat/CentOS backported SO_REUSEPORT to 2.6.32 :)
     
    • Informative Informative x 1
  7. RoldanLT

    RoldanLT Well-Known Member

    3,978
    965
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,329
    Local Time:
    9:19 AM
    1.11
    10.2
    To use?
    listen 80 reuseport;

    That's it? :)
     
  8. eva2000

    eva2000 Administrator Staff Member

    30,956
    6,917
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,418
    Local Time:
    11:19 AM
    Nginx 1.13.x
    MariaDB 5.5
    AFAIK yup
     
    • Like Like x 1
  9. RoldanLT

    RoldanLT Well-Known Member

    3,978
    965
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,329
    Local Time:
    9:19 AM
    1.11
    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

    30,956
    6,917
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,418
    Local Time:
    11:19 AM
    Nginx 1.13.x
    MariaDB 5.5
    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

    30,956
    6,917
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,418
    Local Time:
    11:19 AM
    Nginx 1.13.x
    MariaDB 5.5
  12. RoldanLT

    RoldanLT Well-Known Member

    3,978
    965
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,329
    Local Time:
    9:19 AM
    1.11
    10.2
    And it will automatically apply in all domain hosted?
     
  13. eva2000

    eva2000 Administrator Staff Member

    30,956
    6,917
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,418
    Local Time:
    11:19 AM
    Nginx 1.13.x
    MariaDB 5.5
    from manual Module ngx_http_core_module

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

    eva2000 Administrator Staff Member

    30,956
    6,917
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,418
    Local Time:
    11:19 AM
    Nginx 1.13.x
    MariaDB 5.5
    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

    30,956
    6,917
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,418
    Local Time:
    11:19 AM
    Nginx 1.13.x
    MariaDB 5.5
    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. RoldanLT

    RoldanLT Well-Known Member

    3,978
    965
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,329
    Local Time:
    9:19 AM
    1.11
    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

    30,956
    6,917
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,418
    Local Time:
    11:19 AM
    Nginx 1.13.x
    MariaDB 5.5
    too minor a change i think
     
  18. RoldanLT

    RoldanLT Well-Known Member

    3,978
    965
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,329
    Local Time:
    9:19 AM
    1.11
    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

    30,956
    6,917
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,418
    Local Time:
    11:19 AM
    Nginx 1.13.x
    MariaDB 5.5
    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. RoldanLT

    RoldanLT Well-Known Member

    3,978
    965
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,329
    Local Time:
    9:19 AM
    1.11
    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.