Skip to content

Reasons to use Nginx

Noted by on his .


I generally recommend Caddy over Nginx, but Nginx does still have certain advantages:

  • Nginx supports OpenSSL commands that enable features like TLS record padding.

  • Performance: better latency and scalability to more connections. Not everyone uses a CDN for static/cached content

  • Kernel-accelerated TLS offload on Linux and FreeBSD

  • Many existing modules provide unique functionality. The many modules for live video streaming and image processing are good examples.

  • An ecosystem of patches with features like HPACK static dictionaries, dynamic TLS record sizing, etce

…has terrible language integration.

Generally, “language integration” isn’t really a use-case for vanilla Nginx; it’s a use-case for Nginx Unit, an Nginx language-specific module, or OpenResty. I personally prefer the reverse-proxy route since it lets me use whatever language I want regardless of server support: Go, Rust, Python, C, etc.

If none of these are that important then I absolutely would not recommend Nginx; Caddy would be the better tool.

People aren’t writing internet scale software in lua for a reason.

I’d include Itch.io, much of Taobao, and some of the most popular API gateways (including Kong) in the category of “Internet-scale software written by ‘people’”.


Web­mentions

This site supports Webmentions, a backlink-based alternative to traditional comment forms.

Publish a response on your own website and share the link here to send me a webmention! Include a link to this page's canonical location for it to be accepted.

Webmentions received for this post appear in the following list after I approve them. I sometimes send Webmentions to myself on behalf of linking sites that don't support them. I replace broken links with Wayback Machine snapshots, if they exist.

Toggle Webmentions

Feel free to contact me directly with feedback; here’s my contact info