Java 负载平衡选项
我不想重新发明轮子,而是想为我的 Java 后端使用开源负载均衡器。我将使用 GlassFish 作为应用程序服务器(运行 EAR
),并且每个应用程序服务器很可能在 Ubuntu Server VM 上运行。
因此负载均衡器可能(尽管我对其他想法持开放态度) !)是它自己的 Ubuntu 服务器虚拟机,运行某种开源负载平衡软件。至于这是什么(请注意图中的大“?
”!)我并不关心,只要它:
- 超级快
- 安全
- 与 GlassFish 配合良好
- 免费且开源并附带一个许可证,不限制我将这个系统作为产品或服务出售
- 相对容易配置(但我不害怕弄脏我的手)
只是想知道我的(最好)的选择是。到目前为止,我已经发现:
- Apache
HTTPd
- haproxy
- nginx
但没有什么能成为满足我的需求的最终所有显而易见的解决方案。预先感谢您提供任何建议或推动正确的方向!
Rather than reinvent the wheel, I'd like to utilize an open source load balancer for my Java backend. I'll be using GlassFish as the app server (running an EAR
), and each app server will most likely be running on an Ubuntu Server VM.
So the load balancer will probably (although I'm open for other ideas!) be its own Ubuntu Server VM running some sort of open source load balancing software. As to what this is (please note the big "?
" in the diagram!) I don't really care so long as it:
- Is super fast
- Is secure
- Plays nice with GlassFish
- Is free and open source and comes with a license that doesn't restrict me from selling this system as a product or service
- Is relatively easy to configure (but I'm not scared do get my hands dirty)
Just wondering what my (best) options were. So far I've scouted out:
- Apache
HTTPd
- haproxy
- nginx
But nothing is blowing my doors down as being the end-all-be-all-obvious-solution to my requirements. Thanks in advance for any suggestions or nudges in the right direction!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
GlassFish Server 开源版支持 AJP(mod_jk、mod_proxy,请参阅 一体化文档包)。 Oracle GlassFish Server 附带一个可与 Apache httpd、IIS 和 Oracle iPlanet Web Server 配合使用的插件。
希望这有帮助。
GlassFish Server Open Source Edition supports AJP (mod_jk, mod_proxy, see the administration guide in the all-in-one docs bundle). Oracle GlassFish Server ships with a plugin that works with Apache httpd, IIS, and the Oracle iPlanet Web Server.
Hope this helps.
以下是关于开箱即用和常用功能的完整概述。
http://blog.eisele.net/2012/01 / throwing-light-on-glassfish-webserver.html
在商业场景中我看到很多BigIP产品在使用。
Here is a complete overview about what comes out-of-the-box and is commonly used.
http://blog.eisele.net/2012/01/throwing-light-on-glassfish-webserver.html
In commercial scenarios I have seen a lot of BigIP products in use.
我过去曾使用过 Python Director 并取得了巨大成功。这并不是一个真正的 Java 问题,任何 SLB(软件负载均衡器)都会完成负载均衡和代理 HTTP 的工作。
实际上,我们将 ZeroConf / Bonjour 侵入了我们的 Python Director 版本,以便负载均衡器能够自动发现何时在网络中自动添加或删除内容。
它在生产中运行了几年,没有出现任何问题,我们从未接触过它。
I have used Python Director in the past with great success. This isn't really a Java problem, any SLB ( Software Load Balancer ) will do the job to load balance and proxy HTTP.
We actually hacked ZeroConf / Bonjour into our version of Python Director so that the load balancer would auto discover when things were added or removed from the network automatically.
It worked in production for a couple of years with no issues, we never had to touch it.