大网数据广告活动
服务器运维问答

Google Cloud Load Balancer- Active/Standby (Active/Passive) decisions possible?

· 52CE 我爱测

I'm trying to create an active/passive cluster in GCP, and I'm looking at using the native load balancer to achieve this. For example, I want the load balancer to only forward traffic to a particular set of nodes (the standby nod…

问题原文

原帖链接 · treetop · CC BY-SA 4.0

I'm trying to create an active/passive cluster in GCP, and I'm looking at using the native load balancer to achieve this. For example, I want the load balancer to only forward traffic to a particular set of nodes (the standby nodes) only if the main set of nodes (the active nodes) fails the health check. I would have thought this would be possible, but I can't see any option which would allow me to achieve this. From what I can tell, only round robin load balancing is possible, or am I missing something?

已采纳解答

原帖链接 · Daniel t. · CC BY-SA 4.0

Round robin load-balancing is used only for compute instances with in the same Managed Instance Group(MIG). If you want to have control over balancing modes, you need to put the active and passive nodes in separate nodes and regions/zones. Again, why bother with activie/passive nodes, when you can make your active nodes highly available by deploying them across multiple zones and regions? The GLB will pick the healthy active nodes.

If you think you still need active/passive nodes, as far as I know, GCP doesn't provide the exact feature you are asking, but I think you might get close by tweaking the balancingMode and capacity setting property of the GLB backend services resource. For instance, you can set the cpu utilization and capacity of standby nodes to almost zero(but not zero) and set it to 100% on active nodes. This way, the load balancer will send all or most of traffic to active nodes, only when active nodes fail, it will route traffic to passive nodes. Since GLB is also geo-based, you might put your active nodes in a MIG closer to the clients.

Reference - Google global HTTP load balancer documentation

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-07-20)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。