Welcome to Centmin Mod Community
Register Now

Sysadmin How to check if my server/docker support "reuseport" & "fastopen=256"?

Discussion in 'System Administration' started by rdan, Aug 4, 2018.

  1. rdan

    rdan Well-Known Member

    4,983
    1,185
    113
    May 25, 2014
    Ratings:
    +1,804
    Local Time:
    9:30 AM
    Mainline
    10.2
    This is not for Centminmod install, but I enable it on my Discourse Setup running inside Docker.

    Site works fine after I added: reuseport & fastopen=256

    But not sure if it's working as intended or the server supports it.
     
  2. eva2000

    eva2000 Administrator Staff Member

    45,207
    10,280
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,934
    Local Time:
    11:30 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    guess you forgot about using ss command to check reuseport Nginx - [nginx-announce] nginx-1.9.1

    from Re: SO_REUSEPORT to check if reuseport is working

    look at *:80 instances
    Code:
    ss -nlt
    so command to check if reuseport is working on port 80 and 443
    Code (Text):
    ss -lnt | egrep -e ':80 |:443 '
    

    so on 8 cpu thread server, should have 8x port 80 and 8x port 443 listing
    Code (Text):
    ss -lnt | egrep -e ':80 |:443 '
    LISTEN     0      2048         *:443                      *:*               
    LISTEN     0      2048         *:443                      *:*               
    LISTEN     0      2048         *:443                      *:*               
    LISTEN     0      2048         *:443                      *:*               
    LISTEN     0      2048         *:443                      *:*               
    LISTEN     0      2048         *:443                      *:*               
    LISTEN     0      2048         *:443                      *:*               
    LISTEN     0      2048         *:443                      *:*               
    LISTEN     0      2048         *:80                       *:*               
    LISTEN     0      2048         *:80                       *:*               
    LISTEN     0      2048         *:80                       *:*               
    LISTEN     0      2048         *:80                       *:*               
    LISTEN     0      2048         *:80                       *:*               
    LISTEN     0      2048         *:80                       *:*               
    LISTEN     0      2048         *:80                       *:*               
    LISTEN     0      2048         *:80                       *:*


    for fastopen see Beta Branch - enable TCP Fast Open support if system supports it and specifically
     
  3. rdan

    rdan Well-Known Member

    4,983
    1,185
    113
    May 25, 2014
    Ratings:
    +1,804
    Local Time:
    9:30 AM
    Mainline
    10.2
    Server Host:
    Code:
    # ss -lnt | egrep -e ':80 |:443 '
    LISTEN   0         128                       *:80                     *:*       
    LISTEN   0         128                       *:443                    *:* 
    Docker Host:
    Code:
    # ss -lnt | egrep -e ':80 |:443 '
    LISTEN     0      128          *:80                       *:*                 
    LISTEN     0      128          *:443                      *:*                 
    LISTEN     0      128          *:443                      *:* 
    This is OVH VPS2 only though :D.
     
  4. eva2000

    eva2000 Administrator Staff Member

    45,207
    10,280
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,934
    Local Time:
    11:30 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    FYI, Docker uses host system Kernel so like OpenVZ, so whatever host system Kernel supports is usually same for Docker image containers and since Docker is only recommended for CentOS on CentOS 7, then CentOS 7 default 3.10 kernels have fastopen and reuseport support most of the time.
     
  5. rdan

    rdan Well-Known Member

    4,983
    1,185
    113
    May 25, 2014
    Ratings:
    +1,804
    Local Time:
    9:30 AM
    Mainline
    10.2
    It's KVM I think, OVH SGP VPS.
     
  6. eva2000

    eva2000 Administrator Staff Member

    45,207
    10,280
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,934
    Local Time:
    11:30 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    CentOS 7 KVM = 3.10+ kernels :)
     
  7. rdan

    rdan Well-Known Member

    4,983
    1,185
    113
    May 25, 2014
    Ratings:
    +1,804
    Local Time:
    9:30 AM
    Mainline
    10.2
    I'm using Ubuntu 18.04 this time :D.
     
  8. eva2000

    eva2000 Administrator Staff Member

    45,207
    10,280
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,934
    Local Time:
    11:30 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x