问HN:为什么在Nginx前面放置一个HAProxy?

2作者: rvitorper26 天前原帖
你好,感谢你提前抽出时间。<p>我看到有些评论提到在 Nginx 前面使用 HAProxy,Nginx 作为应用实例的反向代理。我想了解这种架构在什么情况下是可行且推荐的,是否可以直接去掉 HAProxy,仅使用 Nginx 作为对外服务器,或者干脆去掉 Nginx,此外,还有没有其他因素需要考虑使用 HAProxy 和 Nginx,比如将它们与一些 Varnish 实例配合使用。<p>非常感谢你的时间。
查看原文
Hey, thanks for your time in advance.<p>I saw in a few comments people talking about having a HAProxy in front of a Nginx, which in turn acts as the reverse proxy to the app instances.<p>I wanted to understand what use-cases is this architecture viable and recommended, if you could just remove the HAProxy and have Nginx as the public facing server or maybe remove the Nginx altogether, and if there are other factors to use the HAProxy and the Nginx, such as pairing them with a few Varnish instances.<p>Thanks a lot for your time