Health probe says the endpoints (Azure Container Instances) are degraded - azure

I have set up a health probe to ping Azure Containers from my load balancer so that requests are forwarded to only healthy nodes. However, I am getting "Degraded" status despite the containers being up and running. I am aware this has got to do with the reponse the health probe gets from the IP Address but I cannot figure out what changes do I need to make to my container settings to ensure that it works as expected

For Azure load balancer backend pool management, there are two ways of configuring a backend pool:
Network Interface Card (NIC)
Combination of IP address and Virtual Network (VNET) Resource ID
You could deploy your ACI into a VNet then add the IP address in the backend pool, then you can deploy load balancer rules and health probe for your backend ports. You could configure the appropriate health probe type for your backends. Read Load Balancer health probes
For example, I have an application that exposes port 8000 within the container in a VNet.
Load balancer rule
Health probe

Related

Azure load balancer inside a subnet VPN gateway

I have two virtual machines in azure VNet (IP adresses 10.1.0.4 and 10.1.0.5), and one machine connected to VNet via VPN Gateway (IP 10.3.0.2). Is is possible to create a load balancing in internal load balancer to redirect UPD traffic to VPN connected machine?
Azure Load Balancer supports virtual machines or virtual machine scale sets as it's backend pool endpoints along with addition of instances via network interface or IP addresses. However, a backend pool configured by IP address has the following limitation:
The backend resources must be in the same virtual network as the load balancer.
Reference : https://learn.microsoft.com/en-us/azure/load-balancer/backend-pool-management#limitations
So, you cannot add a VPN connected on-premise machine in the backend pool of the load balancer. There is an active feature request for this and it is under review by the load balancer product group team. You can upvote this feature request in the below forum for future improvements:
https://feedback.azure.com/d365community/idea/49c222f6-8726-ec11-b6e6-000d3a4f0789

Azure Public Load Balancer cannot access to backend pool VMs

I'm facing the Azure Public Load Balancer issue, cannot access the load balancer public IP use by port 80 but I can access to backend pool VM's port 80.
My Azure Public Load Balancer setting all following the Microsoft Azure Documentation.
The Backend Pool VMs also can access port 80 by VMs public IP.
There any troubleshoot for this situation?
Thanks.
If you are unable to connect to your VMs via the load balancer front end IP / port, it is usually an issue with your LB configuration, backend health, or a firewall / NSG blocking the connection.
Please refer the below troubleshooting docs to go through your configuration:
https://learn.microsoft.com/en-us/azure/load-balancer/load-balancer-troubleshoot-backend-traffic
Your LB configuration will be setup using the Load Balancing Rules of your load balancer.
Azure Load Balancer will not route traffic to backends that are not reporting healthy via the Health Probes, so make sure your backend is healthy.
A Firewall or NSG can also block the connection, so make sure there are no firewalls in your environment/OS firewalls that block the traffic, and check your Network Security Groups (NSGs) on your Subnet / NICs of the VM are not blocking the load balancing probes (AllowAzureLoadBalancerInBound rule).
You can also run the automated troubleshooter for specific issues on your load balancer from the "Diagnose and solve problems" tab of your load balancer resource in Azure portal as shown in the below picture:

Azure Load Balancer to balance the load between multiple ports but in same VM (Backend Pool)

I have having a hard time find a solution for this.
I have an Azure Internal Load Balancer (level 4). And I have ONLY one Virtual Machine act as the backend pool for the said Load Balancer.
And fun part starts here, I have multiple Docker containers running on that Virtual Machine. Running Nginx Web servers on ports 8080 and 8081.
And now I want to balance the load between these two ports. Literally what I want is something like below in the photo:
So according to the photo, the request comes from abc.xyz.com and it should hit the Load Balancer, and then it should route the traffic to the only VM running multiple docker containers in multiple ports.
How can I achieve this behavior?
I have already setup A frontend configuration with private ip, a rule, backend pool
As per this article(https://learn.microsoft.com/en-us/azure/container-instances/container-instances-virtual-network-concepts#unsupported-networking-scenarios), placing an Azure Load Balancer in front of container instances in a networked container group is not supported and similarly it is not possible to route the traffic on containers to their specific ports running on a single Virtual Machine. The above solution works on VM level not on container level.
The only workaround for this scenario would be to use Azure Application gateway as Microservice architecture is supported on App gateway. To probe on different ports, you need to configure multiple HTTP settings. Reference:
https://learn.microsoft.com/en-us/azure/application-gateway/application-gateway-faq#can-one-backend-pool-serve-many-applications-on-different-ports
Azure Application Gateway is a web traffic load balancer that enables you to manage traffic to your web applications. And you can create an internal application gateway. To do that you can create an Application Gateway with both public and private frontend IP address and do not create any listeners for the public frontend IP address. Application Gateway will not listen to any traffic on the public IP address if no listeners are created for it.
Reference: https://learn.microsoft.com/en-us/azure/application-gateway/configuration-front-end-ip ,
https://learn.microsoft.com/en-us/azure/application-gateway/application-gateway-faq#how-do-i-use-application-gateway-v2-with-only-private-frontend-ip-address

How to ping the load balancer ip address from Virtual machine in azure

I have created a internal load balancer in azure and backend pool configured two vm's health probe and rule also configured, If I browse the Load balance ip it work fine but while i'm checking the ping request from the VM to Load balancer it shows time out error. Is it possible to make a successful ping request.
Regular icmp traffic is not allowed on Azure load balancers, you should either try a port ping (psping), telnet, nmap, nc, or other utilities to check E2E connectivity.
Some extra details here:
https://social.msdn.microsoft.com/forums/azure/en-US/e9e53e84-a978-46f5-a657-f31da7e4bbe1/icmp-outbound-ping-on-azure-vm
Not only ICMP, any traffic from backend VM to frontend IP of internal load balancer will not work. This is one of the limitation of azure internal load balancer.
Bhuvanesh Kumar Kumaresan, Cloud Solution Architect

Azure load balancer inside a subnet

I have a VNET with a subnet, there are 3 VMs in the subnet, the VNET is connected via a VPN connection to an on-premises server. The on-premises server will send requests to an internal IP of the subnet.
What I'd like to do is host a load balancer with no public IP, but has an IP in the subnet range. The on-premises app would then talk to the single load balancer, which would in turn forward the request on to any of the servers hosting my app in the subnet.
Can anyone tell me if this is possible, or an alternative if possible.
I believe you are looking for an internal load balancer.
You can find documentation for that here: https://learn.microsoft.com/en-us/azure/load-balancer/load-balancer-get-started-ilb-arm-portal.
Azure Internal Load Balancer (ILB) provides network load balancing between virtual machines that reside inside a cloud service or a virtual network with a regional scope.
Create a Load Balancer as usual, but specify Type: Internal.
Probably best to make it use a static IP address as well so it won't change.
Then you'll need to configure its back-end pool and health probe so it knows where to route traffic.

Resources