Do my Windows Azure application have its own IP-address?

已答覆 Do my Windows Azure application have its own IP-address?

  • jueves, 09 de diciembre de 2010 11:01
     
     

    I apologize if this is documented somewhere, I'm quite new to MSDN and its structure.

    Using Worker Roles and the TCP endpoint one can listen to arbitrary ports and use the connections for anything you like. Nowhere is it said that you should specify any specific data in the TCP stream to notify the load balancer where the connection should be directed to. This makes me believe that every Windows Azure application will be given a unique IP-address.

    Is this correct? I haven't seen anyone confirm this, but I can't understand how TCP endpoints would work otherwise.

    If it is correct, how long will my application keep the address?

Todas las respuestas

  • jueves, 09 de diciembre de 2010 11:55
     
     

    The TCP endpoint is the public facing port not the internal port/address of your worker role instance.

    This blog contains a picture that show how it works: http://blog.maartenballiauw.be/post/2010/01/17/Creating-an-external-facing-Azure-Worker-Role-endpoint.aspx

    What do you mean when you say "Windows Azure application"? A single role instance or the application as a whole (1+ roles with 1+ instances)?

    Regards,

    Valery


    The sky has no limits.
  • jueves, 09 de diciembre de 2010 13:09
     
     

    With "Windows Azure application" I mean everything as a whole. When someone tries to connect to the IP of "myapp.cloudapp.net" the load balancer will redirect the request to my application and the corresponding role/instance.

    If it was just HTTP-requests, then every application could share the same IP since the load balancer could look in the HTTP-header which application was requested. For TCP-connections that lookup won't be possible since the only destination mentioned is the IP and port.

    To be able to get an unique combination of IP-address and public facing port, there is no way that multiple different applications share the same IP (if they would, then there would have to be restrictions on which public facing endpoint ports you specified).

    I read that article you referenced and it explains it as I believed, but it still doesn't really answer my question about IP-address assignments.

     

    I think it works as I believe it does (unique IP-address for every application), but I get confused since no documentation say it explicitly.

    Thanks

  • jueves, 09 de diciembre de 2010 13:22
     
     Respondida

    Hi Thomas,

    Every CloudService project (= deployment) gets it's own public ip-address. This is a Hosted Service in the portal. Every Role InputEndpoint listens on a different port number, but on the public ip-address of the Hosted Service. The loadbalancer of a Role distributes the load to the private ip-addresses of the different Role instances.

    So, "myapp.cloudapp.net" translates to one ip-address which is the ip-address of your Hosted Service. When you request http://myapp.cloudapp.net you implicitly request http://myapp.cloudapp.net:80. Your Hosted Service will redirect the request to the Role in your Hosted Service that listens on port 80. Any other Roles will have to listen on other portnumber and you'd have to specify the portnumber in your request (e.g. http://myapp.cloudapp.net:8080). Next your request is received by the loadbalancer of that Role at it will be redirected to the next Role instance in line in a round-robin fashion.

     

     


    With regards,

    Patriek
    If this reply is of help to you, please don't forget to mark it as an answer.
    • Marcado como respuesta Tomas Alaeus jueves, 09 de diciembre de 2010 14:21
    •  
  • jueves, 09 de diciembre de 2010 14:21
     
     
    Ok, so it was as I guessed. Thanks for confirming. :)