nginx wins on throughput per byte of memory and on doing several jobs in one
binary. It loses on dynamic configuration, automatic TLS and the safety of the
language you write every day — exactly where the October bugs sit.

Against Apache HTTP Server

Apache is the honest comparison: the other general-purpose web server with a
thirty-year base. Its classic model is a process or thread per connection, with
modules that hook almost every stage of request processing. Its advantages are
real:

  • Per-directory configuration. .htaccess lets application owners change
    behaviour without root or a reload. nginx has no equivalent; every change is
    central.
  • Embedded application runtimes. mod_php and mod_perl keep the
    interpreter inside the server. nginx needs a separate PHP-FPM process —
    another service to patch and another socket to secure.

nginx wins on concurrency efficiency, static-file throughput and memory per
connection. For a front-end proxy serving many slow clients, the event loop is
the better architecture. For one application server where per-directory
overrides matter, Apache is still defensible.

Against Caddy

Caddy is the modern challenger, written in Go, and its defining feature is
automatic HTTPS: certificates obtained and renewed over ACME without
configuration. It speaks HTTP/3, ships a small static binary, and its Caddyfile
is far simpler than nginx's.

Where Caddy wins: greenfield deployments that want TLS without an ops project,
small teams that value a config they can read, and automatic rotation. Where
nginx wins: raw throughput under high concurrency, deeper proxy and caching
directives, and a huge body of operational knowledge and third-party modules.
Caddy's Go runtime also has a different memory-safety profile — the class of bug
in this series is largely absent, though the logic errors are not.

Against Envoy

Envoy is a Layer 7 proxy built for dynamic, service-mesh environments. Its
configuration arrives through xDS APIs from a control plane; listeners,
clusters, routes and filters change without a restart. It has first-class
observability, retries, outlier detection, mTLS via SDS and HTTP/3 support.

Where Envoy wins: Kubernetes and mesh deployments where configuration must be
generated continuously, and teams already running Istio or a similar control
plane. Where nginx wins: simplicity. A single binary with a text file is easier
to operate than Envoy plus a control plane.

Envoy's complexity is also a safety property: the data plane is dumb and the
control plane is a separate attack surface. nginx puts both in one process.

Against HAProxy

HAProxy is the specialist load balancer. It wins on pure L4/L7 balancing:
ACLs, stick tables, connection limits, health checks, seamless reloads and very
high connection rates.

nginx wins when the same process must serve static content, terminate TLS,
cache responses and balance upstreams. That consolidation is the product's
selling point and its risk: one binary, one config, one CVE list for eight jobs.

The configuration-language tax

Every one of these tools can express "map this URI to that path" and "evaluate
this string with variables". nginx's language is the least type-safe. Directives
interact through mutable request state: rewrite changes the URI, alias maps
it to a path, set and return evaluate variables, and the order of phases
decides what each sees. The if directive is described in nginx's own
documentation as "evil" outside a narrow set of uses.

CVE-2026-15176 is a direct consequence: a URI changed by rewrite is mapped by
alias before the location is re-selected, and the path buffer is sized for
the wrong string. CVE-2026-93479 is the same theme in string evaluation. Neither
is a parser bug; both are bugs in a language that allows inconsistent
intermediate states.

That is the tax: one binary that does eight jobs, and a language that can
express all of them. You also get a language whose edge cases are security
boundaries.

Next: Part 5 — inside the worker: the event loop, the module phases, the TLS
session cache with its three key slots, and the HTTP/3 parser that gave one
field two jobs.