Azure 负载均衡器浮动 IP 配置Azure Load Balancer Floating IP configuration

负载均衡器针对 UDP 和 TCP 应用程序提供了多种功能。Load balancer provides several capabilities for both UDP and TCP applications.

浮动 IPFloating IP

在某些应用程序场景中,后端池中单个 VM 上的多个应用程序实例更需要或要求使用相同端口。Some application scenarios prefer or require the same port to be used by multiple application instances on a single VM in the backend pool. 重复使用端口的常见示例包括提供高可用性群集、网络虚拟设备,以及公开多个不重新加密的 TLS 终结点。Common examples of port reuse include clustering for high availability, network virtual appliances, and exposing multiple TLS endpoints without re-encryption. 如果想要在多个规则中重复使用后端端口,必须在规则定义中启用浮动 IP。If you want to reuse the backend port across multiple rules, you must enable Floating IP in the rule definition.

“浮动 IP”是 Azure 的术语,表示是所谓的直接服务器返回 (DSR) 的一部分。Floating IP is Azure's terminology for a portion of what is known as Direct Server Return (DSR). DSR 由两个部分组成:DSR consists of two parts:

  • 流拓扑Flow topology
  • IP 地址映射方案An IP address mapping scheme

在平台级别,Azure 负载均衡器始终在 DSR 流拓扑中运行,无论是否已启用浮动 IP。At a platform level, Azure Load Balancer always operates in a DSR flow topology regardless of whether Floating IP is enabled or not. 这意味着,流的出站部分始终正确重写为直接流回到来源。This means that the outbound part of a flow is always correctly rewritten to flow directly back to the origin. 如果不使用浮动 IP,则 Azure 将公开传统的负载均衡 IP 地址映射方案以便于使用(VM 实例的 IP)。Without Floating IP, Azure exposes a traditional load balancing IP address mapping scheme for ease of use (the VM instances' IP). 启用浮动 IP 会更改负载均衡器前端 IP 的 IP 地址映射,以实现更大的灵活性。Enabling Floating IP changes the IP address mapping to the Frontend IP of the load Balancer to allow for additional flexibility. 此处了解更多信息。Learn more here.


  • 对于负载均衡方案,辅助 IP 配置当前不支持浮动 IPFloating IP is not currently supported on secondary IP configurations for Load Balancing scenarios

后续步骤Next steps