Azure load balancer overview
Features of Azure Load Balancer:
1. Instantly add scale to your applications
2. Load balance Internet and private network traffic
3. Improve application reliability via health checks
4. Flexible NAT rules for better security
5. Directly integrated into virtual machines and cloud services
6. Native IPv6 support
The distribution algorithm used is a 5 tuple (source IP, source port, destination IP, destination port, protocol type) hash to map traffic to available servers. It provides stickiness only within a transport session.
With built-in load balancing for cloud services and virtual machines highly available and scalable applications can be created in minutes.Azure Load Balancing supports TCP/UDP based protocols such as HTTP,HTTPS,SMTP and also protocols for real time voice and video messaging applications.Load Balancer automatically scales with increasing application traffic and there is no need to reconfigure and manage the load balancer to provide the applications a better customer experience.
Latest update on Azure Load Balancer:
The Azure Load balancer now configures TCP idle timeout for cloud services and virtual machines,and uses Service Management API,PowerShell or service model for this purpose.Azure Load balancer in its default configuration has an idle timeout of 4 minutes which implies that if the period of inactivity on http or tcp sessions for more than the default timeout value(4 mints),the connection maintained between the client and the server is not guaranteeed.When the connection gets closed the client application receives errors like "Connection closed!!"A common practice to keep the connection active for a longer period is to use TCP Keep-alive this means that packets are sent when no activity is detected on the connection. By keeping on-going network activity, the idle timeout value is never hit and the connection is maintained for a longer period.TCP Keep-alive works well for scenarios where battery is not a constraint, it is generally not a valid option for mobile applications. CP Keep-alive from a mobile application will likely drain the device battery faster. To support such scenarios, we have added support for a configurable idle timeout. You can now set it for a duration between 4 and 30 minutes.Configure TCP timeout to an endpoint on a Virtual Machine via PowerShell or Service Management API configures TCP timeout for your Load-Balanced Endpoint Sets via PowerShell or Service Management API.Example : Set-AzurePublicIP –PublicIPName webip –VM MyVM -IdleTimeoutInMinutes 15.
Creating a Load balancer using CIL2.0 :
az group create --name myResourceGroupLoadBalancer --location eastus
Create a public IP address
az network public-ip create \--resource-group myResourceGroupLoadBalancer \--name myPublicIP