26 ms·
Nginx 1.25.0: experimental HTTP/3 support
- compilator1 4y agoOnly .htaccess support is missing from nginx. Good web server.
- mtmail 4y agoRelated (opinionated) https://www.nginx.com/resources/wiki/start/topics/examples/likeapache-htaccess/ https://www.nginx.com/resources/wiki/start/topics/examples/l... "Stop using .htaccess. It’s horrible for performance. NGINX is designed to be efficient"
- networked 4y ago.htaccess doesn't have to affect performance; this is more of a historical artifact. With an HTTP server expecting a read-only site root, you could only read every .htaccess once, when you replaced the site root filesystem with a new version. A user could still see a read-write filesystem, only with a "save" button (command, etc.) that created and mounted a new read-only site root. While it is a performance and security burden, people reject .htaccess is too readily. It has enabled users who aren't quite programmers to assemble sites out of web applications and components that live in different subdirectories. It has clear value. (Not that I think nginx should implement it.)
- bandrami 4y agoI think the bigger issue is that the use case .htaccess was designed for (multiple users sharing a single physical server) just isn't really a thing anymore AFAIK. If you're just managing rules in your own container somewhere, there's no sense keeping the logic in multiple places.
- SahAssar 4y ago> With an HTTP server expecting a read-only site root, you could only read every .htaccess once, when you replaced the site root filesystem with a new version In that case you would still need some way to trigger a reload of the htaccess, right? If so, is there a usability difference to just including nginx configs on the same locations?
- foverzar 4y ago> This happens for EVERY request. It doesn't need to, though. These days you only need .htaccess for compatibility with old PHP apps. Stacking another instance of Apache on top feels bloated.
- piperswe 4y agoFor those old PHP apps, you can probably convert the .htaccess into nginx config.
- minusf 4y ago.htaccess is self inflicted pain, no need to downvote :)
- pseudosavant 4y agonginx conf is self-inflicted pain...
- whalesalad 4y ago2006 called and would like you to come back
- andersrs 4y ago[flagged]
- iknowstuff 4y agoIs there anything like nginx based on hyper?
- nixcraft 4y agoI guess, now is the ideal time for me to experiment with LXD or Docker images that are based on Alpine Linux or Debian Slim for QUIC support for Nginx.
- jpgvm 4y agoDebian Slim all the way. musl is only good when you are building for and testing against musl. Third party software on musl has burnt me enough times to know that sticking to glibc is the way to go unless you like that sort of pain. Footnote: I actually love musl, just for my own software that explicitly targets it and is validated against it.
- still_grokking 4y agoI would strongly avoid Alpine. Most software isn't written with Musl in mind! And that shows. You can run in all kinds of extremely hard to debug issues and especially massive performance problems. Stuff may slow down to fractions of the performance comparison to regular Linux distros. If you want maximal small containers go with Distroless.
- supriyo-biswas 4y agoAny documentation on what parts of HTTP/3 are and aren’t supported by this implementation?
- ghoshbishakh 4y agoI am ashamed to say that my eyes misread HTTP/3 as Web3 for a couple of seconds. For a moment, I was confused as to what Nginx has to do with Web3.
- meerita 4y agoWe are two.
- wsatb 4y agoConsidering Web3 is mostly used as a marketing scam, it usually has "to do" with everything.
- superkuh 4y agoHTTP/3 is a Google/MS open-washing scam. They've successfully pushed a protocol designed entirely for large corporate use cases as a general HTTP version which is supposed to be used by human persons as well as corporate persons (entities). Big surprise, it's terrible for human person use cases.
- still_grokking 4y ago[flagged]
- shmoe 4y agoSo this is QUIC, right?
- markdog12 4y agoWell, HTTP 3 is standardized off the initial QUIC implementation (UDP), yes. Update: I guess, technically, HTTP 3 is the protocol built on top of the QUIC protocol.
- jupp0r 4y agoExactly, it uses QUIC as the transport layer. You can do more with QUIC, there are beta implementations to use it for WebRTC data channels[1] and there have been experiments to use it for for WebRTC media transport, for example[2]. [1] https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Using_data_channels https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/... [2] https://www.w3.org/2011/04/webrtc/wiki/images/6/69/Media_over_QUIC_At_WebRTC_TPAC_2018.pdf https://www.w3.org/2011/04/webrtc/wiki/images/6/69/Media_ove...
- still_grokking 4y agoWebRTC? I'm not sure WebRTC has a bright future. AFAIK nobody ever implemented WebRTC on top of QUIC. The new kid on the block is called WebTransport. WebTransport could be described in short as "WebRTC / WebSocket, the good parts". It's way simpler than WebRTC and solves some issues with WebSocket like the lack of low-latency unreliable transport (WebTransport can send Datagrams without having to use a reliable connection channel for that). A big difference to WebRTC is: All the STUN / TURN complexity is gone. WebTransport gives you at the end more or less almost "raw" QUIC streams or datagrams. It's almost like a socket interface for web user agents, only with all the features of QUIC. Given you have already HTTP/3 (which implies you have also QUIC) WebTransport is a pretty simple and slim addition on top: https://datatracker.ietf.org/doc/html/draft-ietf-webtrans-http3/ https://datatracker.ietf.org/doc/html/draft-ietf-webtrans-ht... (The only thing I'm missing is client authentication. It would be really good to do this in-band, and for example allow to send client certs with the WebTransport CONNECT request. For some reason this was left out on purpose. Only that I did not find out why actually.) What I'm not sure about is who good WebTransport would be in a P2P scenario. But given libp2p implemented WebTransport it would seem that it's good for that also. (So could replace WebRTC completely.)
- perbu 4y agoI am not at all convinced that the measly 1-4% performance we'll manage to eek out of this is worth the effort and complexity.
- dochtman 4y agoLatency at higher percentiles (crappier internet connections) improves pretty meaningfully in most of the articles I've seen. Here's a recent one from Dropbox: https://dropbox.tech/frontend/investigating-the-impact-of-http3-on-network-latency-for-search https://dropbox.tech/frontend/investigating-the-impact-of-ht... (Discussed at https://news.ycombinator.com/item?id=36027702 https://news.ycombinator.com/item?id=36027702.)
- robocat 4y agoQuote from article: For the majority of our global users, HTTP3 reduced network latencies by 5-15ms (or 5%). While this is an improvement, these wins would appear negligible to the average user. At p90, however, HTTP3 demonstrated massive improvements, with a latency reduction of 48ms (or 13%)—and at p95, a reduction of 146ms (21%). This could be explained by the fact that HTTP3 is better at handling packet drops in parallel connections by eliminating head-of-line blocking; because packet drops are more likely to occur in networks with suboptimal connection quality, the benefits of HTTP3 are more visible at the higher percentiles.
- still_grokking 4y agoGiven that the majority of people uses the web through very often quite crappy mobile links HTTP/3 is actually a significant win from the user experience perspective. It can be all the difference between "site is completely unusable" and "site is slow, but you get through". Of course it's true that QUIC is a complexity monster. OTOH HTTP/3 is actually quite simple when you have the QUIC layer implemented. A simple HTTP/3 server is no more than this: https://github.com/aiortc/aioquic/blob/main/examples/http3_server.py https://github.com/aiortc/aioquic/blob/main/examples/http3_s...
- speed_spread 4y ago
- KRAKRISMOTT 4y agoI wish Nginx would improve their developer experience. Their deployment patterns and configuration are horrid compared to Caddy which is amazing to use.
- zja 4y agoCaddy has a lot of great features, but (at least as of last year) Nginx has the edge on documentation. Caddy’s docs were almost useless. Hopefully they’ve improved since I last used it.
- nixcraft 4y agoCaddy cannot be found in the default repositories of Debian or RHEL. This raises the question of why one would use such a server. Personally, I am hesitant to download a random pre-built executable from Github, even if it is open source. I would much rather use the apt or dnf version, as anything else seems like just another toy server.
- garbagecoder 4y agoJust build it from source?
- 5e92cb50239222b 4y agoAnd then watch it like a hawk for vulnerabilities and rebuild as needed. No thanks.
- jakebasile 4y agoCaddy provides their own yum repo and I'm pretty sure it's in EPEL too.
- cpuguy83 4y agoWhile it is convenient to have software prebuilt in a trusted repo, these repos are more about providing toolchains. If something isn't in the repo (or the repo, as it often is, ie out of date) use the toolchain to build what you want.
- deleted 4y ago[deleted]
- heipei 4y agoI still love nginx, but it's a damn shame they gate some really useful features behind their nginx plus license, namely service discovery via DNS SRV records, cache purge requests and request queueing for upstreams.
- markstos 4y agoHow would you rather the devs generate revenue?
- heipei 4y agoI'm just daydreaming here, completely understand they have a business to run and they probably thought long and hard about which features to put into which license. No criticism intended, just something that eventually might catch up on them if another http server/proxy can offer everything that nginx does plus the missing items.
- josephcsible 4y agoThe way that Red Hat and Nextcloud do.
- cpuguy83 4y agoRedHat provided an entire platform that you pay support for... including supporting nginx. How can nginx (the company) replicate the same thing? Pay for the features you want. You will be better off for it. Expecting every company to follow the RedHat model is unsustainable.
- SteveNuts 4y agoThey’re owned by F5, so selling support and services.
- perbu 4y agoit is really, really hard to sell Nginx. their conversion rate is about 0%. they've tried really hard to so, but nobody would buy it.
- Ameo 4y agoI've been running Cloudflare's implementation of HTTP3/QUIC called Quiche[1] on my server's NGINX for over a year. It powers several websites and has served hundreds of millions of responses. It was a little weird to set up, but I've not encountered any issues with it so far. It will be interesting to see how their native implementation compares. [1] https://github.com/cloudflare/quiche/tree/master/nginx https://github.com/cloudflare/quiche/tree/master/nginx
- still_grokking 4y agoNGINX has now an own QUIC implementation? I have to look again. Implementing QUIC seems no fun and there are almost no implementations. Almost everybody claiming HTTP/3 support uses Quiche under the hood for QUIC (besides some outliers and AWS who are one of the very small group of orgs who have their own QUIC lib). I was under the impression NGINX kept building on the current foundations with Quiche.
- metaltyphoon 4y agoASP Net Core can use QUIC. It uses MsQuic library and libmaquic.
- still_grokking 4y agoOh, right! There is also MS. I've forgot to mention their lib as I'm not working with any MS technologies. Apologies.
- Lorin 4y agoIIS is still waiting for it, you have to run some esoteric commands to try it out and it doesn't reliably function.
- still_grokking 4y agoWell, it's not ready for prime time: https://interop.seemann.io/ https://interop.seemann.io/ A more or less full list of implementations is here: https://github.com/quicwg/base-drafts/wiki/Implementations https://github.com/quicwg/base-drafts/wiki/Implementations But I personalty would have qualms with all the C implementations. Crypto and very complex protocols are nothing one should implement in C, imho. This cries for disaster. And what's left, especially in an usable state, is quite underwhelming currently. Higher level libs / frameworks like Java's Netty and Rusts Hyper chose Quiche for QUIC. The only other ready to use libs I've found were AIOQUIC for Python and quic-go. Those are also the only ones with a working WebTransport feature currently. Looking on the above linked inter-op tables MS will need some time to catch up. QUIC is indeed complex.
- deleted 4y ago[deleted]
- pachico 4y agoI just wish Nginx had the good will to include decent metrics. The built-in stubs are far from enough. It's the main reason why I'm thinking about migrating everything to Caddy.
- getcrunk 4y agoHere here! There are 2 or 3 other goodies they lock behind their paywall which I think would be prudent from them to release so they stop ceeding ground/mindshare.
- capableweb 4y agoThat's the issue with doing one FOSS version + one paid version, some things will be gated behind the paid version and probably never end up in the FOSS one, as it drives people to purchase the paid version. In this particular case, the ngx_http_api module offers way more monitoring options but is gated behind nginx Plus.
- brabel 4y agoI think that if there's one feature they should put behind Plus, that's monitoring. Only "serious" companies need that (as a hobby project maintainer you probably don't need it)... and if you really want to make sure you don't give them a cent, you can build your own monitoring on top of nginx easily enough.
- codetrotter 4y agoInteresting! I’ve been using Caddy for a while and actually recently went back to Nginx just because I am now self hosting PeerTube and there was a config file for Nginx to proxy PeerTube server ready made. But if Caddy can serve metrics which I can then collect with for example Grafana, that’s very interesting!
- francislavoie 4y agoYep, Caddy has metrics: https://caddyserver.com/docs/metrics https://caddyserver.com/docs/metrics But caveat: we don't have maintainers who understand metrics currently, so it's nowhere near as good as we'd hope it to be. Help wanted!
- teaearlgraycold 4y agoAnyone else used to pronounce it “en-ginks”? It wasn’t until I started working as a web developer that I learned the truth. And it took me a minute to piece together that “engine X” was the same thing.
- alphabet9000 4y agoit will always be "en jinks" to me
- Eumenes 4y agoalways cute to hear a recruiter pronounce it
- andersrs 4y agoI say Engine X. Enjinks is cute. As long as you don't say "you-buntu" we can be friends.
- chungy 4y agoI still do. It's hard to force myself to read it as "engine x"; "n-jinks" just looks like the natural way.
- BehindTheMath 4y agohttps://www.nginx.com/about/the-nginx-name/ https://www.nginx.com/about/the-nginx-name/
- xfalcox 4y agoSince OpenSSL will "never" support quic, what is this using? BoringSSL?
- still_grokking 4y agoMost QUIC implementations I've seen so far indeed use BoringSSL. Not sure about the status quo in NGINX. They had a HTTP/3 implementation on Quiche (a Rust lib implementing QUIC, and HTTP/3 as a side project, but afik NGINX never used that part, only the QUIC protocol implementation). But after reading a post here I'm not sure they still use Quiche (and with it BoringSSL). Maybe they have now an own QUIC implementation (with support for other crypto libs). But given QUIC is complex and therefore hard to implement I would actually expect they still base of their HTTP/3 efforts on the by now quite popular Quiche library. But I'm maybe wrong in this regard. Have to look into that.
- xfalcox 4y ago> They had a HTTP/3 implementation on Quiche (a Rust lib implementing QUIC, and HTTP/3 as a side project AFAIK that was a Cloudflare project, and since then they moved away from nginx due to it's stagnation.
- jedisct1 4y agoOr LibreSSL.
- westurner 4y agoHTTP/3: https://en.wikipedia.org/wiki/HTTP/3 https://en.wikipedia.org/wiki/HTTP/3 QUIC: https://en.wikipedia.org/wiki/QUIC https://en.wikipedia.org/wiki/QUIC DoQ: DNS-over-QUIC: https://en.wikipedia.org/wiki/Domain_Name_System#Transport_protocols https://en.wikipedia.org/wiki/Domain_Name_System#Transport_p... RFC9520: DNS over Dedicated QUIC Connections: https://datatracker.ietf.org/doc/html/rfc9250 https://datatracker.ietf.org/doc/html/rfc9250
- est 4y agonow let's wait for Chromium's proxy support h3
- orangepanda 4y agonginx by default adds a version header in the response. I did not expect that nginx.org themselves would be 2 minor versions behind latest.
- Neil44 4y agoOpen Litespeed has had HTTP3 for a while now. And supports Apache style configs, rewriterule etc. My go to web vps setup at the moment is cyberpanel which sets everything up nice for you. I used to hand roll everything but life's too short these days.
- axrsbn 4y ago[dead]
- jgehrcke 4y agoI want to add that I have learned so much by following the nginx mailing list for more than a decade. Can we give a huge round of applause to Maxim Dounin for community support and technical excellence? Maxim and team are answering the deepest of technical questions patiently, to the point. Every time I read into those threads I am impressed by Maxim. By his dry communication style, his precision, and his patience. It's inspiring. When you get his reply (which is likely to be the case), you typically get the problem you presented described in his words: with precise language/terms. Very likely he provides a solution. Or a precise quote of reference docs or spec describing why something doesn't work, conceptually. Or a patch (he often replies with "here's a patch that should work", showing a clean diff). So: https://mailman.nginx.org/pipermail/nginx/ https://mailman.nginx.org/pipermail/nginx/ -- highly recommended if you want to learn more about HTTP and web servers in general. By the way: for forcing DNS re-resolution (mentioned in this thread here) in the open source version by the way there is a weird but extremely powerful workaround (which really works, we have used it in DC/OS successfully over years), also see https://github.com/dcos/dcos/tree/master/packages/adminrouter/extra/src#dns-resolution https://github.com/dcos/dcos/tree/master/packages/adminroute.... It was of course Maxim who described this little trick in the mailing list in 2011 :-) https://forum.nginx.org/read.php?2,215830,215832#msg-215832 https://forum.nginx.org/read.php?2,215830,215832#msg-215832 It's still highly relevant in 2023 for controlled dynamic service discovery with nginx.
- sireat 4y agoIs mailing list the recommended way to get help on nginx? I recently made the mistake/challenge to use nginx as a SSL reverse proxy for a bunch of non SSL services running in docker containers . To my dismay there is no decent documentation for what I thought would be a common usage case - namely docker for everything including nginx. * SSL was easy enough - I have a wild card certificate and nginx does have good docs on setting it up * Docker networking was a bit of pain - but I solved it by making a separate network. * proxy_pass is where I got really bogged down - I got to rewrite location /api and serve it at the internal network + port. location /api/ { rewrite ^/api(.*)$ $1 break; # proxy_pass http://172.19.0.3; # also works proxy_pass http://172.19.0.1:9090; # most likely something else is needed for fix relative paths } So now I have the problem that proxy works for mysite/api/index.html but not for any relative paths ie static/css/style.css is not loading (but docker exec -it mycontainer curl does work) Maybe it is Google's fault but it seems near impossible to find a good AUTHORATIVE reference on setting up reverse proxy server with nginx.
- markdog12 4y agoAny docker images for this? I noticed there is no official one: https://hub.docker.com/_/nginx/ https://hub.docker.com/_/nginx/
- markdog12 3y agoUpdate: nginx:1.25 up now.