Q: What is Connection leasing?
A: It allows users to connect to recently used published applications or desktops (launched within the last 2 weeks or less) during a site database failure using a combination of a license lease and cached information on the Delivery Controllers. The Delivery Controllers record a local cache of applications or desktops the users launch, so if the site database has a failure the Delivery controllers can play back this cache for users when they connect through Citrix Storefront. They can launch applications or desktops as if the site database was still online.
Q: Is it similar to XenApp's Local Host Cache (LHC) ?
A: Think of it as an alternative to XenApp's Local Host Cache (LHC). The new improved architecture that XenApp\XenDesktop 7.6 uses is the Flexible Management Architecture (FMA) which does not utilize a Local Host Cache (LHC). This feature does cache a small amount of information similar to the LHC but the information requires much less disk space and a new table is created in SQL to accommodate this feature called
Chb_State.Leases.
Q: What are the system requirements for this feature?
A: Connection leasing requires the following:
- XenApp\XenDesktop 7.6
- VDA version 7.6
- Delivery Group Level (L7_6)
- Server hosted applications, desktops, and static (pre-assigned) desktops
Q: What features are not supported with Connection leasing?
A: The following features are not supported with Connection leasing:
- VDI pooled desktops
- Workspace control
Q: Are there any components that will not be accessible when running in Connection Leased Mode?
A: Yes.
- Administrators cannot use Citrix Studio, Director, or the PowerShell console while running in Connection Leased mode.
- Citrix Power Management is not available until the site database connection is restored.
Q: How do I enable this feature?
A: This feature is
enabled Site wide by default when installing XenApp\XenDesktop 7.6. This feature can be turned off by running a PowerShell command or through the Windows registry.
Q: How do I disable the Connection leasing feature?
A: The feature as mentioned before is enabled by default so to disable it you need to run the following PowerShell command on each delivery controller in your site.
Set-BrokerSite -ConnectionLeasingEnabled $false(running this command with the $true option enables the feature)
Q: Is this a replacement for High Availability (HA) mode or SQL High Availability (HA) database methods?
A: No, it is not a direct replacement for either of those features it is a compliment to them and should be looked at as a backup to those features.
Q: How does Connection leasing actually work?
A: The Delivery controllers
caches the connections of the applications or desktops users are launching and puts a
lease on this information for
2 weeks so if a database failure occurs any of the applications or desktops the users launched within the past 2 weeks they will be able to continue launching them until site database becomes available. Any applications or desktops they have not accessed within the past 2 weeks or have not accessed before will not be available as the lease will have expired or does not exist. The
Delivery Controllers hold this
cached information and
leases for each user and periodically upload this data to the Site database along with
application, desktop, icon, and worker information. This information is not only uploaded to the site database each Delivery Controller holds a
local copy of this cached information. So when the database is unavailable the Delivery Controllers enters a
Leased Connection Mode and will replay the users cached operations when they connect based off the XML files, the users cache, and lease information.
Q: Where is this information locally stored on the Delivery Controllers?
A: By default this information is cached in 3 folders on the Delivery Controller the default location is
C:\Program Data\Citrix\Broker\Cache
- Desktops
- Leases
- Workers
- Desktop.XML (Used for enumerating the applications or desktops)
- SID.XML (Used for launching the applications or desktops)
Q: When is this information cached for users?
A: This
cache is created for each user the first time a user launches an application or desktop from Citrix StoreFront.
Q: How often is this Cached Data gathered?
A:
- Delivery Controllers check for new leases every 10 seconds and sync that information if a new lease exists.
- New leases are pulled down in batches of 1000 for best performance.
- Leases are kept for 2 weeks (14 days) before being discarded and a new lease started.
Q: When in Connection Lease Mode, VDAs are showing as unregistered, is this normal?
A: Yes, this is expected behavior when running in Connection Lease Mode. Once the Site database becomes available again the Delivery Controllers will automatically re-register.
Q: What are the SQL Database size and Delivery Controller Local Disk requirements to support the Connection Leasing feature?
A: The size requirements are very minimal but should factor in
4kb of data for each users cache locally stored on each Delivery Controller and expect the site database to grow a bit from the new SQL table introduced to support the feature called
Chb_State.Leases.
Q: Is there any error logging for Connection leasing?
A: Yes, the Windows Application event log will provide any events related to the Connection Leasing feature.
Additional Resources
Citrix Documentation - Connection Leasing