1

I have 2 web servers in a load balanced set (port 80) on the Azure platform. I need to ping a php file on each server which forces them to update, but how can I do this?

Can I access them like this:

http://cloudservice.cloudapp.net:8002

And set an endpoint for 8002 as well as getting Apache to listen for that port?

I tried doing that and I get

Oops! Google Chrome could not connect to cloudservice.cloudapp.net:8002
Adam
  • 349

1 Answers1

1

For a load-balanced endpoint, you cannot use that specific endpoint to reach a specific vm. The load balancer will distribute the calls outside of your control.

You can, however, open additional ports, one per vm, which is a port-forward endpoint. That means it will only go to a specific vm. You could then do something like allocating port 8000 to vm0, 8001 to vm1, etc. Then, for the port mapping, you can map each of these external ports to the same internal port (maybe 8000?). At that point, you set up a listener on port 8000 on each vm, looking for the request for the specific php file.

In essence, you'll end up with two ports open per vm: 80 and 800x (ok, others like ssh/rdp/ssl/etc. but I'm just talking about endpoints you referenced in the question).