服务器故障转移有开放标准吗?

发布于 2024-08-04 12:01:30 字数 111 浏览 9 评论 0原文

我正在构建一个客户端-服务器应用程序,并且正在考虑向客户端添加故障转移,以便当服务器关闭时它将尝试连接到另一个可用的服务器。是否有涉及服务器故障转移的标准或规范?我宁愿采用现有的标准,也不愿实施我自己的机制。

I'm building a client-server application and I am looking at adding failover to the client so that when a server is down it will try to connect to another available server. Are there any standards or specifications covering server failover? I'd rather adopt an existing standard than implement my own mechanism.

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

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

发布评论

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

评论(3

有深☉意 2024-08-11 12:01:30

我没有,或者不需要有。这非常简单,一切都取决于你如何连接到你的服务器,但基本上你需要继续发送 ping/keepalives/heartbeats 无论你想怎么称呼它们,以及当发生失败时(或者连续 n 次失败,如果你想要)更改配置中的开关。

通常,上述内容将作为单独的服务在客户端计算机上运行。或者,您可以创建一个方法执行处理程序,它处理您所做的所有服务器调用的执行,并且在通信失败时,在您的“catch”块中,轻按配置中的开关

I don't there is, or needs to be any. It's pretty straight forward and all depends on how you can connect to your sever, but basically you need to keep sending pings/keepalives/heartbeats whatever you want to call em, and when a fail occurs (or n fails in a row, if you want) change a switch in your config.

Typically, the above would be running as a separate service on the client machine. Altenativly, you could create a method execution handler which handles thr execution of all server calls you make, and on Communication failure, in your 'catch' block, flick your switch in config

隱形的亼 2024-08-11 12:01:30

你这个问题很笼统。以下是一些一般性答案:
Google 容错计算

Google 高可用性解决方案

You're question is very general. here are some general answers:
Google for Fault Tolerant Computing

Google for High Availability Solutions

不再让梦枯萎 2024-08-11 12:01:30

这通常在负载均衡器或服务器级别处理。这不是您通常在客户端代码中执行的操作。

通常,您会使用多个服务器,每个服务器都有自己的 IP + 在所有服务器之间共享一个 IP。此外,它们通过 TCP 相互通信以获得心跳,以了解主动/被动集群中哪个是主动节点。

我无法判断您拥有什么类型的服务器,但大多数 Windows 服务器都可以本机执行此操作。

您可以考虑在 serverfault 上提出问题,以了解如何正确配置您的服务器以支持此功能。

This is usually handled at either the load balancer or the server level. This isn't something you normally do in code at the client.

Typically, you multihome the servers each having their own IP + one that is shared between all of them. Further, they communicate with each other over tcp for the heartbeat to know which is the Active node in an Active / Passive cluster.

I can't tell what type of servers you have, but most of the windows servers can do this natively.

You might consider asking the question at serverfault to see how to properly configure your servers to support this.

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