Azure Load Balancer Floating IP configuration | Microsoft Learn
Azure Load Balancer Floating IP configuration | Microsoft Learn
In Azure, floating IPs (also known as direct server return or floating IP enabled) are used to enable load balancing scenarios that require the frontend IP address to be directly mapped to the backend virtual machines without address translation. This feature is particularly useful in high availability scenarios, such as clustering, where a specific IP address must float between multiple VMs.
How Floating IP Works in Azure
-
Azure Load Balancer:
- Floating IP is a feature of the Azure Load Balancer. When you configure a load balancer rule, you can enable floating IP for that rule.
- This setting allows the load balancer to forward traffic directly to the backend VMs without modifying the destination IP address, which is essential for certain high availability and clustering configurations.
-
Direct Server Return:
- With floating IP enabled, the load balancer forwards the traffic to the backend VM using the same destination IP address as the frontend IP address.
- This setup allows the backend VM to respond directly to the client, bypassing the load balancer for the return path (hence the term "direct server return").
Here's a more detailed explanation of the differences between using and not using floating IP in Azure Load Balancer configurations:
Without Floating IP (Default Configuration)
Traffic Flow:
- Inbound Traffic: Client traffic reaches the load balancer's frontend IP.
- Load Balancing: The load balancer forwards the traffic to one of the backend VMs, modifying the destination IP to the backend VM's IP address.
- Return Traffic: The backend VM sends the response back to the load balancer, which then forwards it to the client.
Use Case:
- This configuration is suitable for general load balancing scenarios where address translation is acceptable.
- Typical use cases include web servers, application servers, and scenarios where the client does not need to interact directly with the backend VM.
Benefits:
- Simplified setup without special requirements.
- Suitable for applications where the load balancer handles both incoming and outgoing traffic.
Limitations:
- The load balancer remains in the data path for return traffic, potentially introducing additional latency.
- Not suitable for certain high-availability configurations like SQL Server Always On Availability Groups, which require direct server return.
With Floating IP (Direct Server Return)
Traffic Flow:
- Inbound Traffic: Client traffic reaches the load balancer's frontend IP.
- Load Balancing: The load balancer forwards the traffic to one of the backend VMs without modifying the destination IP (the frontend IP is used as the destination IP).
- Return Traffic: The backend VM sends the response directly to the client, bypassing the load balancer.
Use Case:
- Essential for scenarios requiring high availability and failover mechanisms, such as SQL Server Always On Availability Groups, clustering, and certain real-time applications.
- Situations where maintaining the original client-to-frontend IP mapping is necessary for application functionality.
Benefits:
- Reduced latency as the return path bypasses the load balancer.
- Suitable for high-availability configurations requiring direct server return.
Limitations:
- More complex setup and configuration.
- Direct server return might require additional configuration on the backend VMs to handle the direct response traffic properly.
Comparison Summary
Feature/Aspect | Without Floating IP | With Floating IP |
---|---|---|
Destination IP Handling | Load balancer modifies destination IP | Destination IP remains the frontend IP |
Return Traffic Path | Via load balancer | Directly from backend VM to client |
Latency | Potentially higher due to return path | Lower due to direct server return |
Use Cases | General load balancing | High availability, clustering, SQL Server AG |
Complexity | Simpler setup | More complex setup |
Practical Example
Scenario: You have a web application where frontend traffic needs to be load-balanced across multiple web servers (backend VMs).
Without Floating IP:
- Clients send requests to the load balancer's frontend IP.
- The load balancer forwards requests to backend VMs, modifying the destination IP.
- Backend VMs respond to the load balancer, which then forwards responses to clients.
- Suitable for general web applications without special requirements.
With Floating IP:
- Clients send requests to the load balancer's frontend IP.
- The load balancer forwards requests to backend VMs without modifying the destination IP.
- Backend VMs respond directly to clients, bypassing the load balancer.
- Essential for applications like SQL Server Always On Availability Groups, where the floating IP enables seamless failover and high availability.
By understanding these differences, you can choose the appropriate configuration for your specific application needs and ensure optimal performance and availability.
Azure Load Balancer Deep Dive (youtube.com)
31:11介绍floating ip
作者:Chuck Lu GitHub |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
2023-07-11 yihong古诗词 2023年07月
2022-07-11 Determine what is blocking UI thread
2022-07-11 What does SynchronizationContext do?
2022-07-11 When should I use ConfigureAwait(true)?
2021-07-11 TypeScript安装
2019-07-11 How does ASP.NET Forms Authentication really work?
2019-07-11 forms authentication原理