For a new internet-facing edge tier, when would you choose Caddy over a more established proxy such as nginx or HAProxy, and what are you giving up by doing so?
answer
- what recurring cost does this tier have
- its one differentiator is certificates
- many or customer-supplied hostnames
- static binary means build-time plugins
- behind a CDN the advantage evaporates
basics
~20 sChoose Caddy when certificate operations dominate the work — many or customer-supplied hostnames, small teams, no PKI runbook — and when a short config is worth more than fine-grained tuning. You give up tuning surface, operational precedent, and dynamic plugins, since third-party modules must be compiled in.
solid answer
~60 sI would choose Caddy where its one differentiator is load-bearing: certificate lifecycle. If the edge terminates TLS for many hostnames, or for hostnames customers bring themselves, automatic HTTPS and on-demand issuance remove an entire subsystem — client, renewal timer, deploy hook, expiry alerting — and that is worth real money to a small team. The short config helps too, mostly by reducing drift. What I give up is threefold. First, tuning surface and precedent: nginx and HAProxy have twenty years of accumulated recipes for the awkward cases, and when I need an unusual behaviour at 3am someone has already written it down. Second, extensibility: Caddy is a single statically linked Go binary, so third-party modules are compiled in with `xcaddy`, which means my edge ships a custom binary I build and version myself. Third, staffing — my on-call knows nginx. And I would check the premise: if a CDN or cloud load balancer already terminates TLS, Caddy's headline feature buys nothing and it has to win on other grounds.
code
bash · 2 lines# Third-party modules are linked in at build time, not loaded at runtime
xcaddy build --with github.com/caddy-dns/cloudflarego deeper
Be able to say what Caddy is known for — automatic HTTPS and a very short config — and that other proxies expose far more settings.
Explain the concrete differences: certificates managed by the server itself, a single static binary, and third-party functionality that must be compiled in rather than loaded.
Argue from the operational cost of the tier — how many hostnames, who owns them, what breaks today — and identify when a fronting CDN removes Caddy's main advantage entirely.
Own the second-order consequences: a custom binary becomes a supply-chain and release-engineering commitment, and adding a proxy technology for one tier is a permanent staffing tax unless it replaces the incumbent.
## Start by asking what the tier is actually for The honest version of this question is not "which proxy is better". It is: what is the dominant recurring cost of running this tier, and does Caddy remove it? Caddy is a competent general-purpose web server and reverse proxy, but it has exactly one differentiator that changes an org chart: it makes certificate management disappear. Every other axis — routing, proxying, static files, compression, header manipulation, load balancing — is a place where all the mainstream proxies are adequate, and where the incumbents have more knobs. ## Where Caddy wins **Certificate operations are the recurring cost.** Expired certificates remain a leading cause of self-inflicted outages. Caddy makes issuance, renewal, stapling and the HTTP-to-HTTPS redirect properties of the config rather than a separate pipeline. On a team with no dedicated platform group, deleting that pipeline is a genuine reduction in surface area. **The hostname set is large or not yours.** Multi-tenant custom domains are the case Caddy is uniquely good at, because on-demand TLS issues per hostname at handshake time instead of requiring a config listing every tenant. Building that on another proxy means writing a control plane. **Config size and drift are a real problem.** A site that takes two lines instead of forty is not a vanity metric when forty lines across dozens of sites is where the mistakes live. Fewer lines means fewer opportunities to omit a security header block or a redirect. **Deployment simplicity matters.** One static binary with no dependencies, plus a data directory, is a small thing to ship. ## Where Caddy costs you **Tuning surface and precedent.** The incumbents expose more of the machine and have far more accumulated operational knowledge — the awkward buffering case, the unusual header rewrite, the exact interaction with a legacy client. Caddy's defaults are good, which is exactly why there are fewer knobs; when you need one that does not exist, you are writing a module. Note the honest form of this claim: it is about tuning surface and precedent, not about raw throughput, which is workload-specific and where published benchmarks disagree. **The plugin model is a build-time decision.** Caddy is a statically compiled Go binary. Third-party modules — DNS providers for the DNS challenge, networked certificate storage backends, auth or rate-limiting modules — are linked in at build time with `xcaddy`, not loaded at runtime. So the moment you need one, your edge tier stops being "the official release" and becomes a binary your CI produces, pins and rebuilds for every upstream security patch. That is a supply-chain and release-engineering obligation, and it is the single most under-weighted cost in this comparison. **Staffing and support.** Your on-call engineers, your vendors' documentation and every StackOverflow answer in your incident history assume nginx. Introducing a second proxy technology for one tier is a permanent tax unless it displaces the first. **Extreme connection-level workloads** are HAProxy's traditional ground, with a much deeper toolkit for connection-level policy and runtime control. If your problem statement is about that, it is not a Caddy conversation. ## Check the premise before answering The most common wrong answer picks Caddy for automatic HTTPS in an architecture where nothing in front of the origin ever sees a public certificate. If a CDN or a cloud load balancer terminates TLS at the edge and re-encrypts to the origin with an internal or platform-managed certificate, Caddy's differentiator is neutralised and it must win on ordinary merits — which is a much weaker case. Similarly, if certificates already arrive from a platform's own managed service, you are not buying anything. ## How I would decide, concretely 1. Does this tier terminate publicly trusted TLS itself? If not, Caddy has no special claim. 2. Are the hostnames known and few? Then any proxy plus an existing ACME client is fine, and familiarity should win. 3. Are the hostnames many, customer-supplied or changing? Caddy's case is strong and the alternative is bespoke automation. 4. Do I need third-party modules? Price a custom-binary build pipeline honestly, including how fast I can rebuild on a security release. 5. Who is on call, and do they already run something else at this layer? ## The trade in one sentence Caddy trades tuning surface, ecosystem breadth and runtime extensibility for the removal of an entire operational subsystem — and that is a good trade precisely when that subsystem is what keeps breaking.
- Your team needs the DNS challenge for wildcard certificates. How does that change the decision?It moves you off the stock binary. DNS-provider modules are not in the standard release, so you build with `xcaddy` and now own a custom artefact: your CI must rebuild and re-pin it on every Caddy or provider release, and your supply-chain review covers a module you did not write. That is manageable, but it should be priced before you commit, not discovered afterwards.
- Is it reasonable to run Caddy only for TLS termination and keep nginx behind it?It can be, but be honest about why. Splitting the tier gives Caddy the certificate job and nginx everything else, at the cost of an extra hop, an extra technology on call and two places to look during an incident. It is defensible as a migration step or when the certificate problem is acute; as a permanent design it is usually two problems where you had one.
- How would you evaluate the claim that one proxy is faster than another at the edge?By refusing to accept it in the abstract. Throughput at the edge depends on TLS handshake rate, connection concurrency, body sizes and what handlers actually run, and published comparisons routinely disagree because they measure different mixes. If performance is genuinely the deciding factor, test with your own traffic shape; otherwise decide on operational grounds, which is where the real difference lives.
saying these in an interview costs you the question
- Picks Caddy for automatic HTTPS behind a TLS-terminating CDN
- Assumes plugins can be dropped in at runtime like shared modules
- Argues purely from a raw throughput benchmark
- Ignores that the team already operates something else at this layer
- Treats short configuration as a benefit with no offsetting cost