How do I set network preference to use ISP when I send and receive data from Azure VM?

Barak Pahima 60 Reputation points
2023-05-17T13:10:52.0633333+00:00

Hi mates,

My services run on Azure Virtual Machine and basically they communicate with different clients outside of Azure cloud (via UDP and TCP). I Created Azure Load Balancer with Public IP and set the relevant rules to make my services accessible from the internet.

Everything works perfectly, and now I need to make some load tests to my services so I wrote some code to simulate a real client.

So as a first step I created multiple Azure Virtual Machine (let's call them clients VMs) and assigned them to the same VNet associated to the VM which run my services, so my simulated clients could communicate with my services.

It works as I expected but now I need to make another test which takes into account also the latency of the ISP.

My real clients will be spread all over the world and they would need to communicate my services which run in Azure.

So I tried to find a way to run my "simulated clients" from azure and make them communicate to my services inside Azure but I need to make sure that the traffic will go outside from Microsoft WAN to the ISP.

I found that I can set in the Public IP resource "Routing preference" to internet but in the docs https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/routing-preference-overview I found this Note:

"Even when using a public IP with routing preference Internet, all traffic that is bound for a destination within Azure continues to use the direct path within the Microsoft Wide Area Network."

There is any solution to make the traffic going through the ISP instead of Microsoft WAN? I want to run this load tests from Azure Virtual Machine and test a real case scenario.

Thank you,

Barak.

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,132 questions
Azure Load Balancer
Azure Load Balancer
An Azure service that delivers high availability and network performance to applications.
399 questions
0 comments No comments
{count} votes

Accepted answer
  1. ChaitanyaNaykodi-MSFT 22,311 Reputation points Microsoft Employee
    2023-05-18T00:54:46.6966667+00:00

    @Barak Pahima

    Welcome to the Microsoft Q&A forum and thank you for posting a detailed question here.

    Since the simulated clients will be present on Azure and will have an Azure public IP assigned to them the traffic will go over Microsoft WAN Network and I do not think there is any option available here to direct the traffic via ISP.

    You will have to generate traffic via a non-azure Public IP and use Routing over public Internet option to simulate the real-life scenario mentioned above.

    Just sharing as an FYI, based on your requirements and services provided. I was wondering if you have considered of implementing a CDN to provide your services across the world. If interested, you can check out the Azure Front Door Service where you can leverage over 118 edge locations across 100 metro cities connected to Azure using a private enterprise-grade WAN and improve latency for apps by up to 3 times.

    If interested, you can also check out Load Testing service in Azure: https://learn.microsoft.com/en-us/azure/load-testing/overview-what-is-azure-load-testing

    Hope this helps! Please let me know if you have any questions. Thank you!


    ​​Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


0 additional answers

Sort by: Most helpful