Forum Discussion
Availability zone with same IP address
pazdedav Hi David. Thanks for the explanation. Are there any chances that I can provision 2 new VM within AZ with the same IP address? I have this question coming because based on my testing, the only configuration that I can configure the AZ to 1 or 2 or 3 zones which I can't technically configure to edit the IP address.
The only my understanding now is when I spawn a new VM in one region, I can select how many AZ (1, 2 or 3). My objective is simple, I have one application where I want to make it redundant for HA.
Traditionally, for HA, I need to spawn 2 VMs with a different IP address in the separate data centre and configure it for HA.
Hi ariffisariff ,
If your goal is to make your application redundant, then using availability zones (or availability sets) is the right approach, but instead of trying to assign the same IP address to both machines (which is not technically possible, if they both are in the same VNet), you would typically have a load balancer (could be for example an Azure Load Balancer or Application Gateway) with a 'virtual IP address' (also referred to as 'fronted IP') and configure your clients to communicate with the VIP, rather than internal IPs of your VMs. Then you can configure your load balancer to distribute network traffic to your VMs (backend pool) based on rules and health of your backend pool (using probes).
Check this overview to learn more: https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-overview
This guide explains how to distribute traffic to VMs in different zones: https://docs.microsoft.com/en-us/azure/load-balancer/tutorial-load-balancer-standard-public-zone-redundant-portal