浮动多个虚拟机的本地IP

发布于 2025-01-29 15:31:47 字数 246 浏览 4 评论 0原文

在Google Cloud平台上,我需要创建两台将充当主服务器和复制服务器(作为数据库)的虚拟机。

碰巧我将有几个应用程序连接到主服务器,这要求我在这些应用程序中定义此主机的本地网络IP(VPC)。

当主机甚至紧急/维护重新启动时发生故障时,我的问题就会发生。这种类型的操作将要求我紧急更改所有应用程序,以使用复制机的VPC IP而不是主要的IP。

有什么办法可以让一个可以致力于连接到主机的IP,但是在必要时,将其目的地更改为复制机?

On Google Cloud Platform I need to create two virtual machines that will act as the main server and replication server (as a database).

It happens that I will have several applications that will connect to the main server, which requires me to define in these applications the local network IP (VPC) of this main machine.

My problem occurs when there is some failure on the main machine or even an emergency/maintenance reboot. This type of operation will require me to urgently change all applications to use the replication machine's VPC IP instead of the main one.

Is there any way I can have one IP that can be dedicated to connect to the main machine, but when necessary, change its destination to be the replication machine?

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

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

发布评论

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

评论(1

痴梦一场 2025-02-05 15:31:47

取而代之的是使用内部L7 load Balancer 。请参阅比较以确定是否合适。此 pdf =“ https://www.envoyproxy.io/docs/envoy/v1.22.0/” rel =“ nofollow noreferrer”> EnvoyProxy.io 是负载平衡器。
仙女座甚至实现了循环的罗宾,但对于NIC而不是IP。

另请参见:“ nofollow noreferrer>”计算引擎

Instead use an internal L7 load balancer. See the comparision in order to decide if this is suitable. This PDF explains the stack - and envoyproxy.io is the load balancer.
Andromeda even implements round robin, but for NIC instead of IP.

Also see: Patterns for using floating IP addresses in Compute Engine

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