TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Do you use Nginx in production? or have you switched

5 点作者 martinbaun8 个月前
What are you using infront of your webapp? and more importantly why?<p>I used NGINX for many years, but around 1.5 year ago I switched to Caddyserver as the SSL certificates are just so nice getting them autohandled. I noticed a slight performance decrease, but for my kinda services it is not so important.<p>But I am curious, what do you use? and more importantly why?

4 条评论

stephenr8 个月前
We use HAProxy at the load balancers, and HAProxy&#x2F;Varnish&#x2F;Apache on the individual app server VMs.<p>This separates concerns completely:<p>- HAProxy knows about and manages the TLS, balancing, client routing etc;<p>- Varnish knows about and manages response caching and ESI processing (and often a combination of both);<p>- Apache knows about and runs the various backend services (a php web app, a couple of ruby third party tools, etc)<p>Nginx has some significant downsides to what we currently use, unless we opt for the paid version which best I can tell is ~$1K&#x2F;instance&#x2F;month. These aren&#x27;t hypothetical differences these are features we actually use:<p>- no sync for load balancing data (sticky peer data, rate limit data, etc): HAProxy supports this out of the box;<p>- no active health checks: HAProxy supports this out of the box;<p>- no API for purging cache: Varnish supports this out of the box.<p>- no ESI support: Varnish supports this out of the box. Best I can tell even the paid version of nginx doesn&#x27;t support this.
评论 #41489654 未加载
re-thc8 个月前
CDNs, ingress, etc... haven&#x27;t had to use a web proxy directly for years. At the end of the day funnily enough it&#x27;s still nginx or similar behind the scenes.<p>Caddy for local development. Less config and setup.
评论 #41484528 未加载
cpburns20098 个月前
It works, it&#x27;s easy to configure, it&#x27;s fast, and it&#x27;s been solid for the 10 years I&#x27;ve used it.
评论 #41489541 未加载
efortis8 个月前
I use Nginx:<p><pre><code> - as a layer on top the app servers for not having to expose Node.js, and loadbalancing app servers, - brotli_static, - serving avif conditionally[1] - anonymizing IPs in logs - injecting the caching headers - injecting the CSP header - SSL Offloading </code></pre> Autorenewing SSL certificates within the server is not appealing to me because externally running a script to renew them is not much more complex and it&#x27;s more secure.<p>I mean, the autorenew bots need more priviledges, such as:<p><pre><code> - HTTP challenges need to be via HTTP (not HTTPS) [2], - HTTP challenges need write permissions on a servable directory, - DNS or HTTP challenges would need a program on a live server, - need ‘pass out’ firewall exceptions without IP scope. &quot;We don’t publish a list of IP addresses we use to validate… Let’s Encrypt&quot; [3] </code></pre> 1. <a href="https:&#x2F;&#x2F;blog.uxtly.com&#x2F;conditional-avif-for-video-posters" rel="nofollow">https:&#x2F;&#x2F;blog.uxtly.com&#x2F;conditional-avif-for-video-posters</a><p>2. <a href="https:&#x2F;&#x2F;datatracker.ietf.org&#x2F;doc&#x2F;html&#x2F;rfc8555#section-8.3" rel="nofollow">https:&#x2F;&#x2F;datatracker.ietf.org&#x2F;doc&#x2F;html&#x2F;rfc8555#section-8.3</a><p>3. <a href="https:&#x2F;&#x2F;letsencrypt.org&#x2F;docs&#x2F;faq&#x2F;#what-ip-addresses-does-let-s-encrypt-use-to-validate-my-web-server" rel="nofollow">https:&#x2F;&#x2F;letsencrypt.org&#x2F;docs&#x2F;faq&#x2F;#what-ip-addresses-does-let...</a>
评论 #41489552 未加载