0
votes

We are planning to have a web app hosted in 2 web servers in 2 different azure regions and I am planning to use either traffic manager or Azure front door for load balancing.

We want to distribute traffic based on priority so if app at one region goes down, LB can shift to other instance.

Suppose I have one instance hosted in Central US and other in Europe and using Traffic manager or Front door in India region.

I want to set Central Us instance as primary and Europe as Secondary, So LB can route traffic to Central Us and fail over to Europe in disaster.

What happens when user gets connected to Central Us region and it goes down, how does load balancer handle the session management? is it handled by load balancer automatically or any configuration needed for the same? I do not want to go with Azure front door Sticky sessions as I want to use Priority based routing. As traffic manager acts at DNS level, can I use it for my use case?

1

1 Answers

0
votes

Yes, the Priority traffic-routing method of Azure traffic manager is exactly doing the trick in your scenario.

Select Priority when you want to use a primary service endpoint for all traffic, and provide backups in case the primary or the backup endpoints are unavailable.

By default, Traffic Manager sends all traffic to the primary (highest-priority) endpoint. If the primary endpoint is not available, Traffic Manager routes the traffic to the second endpoint. If both the primary and secondary endpoints are not available, the traffic goes to the third, and so on. Availability of the endpoint is based on the configured status (enabled or disabled) and the ongoing endpoint monitoring.

Reference: Tutorial: Configure priority traffic routing method in Traffic Manager

Update


Since Azure TM works at the DNS layer, it has no way to track individual clients, and cannot implement 'sticky' sessions. If you still persist to use it for sticky sessions, you need to have an extra configuration on your web apps.

So, in this case, the Azure front door is a better-recommended method for Sticky sessions and it also supports Priority-based traffic-routing.

Each backend in your backend pool of the Front Door configuration has a property called 'Priority', which can be a number between 1 and 5. With Azure Front Door, you configure the backend priority explicitly using this property for each backend. This property is a value between 1 and 5. Lower values represent a higher priority. Backends can share priority values.

When you add a backend web app in the backend pool, you just need to specify the priority in the Azure front door UI.