Code Monkey home page Code Monkey logo

Comments (4)

u5surf avatar u5surf commented on June 7, 2024

@k0st1an Thanks. Unfortunately, we still cannot prepare the flag to disable the upstream statistics intentionally now.

We are fine what you said there are not good situations if we use the upstream directive we has enable its statistics simultaneously in some cases.

So I introduced the new parameter in #293 that can be through the upstream statistics. Can you review and try this parameter?

from nginx-module-vts.

k0st1an avatar k0st1an commented on June 7, 2024
nginx version: nginx/1.24.0
built by gcc 12.2.0 (Debian 12.2.0-14)
built with OpenSSL 3.0.12 24 Oct 2023 (running with OpenSSL 3.0.11 19 Sep 2023)
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-g -O2 -ffile-prefix-map=/data/builder/debuild/nginx-1.24.0/debian/debuild-base/nginx-1.24.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC' --with-ld-opt='-Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie' --add-module=/nginx-module-vts-issue-292

When two options are active, the statistics disappear


http {
  vhost_traffic_status_zone;
  vhost_traffic_status_bypass_upstream_stats on;  # <--

  server {
    listen 4444;
    server_name s1.com;
    location /metrics {
      limit_except GET {
        allow 10.99.0.0/16;
        deny  all;
      }
      vhost_traffic_status_display;
      vhost_traffic_status_display_format prometheus;
    }
  }

  server {
    vhost_traffic_status_filter_by_set_key $status $server_name;  # <--
    ...
  }
}
Screenshot 2024-01-26 at 1 40 33 PM

When only vhost_traffic_status_bypass_upstream_stats is set to on, there are no upstream statistics. But I don't see any difference in CPU load yet. I don't understand why this is so. Before that, I used https://deb.myguard.nl/nginx-modules/ repository. I will install it from this repository again and check my guess.

from nginx-module-vts.

k0st1an avatar k0st1an commented on June 7, 2024

The problem reappeared with the https://deb.myguard.nl/nginx-modules/ repository. Configuration as in the first post. CPU throttle spike at 70k RPS

  • 30 server (original nginx, without VTS) - 80k
  • 31 server - 70k
Screenshot 2024-01-26 at 6 14 48 PM
$ dpkg -l | grep vhost
ii  libnginx-mod-http-vhost-traffic-status 1.25.3-4myguard21~bookworm              amd64        Nginx virtual host traffic status module

With upstreams disabled, the difference in CPU load is 2-3%. But I would like to test with the option vhost_traffic_status_status_filter_by_set_key $status $server_name;. But the stats are missing as I wrote above.

from nginx-module-vts.

u5surf avatar u5surf commented on June 7, 2024

@k0st1an
It seems that I was misleaded your truely problem. So actually is your problem which you wanna really solve now the CPU utilization suddenly spiked?
It is necessary for us to solve the problem if it can be reproduced absolutely the same situation for same configuration and the same request per sec. If it does that, we can get some profile with which we can investigate more such the situation.

https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Instrumentation-Options.html

from nginx-module-vts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.