nginx-module-vts
nginx-module-vts is a C-based Nginx module that tracks traffic statistics per virtual host, server, upstream, and filter. It exposes real-time metrics via JSON, HTML dashboard, and Prometheus format, enabling live monitoring similar to Nginx Plus without proprietary licensing.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | vozlt/nginx-module-vts |
| Owner | vozlt |
| Primary language | C |
| License | BSD-2-Clause — OSI-approved |
| Stars | 3.5k |
| Forks | 489 |
| Open issues | 44 |
| Latest release | v0.2.5 (2025-12-28) |
| Last updated | 2026-05-24 |
| Source | https://github.com/vozlt/nginx-module-vts |
What nginx-module-vts is
The module hooks into Nginx request processing to collect traffic data (bytes in/out, request counts, response codes, latency) and maintains shared memory zones for aggregation. It supports traffic limiting, filtering by headers/GeoIP/custom variables, and provides REST control endpoints for zone reset/deletion.
Get the nginx-module-vts source
Clone the repository and explore it locally.
git clone https://github.com/vozlt/nginx-module-vts.gitcd nginx-module-vts# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Requires recompilation of Nginx with `--add-module` flag; integration into CI/CD build pipeline and version pinning strategy mandatory.
- Shared memory zone sizing (`vhost_traffic_status_zone`) must account for expected cardinality (servers, upstreams, filters); misconfiguration can cause OOM or dropped metrics.
- Filter and limit directives use string key matching; complex multi-dimensional filtering (e.g., geo + user-agent) requires careful Nginx variable composition to avoid key explosion.
- Module state is in-memory; design backup/restore strategy if persistent historical data is required (use `vhost_traffic_status_dump` to snapshot).
- Histogram bucket configuration affects both memory footprint and latency percentile accuracy; default buckets may not suit all SLOs.
When to avoid it — and what to weigh
- Requires distributed tracing or request-scoped observability — Module tracks aggregate traffic only; no per-request tracing, distributed context propagation, or detailed flame graphs.
- Need persistent historical analytics across restarts — Statistics are held in shared memory and reset on Nginx reload unless explicitly dumped; no built-in time-series backend integration.
- Cannot recompile or patch Nginx binary — This is a loadable module requiring source-level integration at compile time; incompatible with pre-built Nginx packages or dynamic module loading on older Nginx versions.
- Heavy real-time ingestion at >100k req/sec without tuning — Shared memory contention and histogram bucket calculations may impact latency under extreme throughput; requires benchmarking and configuration optimization per workload.
License & commercial use
BSD-2-Clause (BSD 2-Clause Simplified License). Permissive OSI-approved license allowing modification, distribution, and commercial use, with requirement to retain original copyright notice and license text.
BSD-2-Clause permits commercial use and closed-source distribution. No royalties, attribution required in binary or source distribution. Verify internal compliance review for your jurisdiction and use case; no legal opinion provided.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Moderate |
| DEV.co fit | Good |
| Assessment confidence | High |
Module processes HTTP request data (headers, URIs, response codes). Cardinality-based DoS risk if filter keys are derived from untrusted input (e.g., raw query parameters); use `vhost_traffic_status_filter_max_node` to cap filter node count. Control endpoint allows state mutation; restrict to trusted networks. No input sanitization claims found; assume standard Nginx request validation applies. No CVE history stated; requires manual audit or third-party security review.
Alternatives to consider
Nginx Plus (commercial)
Official Nginx traffic monitoring, reporting, and API; supported by F5; no recompilation needed. Trade-off: proprietary licensing, higher cost, vendor lock-in.
ngx_http_stub_status_module (built-in)
Native Nginx module for basic connection and request stats. Trade-off: coarse granularity (no per-vhost, per-upstream, or per-filter data); no JSON or live dashboards.
Prometheus + Nginx exporter (sidecar approach)
External agent scrapes Nginx stub_status or logs; no module recompile needed; flexible metrics definition. Trade-off: additional deployment complexity, agent overhead, and latency sampling vs. in-kernel accuracy.
Build on nginx-module-vts with DEV.co software developers
nginx-module-vts offers real-time per-vhost and per-upstream metrics, Prometheus integration, and traffic-based rate limiting. Our team can help you evaluate, build, and deploy this module into your Nginx infrastructure.
Talk to DEV.coRelated on DEV.co
Explore the category and the services that help you build with it.
nginx-module-vts FAQ
Can I use this with a pre-built Nginx package (e.g., from apt, yum)?
Does this module persist metrics across Nginx restart?
What is the performance impact?
Can I use this for rate limiting on shared hosting?
Custom software development services
Need help beyond evaluating nginx-module-vts? DEV.co is a software development agency offering software development services and web development for teams of every size. Our software developers and web developers build custom software, web applications, APIs, and open-source observability integrations — and maintain them long-term.
Need live traffic monitoring for Nginx without proprietary licensing?
nginx-module-vts offers real-time per-vhost and per-upstream metrics, Prometheus integration, and traffic-based rate limiting. Our team can help you evaluate, build, and deploy this module into your Nginx infrastructure.