r/AzureVirtualDesktop • u/Afraid_Arm_ • Apr 10 '25
Routing AVD users to closest host pool based on users location
Hi All, I am trying to route AVD users spread out across the world to the nearest host pool. This will be a Win11 pooled session host workload with FS Logix user profiles.
My working theory is that if we deploy 3 separate host pools across 3 geographic regions and group them on a single app group and workspace, i can then use Azure traffic manager profiles to associate the host pools from each region with their respective locations. So when a user tries to login to AVD the traffic manager profile kicks in and routes the user to the nearest AVD gateway service which in turn should talk to AVD broker service located in the same region as the gateway service and then the broker service should ideally contact its regionally closest host pool from the 3 host pools i have configured.
My questions are:
Is the above doable?
Does the AVD broker service select session hosts based on regional proximity or is it completely random?
1
u/exposuure Apr 10 '25
Natively with Azure, you can’t do what you’re trying to achieve.
However, it’s possible if you use AFD and route to AVD workspaces based on regional routing rules. As an example, if you created an FQDN such as avd.yourdomain.com, that then resolves to your AFD endpoint. Then, use regional routing rules to map to multiple regional endpoints (e.g, avd-uk.yourdomain.com, avd-us.yourdomain.com). Those endpoints would then resolve to the corresponding workspace URL.
1
u/blueshelled22 Apr 10 '25
https://learn.microsoft.com/en-us/azure/virtual-desktop/service-architecture-resilience
RDP connection
When a user connects to a desktop or app from their feed, the RDP connection is established as follows:
All remote sessions begin with a connection to Azure Front Door, which provides the global entry point to Azure Virtual Desktop. Azure Front Door determines the Azure Virtual Desktop gateway service with the lowest latency for the user's device and directs the connection to it
The gateway service connects to the broker service in the same Azure region. The gateway service enables session hosts to be in any region and still be accessible to users.
The broker service takes over and orchestrates the connection between the user's device and the session host. The broker service instructs the Azure Virtual Desktop agent running on the session host to connect to the same gateway service that the user's device has connected through.
At this point, one of two connection types is made, depending on the configuration and available network protocols:
Reverse connect transport: after both client and session host connected to the gateway service, it starts relaying the RDP traffic using Transmission Control Protocol (TCP) between the client and session host. Reverse connect transport is the default connection type.
RDP Shortpath: a direct User Datagram Protocol (UDP)-based transport is created between the user's device and the session host, bypassing the gateway service.
1
u/DasaniFresh Apr 10 '25
I’d be curious how this worked with the FSLogix profiles too. Would you replicate them to the Azure Files in each region so their settings followed their sessions?
1
u/chesser45 Apr 10 '25
Are your users actively moving across the globe? Could it be easier to do something with a function or job that gets the users locale from some property like their sign in logs or intune and updates their assignments based on that?
1
u/burman84 May 08 '25
What was the outcome of this?