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

DNS and failure tolerance strategies for load balancers

· 52CE 我爱测

I'm trying to educate myself about how to build a highly available load balancing service for application servers for e.g. HTTP traffic and how they work with DNS servers. Consider the following diagram. My understanding is that …

问题原文

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

I'm trying to educate myself about how to build a highly available load balancing service for application servers for e.g. HTTP traffic and how they work with DNS servers.

Consider the following diagram. My understanding is that load balancers (e.g. HAProxy) can be configured to designate a primary server and a fall-back strategy to a secondary (that becomes the new primary) if the primary fails.

  • Wouldn't that require the DNS server to know of or elect a primary LB server?
  • Aren't DNS servers sometimes outside of the data center (or outside of direct control) of the company or organization that manages the load balancers themselves? If so, how do they specify in the DNS servers what LB server to hit?

已采纳解答

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

You have identified the problem of creating redundant backend servers to a load balancer (or reverse proxy), only to find that the load balancer itself becomes a single point of failure.

This is usually solved by having two or more load balancer units share a common ip address, aka floating ip address, thereby creating a load balancing cluster.

The DNS entry will specify this floating ip address only, and let the load balancing cluster figure out which load balancing unit recieves which incoming request. Therefore DNS servers commonly do not require knowledge of primary and fallback members within the load balancer group.

Different implementations exist making possible both active/passive designs where only one cluster node is reachable through the floating ip address at any one time, and active/active designs where all cluster units are reachable through the floating ip address at the same time.

A multitude of cluster protocols and applications exist, see for example vrrp, hsrp, glbp. Knowing the terminology, finding more alternatives is a trivial task.

haproxy can be deployed in a number of ways to achieve a clustered functionality and solutions are easily searched for, see for instance here, and here.

There are other approaches. See for instance DNS Load Balancing with Round Robin and DNS Geolocation routing.

Yes, it is true that the DNS service may be hosted externally to the organisation hosting the load balancer. This usually only affects lead times for changes, but not the load balancer cluster functionality itself (caveat: specialized solutions).

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

资料来源与适用范围

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

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

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