无需负载均衡器的 Glassfish 故障转移
我有一个包含两个实例的 Glassfish v2u2 集群,我想在它们之间进行故障转移。 我读到的关于这个主题的每一篇文档都说我应该在 Glassfish 前面使用负载均衡器,例如 Apache httpd。 在这种情况下,故障转移有效,但我再次遇到单点故障。 Glassfish 是否能够在前面没有负载均衡器的情况下进行故障转移?
I have a Glassfish v2u2 cluster with two instances and I want to to fail-over between them. Every document that I read on this subject says that I should use a load balancer in front of Glassfish, like Apache httpd. In this scenario failover works, but I again have a single point of failure.
Is Glassfish able to do that fail-over without a load balancer in front?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我们解决这个问题的方法是我们有两个 IP 地址,它们都响应 URL。 DNS 提供商 (DNS Made Easy) 将在两者之间循环。 将超时设置得较低将确保如果一台服务器出现故障,另一台服务器将做出响应。 当一台服务器停止响应时,DNS Made Easy 只会发送另一台主机作为服务器来响应此 URL。 您必须信任 DNS 提供商,但您可以购买具有极高 DNS 查找可用性的服务
至于高可用性,您可以进行允许会话复制的集群设置,以便用户不会丢失超过一个潜在请求这失败了。
The we solved this is that we have two IP addresses which both respond to the URL. The DNS provider (DNS Made Easy) will round robin between the two. Setting the timeout low will ensure that if one server fails the other will answer. When one server stops responding, DNS Made Easy will only send the other host as the server to respond to this URL. You will have to trust the DNS provider, but you can buy service with extremely high availability of the DNS lookup
As for high availability, you can have cluster setup which allows for session replication so that the user won't loose more than potentially one request which fails.
嗯..根据文档,JBoss 可以在没有负载均衡器的情况下进行故障转移(http://docs.jboss.org/jbossas/jboss4guide/r4/html/cluster.chapt.html)第 16.1.2.1 章。 客户端拦截器。
据我所知,glassfish 集群在节点之间提供内存中会话复制。 如果我使用 Suns Glassfish Enterprise Application Server,我可以使用承诺 99.999% 可用性的 HADB。
Hmm.. JBoss can do failover without a load balancer according to the docs (http://docs.jboss.org/jbossas/jboss4guide/r4/html/cluster.chapt.html) Chapter 16.1.2.1. Client-side interceptor.
As far as I know glassfish the cluster provides in-memory session replication between nodes. If I use Suns Glassfish Enterprise Application Server I can use HADB which promisses 99.999% of availability.
不,您不能在应用程序级别执行此操作。
您的选择是:
在任何这些情况下,您仍然需要确保数据库和会话数据等,在集群成员之间可用且同步,这在实践中要困难得多。
No, you can't do it at the application level.
Your options are:
In any of these cases you still need to ensure that your database and session data etc, are available and in sync between the members of your cluster, which in practice is much harder.