Share via

IP Address of VMSS instances thorugh self deployed website on instance 1 ?

Muhammad Farrukh 116 Reputation points
2022-12-13T06:35:53.243+00:00

Is there a way for an instance in a Virtual Machine Scale Set to discover the other instances (private IP addresses) within the same Scale Set? The VMSS is set to auto-scale, so other instances may come and go at any time. Suppose I have deployed an application in my first instance that tells the private and public IP of that instance. When there is auto-scaling the instances would also increases. So when we run the application it always tells the ip of first instance where application was deployed. What would the procedure to know the IP of that instance where request is being served. Suppose 3 instances are created and now user request the application it should tells me the IP address of that particular instance like first time it says IP of instance A next time when there were three instances due to autoscaling it should tell me the IP of third instance where request is served? Do anyone have solution to this ?

I deployed application to instance 1 which gives me IP. This public IP is mapped with some DNS. When three instances were created and I tried that website it still gives me same instance 1 IP.

Azure Virtual Machine Scale Sets
Azure Virtual Machine Scale Sets

Azure compute resources that are used to create and manage groups of heterogeneous load-balanced virtual machines.

0 comments No comments
{count} votes

Answer accepted by question author
  1. JimmySalian-2011 45,231 Reputation points
    2022-12-13T06:40:04.693+00:00

    Hi,

    I think you will need Public IP addresses for each VM if you want it to divert the traffic on other VMSS instances, check this page and detailed recommendations on the options you can try. However the LB will always takecare of the backend servers when they are scaled so not sure what is your requirements on this.

    Read about Multiple NICs and Public IP addresses assignment.
    virtual-machine-scale-sets-networking

    Hope this helps.
    JS

    ==
    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

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.