0

I have a really simple setup: An azure load balancer for http(s) traffic, two application servers running windows and one database, which also contains session data.

The goal is being able to reboot or update the software on the servers, without a single request being dropped. The problem is that the health probe will do a test every 5 seconds and needs to fail 2 times in a row. This means when I kill the application server, a lot of requests during those 10 seconds will time out. How can I avoid this?

I have already tried running the health probe on a different port, then denying all traffic to the different port, using windows firewall. Load balancer will think the application is down on that node, and therefore no longer send new traffic to that specific node. However... Azure LB does hash-based load balancing. So the traffic which was already going to the now killed node, will keep going there for a few seconds!

Joel'-'
  • 652
  • 1
  • 5
  • 17

1 Answers1

0

First of all, could you give us additional details: is your database load balanced as well ? Are you performing read and write on this database or only read ?

For your information, you have the possibility to change Azure Load Balancer distribution mode, please refer to this article for details: https://learn.microsoft.com/en-us/azure/load-balancer/load-balancer-distribution-mode

I would suggest you to disable the server you are updating at load balancer level. Wait a couple of minutes (depending of your application) before starting your updates. This should "purge" your endpoint. When update is done, update your load balancer again and put back the server in it. Cloud concept is infrastructure as code: this could be easily scripted and included in you deployment / update procedure.

Another solution would be to use Traffic Manager. It could give you additional option to manage your endpoints (It might be a bit oversized for 2 VM / endpoints).

Last solution is to migrate to a PaaS solution where all this kind of features are already available (Deployment Slot).

Hoping this will help.

Best regards

Nicolas
  • 47
  • 3
  • Thank you for your answer. The application uses a r/w database, hosted by Azure. My question was regarding the windows servers which are directly behind the load balancer. Disabling at load balancer level would be possible, but it does not seem like the way to go. Because what if Azure decides to update one of the nodes? Then a few requests would fail. Also I'd like to be able to disable the application from the server and not from the load balancer. – Joel'-' Jan 30 '18 at 15:40
  • Cloud compiting concept is "Infrastructure as Code" so it's legit to perform such maintenance task. From a server perspective I'm not sure you will be able to do it. Anyway you could run or trigger the script to modify the load balancer configuration from your server. – Nicolas Jan 30 '18 at 15:58
  • Regarding node update, anyway if you are updating one of your nodes at an application level it will not be available and therefore you are in the exact same situation. If you need to update your server with No risk, you need 3 nodes. Finally, I would suggest you to look at traffic manager, it have options to temporary disable and endpoint to perform maintenance tasks. – Nicolas Jan 30 '18 at 17:10