0

we have two VM (classic) in an availability set and via end points defined load balancer on port 80.

Each VM has 5 websites running and the load balancer distributes calls between server 1 and server 2

When I call one of the websites, e.g. www.mysite.com is it possible somehow to identify which server has served the request?

Is it possible to force load balancer to ping a specific server? This can be super useful when we deploy a new version of the website e.g. on Server 1 and we want to test does it work on Server 1

thanks

James
  • 213
  • 1
  • 13

2 Answers2

2

I would include an header "Server :" in my response : rfc2616-sec14.. Then you are able to check it via Chrome Developer Tools (Network) or any other similar tool.

opHASnoNAME
  • 20,224
  • 26
  • 98
  • 143
0

At the end, I've figured out how this can be done. Hopefully, my answer will be useful to someone with a similar problem

-Identifying servers, as ArneRie has suggested, can be done by adding a custom HTTP header response - https://technet.microsoft.com/en-us/library/cc753133(v=ws.10).aspx

Call specific server

  1. In the Azure portal create a new endpoint, e.g. 802 ->8181.
  2. RDC to the server open port 8181
  3. Install port forwarding utility https://sourceforge.net/projects/pjs-passport/
  4. Set a new rule: all traffic coming from 8181 should be redirected to 80 (as the source port use internal server IP)
  5. Call www.mysite.com:802 and it will be served from the specific server
  6. Repeat steps 1-4 with another server just use a different port e.g. 801, 803...
James
  • 213
  • 1
  • 13