Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Directly accessing Azure workers; bypassing the load balancer

Typically, access to Azure workers is done via endpoints that are defined in the service definition. These endpoints, which must be TCP or HTTP(S), are passed through a load balancer and then connected to the actual IP/port of the Azure machines.

My application would benefit dramatically from the use of UDP, as I'm connecting from cellular devices where bytes are counted for billing and the overhead of SYN/ACK/FIN dwarfs the 8 byte packets I'm sending. I've even considered putting my data directly into ICMP message headers. However, none of this is supported by the load balancer.

I know that you can enable ping on Azure virtual machines and then ping them -- http://weblogs.thinktecture.com/cweyer/2010/12/enabling-ping-aka-icmp-on-windows-azure-roles.html.

Is there anything preventing me from using a TCP-based service (exposed through the load balancer) that would simply hand out an IP address and port of an Azure VM address, and then have the application communicate directly to that worker? (I'll have to handle load balancing myself.) If the worker gets shut down or moved, my application will be smart enough to reconnect to the TCP endpoint and ask for a new place to send data.

Does this concept work, or is there something in place to prevent this sort of direct access?

like image 860
David Pfeffer Avatar asked Apr 18 '11 12:04

David Pfeffer


People also ask

What are the most common symptoms when load balancer connectivity is unavailable?

When the Load Balancer connectivity is unavailable, the most common symptoms are as follows: VMs behind the Load Balancer aren't responding to health probes. VMs behind the Load Balancer aren't responding to the traffic on the configured port.

Why do we need load balancer in Azure?

Why use Azure Load Balancer? With Azure Load Balancer, you can scale your applications and create highly available services. Load balancer supports both inbound and outbound scenarios. Load balancer provides low latency and high throughput, and scales up to millions of flows for all TCP and UDP applications.

Does Azure App Service need load balancing?

IaaS applications require internal load balancing within a virtual network, using Azure Load Balancer.

Can you ping Azure load balancer?

Can I ping a cloud service? No, not by using the normal "ping"/ICMP protocol. The ICMP protocol is not permitted through the Azure load balancer. To test connectivity, we recommend that you do a port ping.


1 Answers

You'd have to run your own router which exposes an input (external) endpoint and then routes to an internal endpoint of your service, either on the same role or a different one (this is actually how Remote Desktop works). You can't directly connect to a specific instance by choice.

There's a 2-part blog series by Benjamin Guinebertière that describes IIS Application Request Routing to provide sticky sessions (part 1, part 2). This might be a good starting point.

Ryan Dunn also talked about http session routing on the Cloud Cover Show, along with a follow-up blog post.

I realize these two examples aren't exactly what you're doing, as they're routing http, but they share a similar premise.

like image 135
David Makogon Avatar answered Oct 13 '22 16:10

David Makogon