S
S
speedvm2018-11-22 17:22:30
Nginx
speedvm, 2018-11-22 17:22:30

Why does nginx static slow down through the second interface?

Good day!
I'm an amateur, so don't kick me.
There is one server on two networks. The server distributes package repositories (deb) via http over two interfaces.
In the same network, clients are updated without delay, i.e. the "apt update" command on the client works out instantly, and on the other, after entering this command, 40-45 seconds pass, and only after that the update occurs.
Why?

The default nginx config was not correct:
user  nginx;
worker_processes  1;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    include /etc/nginx/conf.d/*.conf;
}
Minimal host config:
server {
  location / {
    root /mnt/hd/repo;
    autoindex on;
  }
}

PS: maybe it's not nginx, but apt?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
speedvm, 2018-11-23
@speedvm

apt -o Acquire::EnableSrvRecords=false update
Opened on a foreign forum. With this "hat" everything is updated without delay. Why?

J
Just A Bit, 2018-11-22
@justabit

Try increasing the number of workers in the main config. It is recommended to set the same number of processor cores.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question