无需负载均衡器的 Glassfish 故障转移

发布于 2024-07-11 00:26:54 字数 176 浏览 10 评论 0原文

我有一个包含两个实例的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

女中豪杰 2024-07-18 00:26:54

我们解决这个问题的方法是我们有两个 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.

这个俗人 2024-07-18 00:26:54

嗯..根据文档,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.

拒绝两难 2024-07-18 00:26:54

不,您不能在应用程序级别执行此操作。

您的选择是:

  • 循环 DNS - 将您的服务器公开到互联网并让客户端进行负载平衡 - 这非常有吸引力,因为它肯定会启用故障转移。
  • 使用不同的第 3 层负载平衡系统 - 例如“Windows 网络负载平衡”、“Linux 网络负载平衡”或我编写的名为“Fluffy Linux cluster"
  • 使用具有故障转移热备用的单独负载平衡器

在任何这些情况下,您仍然需要确保数据库和会话数据等,在集群成员之间可用且同步,这在实践中要困难得多。

No, you can't do it at the application level.

Your options are:

  • Round-robin DNS - expose both your servers to the internet and let the client do the load-balancing - this is quite attractive as it will definitely enable fail-over.
  • Use a different layer 3 load balancing system - such as "Windows network load balancing" , "Linux Network Load balancing" or the one I wrote called "Fluffy Linux cluster"
  • Use a separate load-balancer that has a failover hot spare

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文