Microsoft Azure (AZ-104): Load Balancer

goay xuan hui
2 min readJun 13, 2021

Types of Load Balancers

Standard Load Balancer:

  • Supports up to 1000 instances.
  • Backup pool endpoints could be any virtual machines or virtual machine scale sets in a single virtual network.

Basic Load Balancer:

  • Supports up to 300 instances.
  • Virtual machines in a single available set or virtual machine scale set.

Forward Traffic to Specific Port at Backend

NAPT-en — Port forwarding — Wikipedia

This can be done by creating an inbound NAT port-forwarding rule:

  • Name: Type MyNATRuleVM1.
  • Port: Type 4221.
  • Target virtual machine: Select MyVM1 from the drop-down.
  • Network IP Configuration: Select ipconfig1 from the drop-down.
  • Port mapping: Select Custom.
  • Target port: Type 3389.

Alternative to Load Balancer

Traditional load balancers operate at the transport later and route traffic based on source IP address and port to destination IP address and port.

Azure Application Gateway can make routing decisions based on additional attributes of an HTTP request.

For example, you can route traffic based on incoming URL. If /images is in the incoming URL, you can route traffic to a specific set of servers configured for images.

IMPORTANT!!!

  • If we have separate virtual machines which are not part of an availability set and we want to load balance the traffic, we need to create a standard load balancer instead of the basic one.
  • To load balance the traffic, the virtual machines have to be in the same virtual network.

--

--

goay xuan hui

A food lover, a cyber security enthusiast, a musician and a traveller, so you will see a mix of different contents in my blog. ☺️