nginx/nginx
By the numbers
Data collected on 2026-04-30 from commit 297b09646 on master.
A quantitative snapshot of the nginx codebase. The point is to give scale: how big is each subsystem, what shape is the code in, and where has activity been concentrated lately.
Size
Lines of source by file extension
xychart-beta horizontal
title "LOC by file type (lines, log scale not used)"
x-axis ["c", "xml (docs)", "h", "pl", "pm", "cpp"]
y-axis "Lines" 0 --> 240000
bar [230142, 31534, 16522, 209, 140, 31]| Type | Files | Lines | Notes |
|---|---|---|---|
| C source | 260 | 230,142 | The product itself |
| C headers | 135 | 16,522 | |
| XML / XSLT | ~20 | 31,534 | docs/ — content for nginx.org |
| Perl scripts | 3 | 209 | contrib/geo2nginx.pl and friends |
| Perl module | 1 | 140 | nginx.pm (the perl XS module) |
| C++ source | 1 | 31 | src/misc/ngx_cpp_test_module.cpp (build sanity check) |
The whole repository is ~247 K lines of code. A handful of mainline C files make up most of the bulk:
| File | Lines |
|---|---|
src/http/ngx_http_upstream.c |
6,300 |
src/event/ngx_event_openssl.c |
5,400 |
src/http/modules/ngx_http_proxy_module.c |
5,000 |
src/http/ngx_http_core_module.c |
5,000 |
src/http/modules/ngx_http_grpc_module.c |
4,900 |
src/http/v2/ngx_http_v2.c |
4,700 |
src/http/ngx_http_huff_decode.c |
4,400 |
src/http/modules/ngx_http_mp4_module.c |
4,000 |
src/http/modules/ngx_http_proxy_v2_module.c |
3,900 |
src/http/modules/ngx_http_fastcgi_module.c |
3,800 |
(Sizes in KB above; actual line counts vary; the table is ordered by raw byte size from ls -l.)
Subsystem breakdown
| Subsystem | C + H files | What's inside |
|---|---|---|
src/core/ |
76 | Pools, slabs, hashes, rbtree, radix, regex, log, cycle, modules, resolver, string, time, proxy_protocol |
src/event/ |
19 | Event loop core, connect/accept, OpenSSL bindings, pipe |
src/event/modules/ |
10 | One file per OS readiness mechanism (epoll, kqueue, etc.) |
src/event/quic/ |
30 | QUIC transport implementation (frames, ack, streams, migration, BPF) |
src/http/ |
26 | HTTP request engine, upstream, file cache, parse, variables, scripts |
src/http/modules/ |
60 | Bundled HTTP modules: ssl, gzip, proxy, fastcgi, rewrite, geo, ... |
src/http/v2/ |
7 | HTTP/2 frame parser, filter, HPACK table |
src/http/v3/ |
13 | HTTP/3 parser, filter, QPACK table, request bridge |
src/mail/ |
19 | POP3, IMAP, SMTP proxy + auth_http |
src/stream/ |
32 | Generic TCP/UDP proxy + ssl, geo, log, map, upstream |
src/os/unix/ |
65 | POSIX implementations: epoll/kqueue glue, sendfile chain, AIO, processes |
src/os/win32/ |
34 | Windows port (proof-of-concept) |
src/misc/ |
2 | C++ build test, Google perftools integration |
The HTTP server is by far the biggest area: src/http/ + src/http/modules/ + src/http/v2/ + src/http/v3/ totals over half of all source files. The next-biggest chunks are src/core/ and src/os/unix/.
Bundled config files
| Path | Bytes | Purpose |
|---|---|---|
conf/nginx.conf |
2,630 | Default config shipped on install |
conf/mime.types |
5,349 | Extension-to-MIME table |
conf/fastcgi.conf |
1,077 | FastCGI request param boilerplate |
conf/scgi_params |
636 | SCGI request params |
conf/uwsgi_params |
664 | uwsgi request params |
conf/koi-utf |
2,837 | KOI8-R ↔ UTF-8 charset table |
conf/koi-win |
2,223 | KOI8-R ↔ CP1251 charset table |
conf/win-utf |
3,611 | CP1251 ↔ UTF-8 charset table |
The Cyrillic charset tables are not vestigial: the charset filter module still uses them.
Activity
Commits per year
xychart-beta
title "Commits per year"
x-axis ["2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024", "2025"]
y-axis "Commits" 0 --> 1000
bar [44, 174, 261, 118, 367, 718, 537, 852, 368, 448, 441, 413, 421, 353, 481, 288, 221, 168, 652, 484, 217, 186, 132, 156]8,575 commits total. The spike in 2009 reflects the build-up to nginx 1.0; the spike in 2020 is the year HTTP/3 + QUIC landed in mainline.
Recent churn (since 2023)
| Author | Commits |
|---|---|
| Sergey Kandaurov | 234 |
| Roman Arutyunyan | 146 |
| Maxim Dounin | 65 |
| Andrew Clayton | 15 |
| Aleksei Bavshin | 11 |
| Vladimir Homutov | 8 |
| Piotr Sikora | 8 |
| Zhidao HONG | 6 |
Recent work has been concentrated on QUIC/HTTP/3 (Roman Arutyunyan, Sergey Kandaurov), the upstream/sticky module (Roman Arutyunyan, Roman Semenov), and OpenSSL 4.0 compatibility (Sergey Kandaurov).
Hottest files (recent commits)
src/event/quic/ and src/http/v3/ see the most activity by file. The merged HTTP/3 + QUIC stack received its initial mainline merge in 2020 and has been refined steadily since.
Bot-attributed commits
0 commits carry bot co-authorship.There are zero Co-authored-by: *[bot]* trailers in the entire history. nginx development still happens almost entirely via mailing-list patches reviewed by the core team and then committed manually. The repo's GitHub-side automation (the CLA bot, the new-issue welcome bot, the stale-marker bot) acts on issues and PRs, not on commits. This is a lower bound on AI-assisted work — inline AI editor tools leave no trace in commit history — but the absence of even cosmetic bot trailers is a useful signal about how the project is run.
Complexity
Bus factor
| Subsystem | Recent committers (2023–2026) | Notes |
|---|---|---|
| QUIC + HTTP/3 | Roman Arutyunyan, Sergey Kandaurov | 2 active maintainers |
| OpenSSL bindings | Sergey Kandaurov | 1 active maintainer |
| Upstream + Sticky | Roman Arutyunyan, Roman Semenov | 2 contributors |
| Stream module | Sergey Kandaurov, Vladimir Homutov | 2 contributors |
| Build / configure | Sergey Kandaurov, Aleksei Bavshin | 2 contributors |
Project-wide, three engineers (Sergey Kandaurov, Roman Arutyunyan, Maxim Dounin) account for roughly 70% of recent commits.
Tags / releases
585 release tags total, going back to release-0.1.0 (October 2004). Recent cadence: ~6 mainline releases per year plus parallel stable-line patches. Latest tag in this repo: release-1.30.0.
TODO / FIXME counts
| Marker | Count |
|---|---|
TODO / FIXME / HACK / XXX (any case) |
75 |
A few of the oldest live in src/core/ngx_config.h and src/core/nginx.c and have been there since the early 2000s. See fun-facts for details.
Dependencies
Nginx links against very few third-party libraries: PCRE/PCRE2 (regex), zlib (gzip), OpenSSL (TLS, QUIC). Optional: libxslt, libgd, libgeoip2, perl, atomic_ops, libxml2. See reference/dependencies.
The bundled module list is tracked entirely inside auto/modules, which itself is one of the largest auto-scripts (43 KB).
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.