Open-Source Wikis

/

nginx

/

Fun facts

nginx/nginx

Fun facts

A handful of trivia about the codebase that doesn't fit anywhere else.

The oldest surviving code

The earliest commit in this repo is from 2002-08-06 16:39:45 UTC — Igor Sysoev's first import, labeled nginx-0.0.1-2002-08-06-20:39:45 import. Several files from that day are still alive in mainline:

  • src/core/ngx_config.h
  • src/core/ngx_palloc.c (the pool allocator)
  • src/core/ngx_array.c
  • src/core/ngx_list.c
  • src/core/ngx_queue.c
  • src/core/ngx_log.c
  • bits of src/core/nginx.c

That's roughly 24 years of continuously living code. The pool allocator API in particular (ngx_create_pool, ngx_palloc, ngx_pcalloc, ngx_destroy_pool) is unchanged — every connection, request, and subrequest in nginx today still walks bumps through Igor's 2002 design.

The oldest TODO

/* TODO */ ngx_max_sockets = -1;

src/core/nginx.c:224, dating to the 2002 import.

There are 75 TODO/FIXME/HACK/XXX comments across the source tree, spread over 37 files. The greatest concentrations are inside src/core/ngx_config.h, which has four 2002-vintage TODOs:

/* TODO: #ifndef */
/* TODO: platform specific: array[NGX_INVALID_ARRAY_INDEX] must cause SIGSEGV */
/* TODO: auto_conf: ngx_inline   inline __inline __inline__ */

If they were going to be fixed, they probably would have been by now.

The longest source file

src/http/ngx_http_upstream.c is the largest file in src/, at ~7,300 lines and ~187 KB. It implements the entire upstream subsystem: connecting to backends, retrying, buffering, the SSL handshake to upstream, header transformation, response caching glue. Runners-up:

File Lines
src/http/ngx_http_upstream.c ~7,300
src/event/ngx_event_openssl.c ~6,600
src/http/ngx_http_core_module.c ~5,400
src/http/modules/ngx_http_proxy_module.c ~5,400

Two of the largest files — ngx_http_upstream.c and ngx_http_proxy_module.c — are arguably "the same feature" split across the upstream framework and the directives that drive it.

Why "engine x"

Igor Sysoev has explained in interviews that nginx is short for "engine X", pronounced "engine ex" — chosen because it's short, easy to type on a Russian keyboard, and intentionally suggests a generic high-performance engine rather than committing to a specific protocol. The README still notes the pronunciation: "engine x" or "en-jin-eks".

The ngx_ prefix on every public symbol is the same idea — short, distinctive, lowercase. That single prefix has scaled to roughly 247,000 lines without a namespace collision because nothing else in the C ecosystem uses it.

The bundled Cyrillic charset tables

conf/koi-utf, conf/koi-win, and conf/win-utf are mapping tables between KOI8-R, CP1251, and UTF-8. They're shipped as default config files because nginx was originally written for a Russian search engine in an era when these encodings were still common on the Russian-language web. The charset filter (src/http/modules/ngx_http_charset_filter_module.c) reads them.

In 2026 these are mostly historical, but they're still installed by make install and the filter module still uses them when configured. They're a quiet remnant of where nginx came from.

Zero bot commits, ever

A git log search across all 8,575 commits returns zero entries with Co-authored-by: *[bot]* trailers (dependabot, factory-droid, github-actions, copilot). nginx development still happens entirely as human patches, reviewed by humans, committed by humans. The repo's GitHub-side bots (CLA, stale-marker, new-issue welcome) operate on issues and pull requests, not on the code itself.

This is unusual for a 24-year-old C project of this size — even the Linux kernel has dependabot-style automation in places. It says something about how tightly the core team holds the gate.

A C++ file that builds nothing

src/misc/ngx_cpp_test_module.cpp is 31 lines and exists only to verify that nginx's headers can be included from C++. It's compiled but contains no functionality. If you --add-module= a third-party module written in C++, this file is your guarantee that nginx's headers won't break when the C++ compiler sees them.

The Christmas Day refactor

QUIC moved into its current home, src/event/quic/, on 2020-12-25 at 14:01:28 +0300 — a Friday and a public holiday in most of the world. The commit message: "QUIC: moved all quic sources into src/event/quic." Whoever was working that day had a quiet office.

585 release tags

The repo has 585 release tags, going back to release-0.1.0 from October 2004. Recent cadence is roughly 6 mainline releases a year plus parallel stable-line patches. The latest tag in the current snapshot is release-1.30.0; the version constant in src/core/nginx.h reports 1.31.0 — that's the in-flight mainline.

Two release lines run concurrently at any given time: a stable line (e.g., 1.28.x) that only gets backported security and correctness fixes, and a mainline (1.29.x, 1.30.x, 1.31.x) that gets new features. The stable line graduates to the next stable when nginx ships an even-numbered minor version.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Fun facts – nginx wiki | Factory