@Patrick Thank you! To do this, you would need a different approach than using a load balancer. I would suggest implementing a BGP based VPN for both Site A and site B and advertising the same prefixes for both sites.
Now, If a site goes offline, ideally the route should be withdrawn from the routing table on the Azure side within a few seconds and the active site should take over. Once the offline site comes back, the routing should go back to the primary site. This can be done by using BGP Parameters such as ASN number, weight etc.,
Here is a document on Azure that talks about the above i.e., Redundancy when using Multiple on-premises VPN devices. Hope this helps.
Please let us know if you have any further questions and we will be glad to assist you further. Thank you!
Remember:
Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
Want a reminder to come back and check responses? Here is how to subscribe to a notification.