Data transfer between two VMs in the same Virtual Network using public IP, does it cost?

Wang, Ling 1 Reputation point
2020-09-15T03:12:02.683+00:00

Hello,
I have a two VMs in the same virtual network, and I need to do data transfer between these two VMs using public IP, I'd like to know, if there will be a cost.
And later, I will setup a haproxy in my virtual network, then the data transfer between these two VMs using their haproxy endpoint, Will there be a cost?

And one more question, if I have two virtual network, one is in eu10 and another is in us10, I'd like to know how to calculate cost for the data transfer between these two virtual networks? ( still the VMs connect each other using the target haproxy endpoint)

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,470 questions
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,263 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Krish G 2,331 Reputation points
    2020-09-15T14:10:56.773+00:00

    @Wang, Ling ,

    You can go to Azure price calculator and select service and region to estimate costs for any Azure service.

    Virtual Network is free of charge unless you are peering 2 separate virtual networks which is not the case here. If you peer 2 virtual network for example within East US (cost may vary for regions), it is $0.01 per GB both for inbound and outbound. Charge will increase if peering VNETs of 2 different regions. Again, in this case you are not peering, so it is free.

    But, public addresses are charged. Let's say if the region is East US, for dynamic IP, it's $0.004/hour at Basic tier per IP. For static IP, it's higher.

    24855-image.png