用于故障转移的单点访问

发布于 2024-07-24 01:00:54 字数 601 浏览 7 评论 0原文

这就是我想要实现的目标,但我对这个主题不太熟悉,所以请耐心等待:)

我有一个服务器,一些设备连接到该服务器并定期上传一些数据。 通信是通过普通 TCP 套接字使用我们为速度和效率而设计的专有协议完成的。 每个此类连接基本上都是一个会话,只要设备保持连接,该会话就会打开。 我现在需要的是(1)设计故障转移机制和(2)扩展。 一旦第一个实例失败,就会有另一个服务器节点开始工作。 我一直在寻找 Terracotta 来做一个轻量级集群。 但我不明白的是设备如何知道为第二个节点运行? 我可能可以“教”他们尝试几个接入点..但这确实很痛苦,因为其中一些是我无法控制的。 理想情况下,我希望中间有一些魔法,可以自动将连接重新重定向到集群中的任何可用节点。

现在。 我想知道的第一件事是这些工具在世界中是如何调用的。 其次 - 我需要简单的现成解决方案,最好是免费或具有友好商业许可的开源解决方案。 我们不使用任何重量级容器,服务器实例是一堆与 Spring 连接的 POJO,一切都在一个 JVM 中运行。 理想情况下,我想将这样的魔盒放置在其中一个节点上,为所有设备公开单个IP/端口并进行一些配置。 设置。 这是可能的还是我梦想着以廉价的方式解决一个棘手的问题?

This is what I am trying to achieve but I'm not familiar with the subject well enough, so please bear with me :)

I've got a server to which some devices get connected and periodically upload some data.
Communication is done over plain TCP sockets using a proprietary protocol we designed for speed and efficiency. Every such connection is basically a session which is open as long as device stays connected. What I need now is (1) design failover mechanism and (2) scale up. There would be another server node which would pick up once first instance fails. I've been looking at Terracotta to do a lightweight cluster. But what I don't understand is HOW would devices know to run for the second node?? I could probably "teach" them to try several access points.. but this would really be a pain as some of them are out of my control. Ideally, I want some magic in a middle which would re-redirect connection automatically to any available node in a cluster.

Now. First thing I want to know is how such tools called in a world. Second - I need simple off-the-shelf solution, preferably free or open source with friendly commercial license. We don't use any heavy weight containers, server instance is a bunch of POJO's wired up with Spring, everything runs in one JVM. Ideally, I would like to place such magic box on one of the nodes, expose single IP/port for all devices and do some config. setup. Is this possible or am I dreaming for cheap solution on a tough problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

拥抱影子 2024-07-31 01:00:54

我认为您正在寻找负载平衡。 您可以选择软件或硬件解决方案。 在这两种情况下,想法是相同的:负载均衡器将监视两个节点的状态并将连接路由到活动的节点。

尝试此链接作为示例。

You are looking for Load balancing, I think. You can pick from software or hardware solution. In both cases idea is the same: load balancer will monitor the state of both nodes and route connections to one which is alive.

Try this link, as an example.

唯憾梦倾城 2024-07-31 01:00:54

首先我认为这个问题应该发布在 serverfault.com 上,但是一旦你在这里问,我相信你正在寻找的是某种负载平衡器具或平衡盒。

First I think this question should be posted at serverfault.com, but once you asked here, I believe what you're looking is some sort of load balance appliance or box.

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