TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Caddyhttp: Enable HTTP/3 by Default

284 pointsby fariszrover 2 years ago

15 comments

mholtover 2 years ago
Oh hey HN. This is in the Caddy 2.6 beta already: <a href="https:&#x2F;&#x2F;github.com&#x2F;caddyserver&#x2F;caddy&#x2F;releases&#x2F;tag&#x2F;v2.6.0-beta.3" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;caddyserver&#x2F;caddy&#x2F;releases&#x2F;tag&#x2F;v2.6.0-bet...</a> - please try it out!<p>Thanks to Marten Seemann for maintaining the quic-go library we use. (I still haven&#x27;t heard whether Go will add HTTP&#x2F;3 to the standard library.)<p>Caddy 2.6 should be the first stable release of a general-purpose server to support and enable standardized HTTP&#x2F;3 by default. HTTP versions can be toggled on or off. (Meaning you can serve <i>only</i> HTTP&#x2F;3 exclusively if you&#x27;re hard-core.)<p>PS. Caddy 2.6 will be our biggest release since 2.0. My draft release notes are about 23 KB. We&#x27;re looking at huge performance improvements and powerful new features like events, virtual file systems, HTTP 103 Early Hints, and a lot of other enhancements I&#x27;m excited to show off on behalf of our collaborators!
评论 #32770892 未加载
评论 #32769612 未加载
评论 #32771861 未加载
评论 #32773753 未加载
0xEFFover 2 years ago
I&#x27;ve been using Caddy in a 3 node HA cluster sharing an anycast bgp address for about 18 months now and it&#x27;s been fantastic. Certs &quot;just work&quot; across the cluster once consul is wired up. I recently added IPv6 which also &quot;just works.&quot;<p>greenpau&#x2F;caddy-security is fantastic and &quot;just works&quot; for OIDC sso.<p>mholt, thanks for recently adding the ability to bind to multiple specific IP addresses by default, this help me conserve precious public IPv4 addresses.
评论 #32770735 未加载
michael_michaelover 2 years ago
Thanks for a great piece of software that I use every day in production and just works.<p>At first I was scared of how stupid simple it is. It feels like web servers are supposed to have giant config files with a hundred mysterious knobs to twiddle. Now I always default to Caddy, and have yet to find an instance where it didn&#x27;t fit my needs. Congrats.
评论 #32770926 未加载
srameshcover 2 years ago
I very recently tried Caddy for the first time and it is one of the best software experiences I had especially because of it&#x27;s ease of use.
评论 #32770706 未加载
评论 #32773733 未加载
pachicoover 2 years ago
Weirdly enough, among the reasons to switch from nginx to Caddy I never find the lack of observability nginx and its almost useless Prometheus exporter have.<p>I see several posts discussing under which circumstances or use cases one might outperform the other but they never seem to care about having decent metrics.<p>I might overrate the importance of this, who knows...
评论 #32770788 未加载
评论 #32770766 未加载
westurnerover 2 years ago
lucaslorentz&#x2F;caddy-docker-proxy works like Traefik, in that Container metadata labels are added to the reverse proxy configuration which is reloaded upon container events, which you can listen to when you subscribe to a Docker&#x2F;Podman_v3 socket (which is unfortunately not read only)<p>So, with Caddy or Traefik, a container label can enable HTTP&#x2F;3 (QUIC (UDP port 1704)) for just that container.<p>&quot;Labels to Caddyfile conversion&quot; <a href="https:&#x2F;&#x2F;github.com&#x2F;lucaslorentz&#x2F;caddy-docker-proxy#labels-to-caddyfile-conversion" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;lucaslorentz&#x2F;caddy-docker-proxy#labels-to...</a><p>From <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26127879" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26127879</a> re: containersec :<p>&gt; &gt; <i>- [docker-socket-proxy] Creates a HAproxy container that proxies limited access to the [docker] socket</i>
评论 #32771793 未加载
评论 #32771381 未加载
评论 #32771356 未加载
nykolaszover 2 years ago
Will have to give Caddy a try. Been a long time nginx user, but they have been very slow to implement new features (including HTTP&#x2F;3), unfortunately.
评论 #32770973 未加载
评论 #32771132 未加载
seabrookmxover 2 years ago
Tangential, but Google is serving HTTP&#x2F;3 by default out of Google Cloud now: <a href="https:&#x2F;&#x2F;cloud.google.com&#x2F;blog&#x2F;products&#x2F;networking&#x2F;cloud-cdn-and-load-balancing-support-http3" rel="nofollow">https:&#x2F;&#x2F;cloud.google.com&#x2F;blog&#x2F;products&#x2F;networking&#x2F;cloud-cdn-...</a><p>Pretty cool stuff.
manishsharanover 2 years ago
I have been using HAproxy and it has been very performant but the lack of documentation for its APIs may be the reason I will start playing with Caddy.
评论 #32772922 未加载
Matthias247over 2 years ago
I&#x27;m curious about the implementation, and haven&#x27;t looked at the source of quic-go yet: Does it use a single UDP socket to handle datagrams for all QUIC connections, does it use connected UDP sockets per connection, or does it use multiple UDP sockets, where each handle a certain set of connections - and where an external load balancer is required to redirect to the sockets?<p>Unfortunately there&#x27;s no best answer for this: Using a single socket will allow for connection migration, but it will end up being a bottleneck in terms of scalability since it will serialize access on a lot of kernel and driver datastructures (just a single transmit&#x2F;receive queue). Connected sockets avoid that, but don&#x27;t allow for address migration. And doing external load balancing gets far more complex than just starting a binary - even the most simple solution requires running XDP code.
评论 #32772302 未加载
kgersenover 2 years ago
Beware of a performance hit (in term of bps not req&#x2F;s) if you push big data with Caddy.<p>Go implementation of HTTP&#x2F;2 already took a &#x2F;5 hit over http&#x2F;1.1 (Go http&#x2F;2 implementation is 5x slower than Go http&#x2F;1.1)<p>With HTTP&#x2F;3 our early benchs indicate &#x2F;2 ot &#x2F;3 from HTTP&#x2F;2 (so &#x2F;10 from http&#x2F;1.1)
评论 #32772193 未加载
评论 #32772196 未加载
westurnerover 2 years ago
For HTTP&#x2F;3 support with python clients:<p>- aioquic supports HTTP&#x2F;3 only now <a href="https:&#x2F;&#x2F;github.com&#x2F;aiortc&#x2F;aioquic" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;aiortc&#x2F;aioquic</a><p>- httpx is mostly requests-compatible, supports client-side caching, and HTTP&#x2F;1.1 &amp; HTTP&#x2F;2, and here&#x27;s the issue for HTTP&#x2F;3 support: <a href="https:&#x2F;&#x2F;github.com&#x2F;encode&#x2F;httpx&#x2F;issues&#x2F;275" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;encode&#x2F;httpx&#x2F;issues&#x2F;275</a>
CodesInChaosover 2 years ago
Since address validation is about blocking senders which forge their IP address, I think the number of connection attempts which where the client doesn&#x27;t eventually validate its address should factor into the decision to enable this feature. This should rarely happen for legitimate clients (e.g. connection loss&#x2F;cancellation during the first roundtrip) but always happen for IP address forgers.<p>Or perhaps simply use the number of half-open&#x2F;embryonic connections as the metric.
评论 #32770127 未加载
howeycover 2 years ago
does it work with &quot;tls internal&quot; or do the certs need to be signed by an outside CA for HTTP&#x2F;3 to be enabled.
评论 #32769745 未加载
rubatugaover 2 years ago
Bad idea to use HTTP&#x2F;3, HTTP&#x2F;2 should be good enough
评论 #32774320 未加载