Carl Stalhood

Thursday 10 March 2016

How Connection Leasing and LHC Works?

How Connection Leasing and LHC Works? 

After XenApp 6.5, Citrix does not use the IMA data store as the central database to store configuration information. Instead, it uses a Microsoft SQL Server database as the data store for both configuration and session information. Microsoft Access and Oracle are no longer supported. Terminal Services (Remote Desktop Services) is no longer required on servers running the Controller, however Terminal Services Client Access Licenses (TS CALs) are still required. There is no Farm, Zone and dedicated zone master. The Controller is responsible for user connection requests and communication with hypervisors and this function is distributed evenly across all Controllers in the Site.
Citrix Independent Management Architecture, IMA got replaced by Flexcast Management Architecture, or FMA. There are some functionality and features which FMA doesn’t have in XenApp 7.5. Some wonderful and really useful features like Sessions Lingering, Anonymous access, Pre-Launch and some few more were missed. But Citrix has again brought back some of the most popular features of XenApp 6.5, again in its latest XenApp 7.6, and of course not all. In Flexcast Management Architecture (FMA) we should be in a domain to deploy a Site. To install the Citrix servers, we must be a local and Domain Administrator.
The Connection Leasing (CL) feature enhances the SQL Server high availability best practices by enabling users to connect and reconnect to their most recently used applications and desktops, even though the database is not available. Connection leasing is supported for server-hosted applications and desktops, and static (assigned) desktops; it is not supported for pooled VDI desktops. Connection Leasing only caches assigned or personal resources. If you have a desktop assigned to you personally and SQL database goes down, it works as normal. The applications being used on a daily basis will continue to work with CL and the same applies to assigned desktops.
With Connection Leasing enabled and active, load management within the Site may be affected. Server-based connections are routed to the most recently used VDA. Load evaluators may be exceeded. With both FMA and IMA, when the Database is down the Administrator cannot use Citrix Studio to make any configuration changes in the Site.
How Connection Leasing Works?
Connection Leasing supplements SQL high availability. With Connection Leasing enabled, each Controller caches the users’ connections to their recently used applications and or desktops. This is under ‘normal’ circumstances with the SQL database being available. So when the Database is online, Connection Leasing does not help in application enumeration process and creation of new sessions.
The leases generated on each Controller are uploaded to the Site database for periodic synchronization to other Controllers on the Site. The Controller’s cache holds application, desktop, icon, and worker information. The lease and related information is stored on each Controller’s local disk. If the database becomes unavailable, the Controller enters leased connection mode and “replays” the cached operations when a user attempts to connect or reconnect to a recently used application or desktop from StoreFront.
By default connections are cached for a period of 2 weeks. So when the database becomes unavailable, everything that the user has launched within a two week period prior to the time database becoming down will be available from the CL cache and it applies to the server-hosted applications and desktops, and static desktops only. Pre-launch will not work and will affect load-balancing as it does not even require the Controller. It will continue to work indefinitely but Site configuration changes are not possible.
How Local Host Cache Works?
Each XenApp server holds a local copy of the IMA data store. By default, a XenApp server polls the central data store through the local IMA service every 30 minutes and the information is stored into a local (Access) database which is referred to as the Local Host Cache (LHC). When any configuration changes are made within the Farm the Zone Data Collectors will be notified and they update their LHC. Then Collectors will notify their Zone member servers to do the same. So when the IMA Store isn’t reachable, the users can continue to work, logon, logoff etc. Also the server can be rebooted while the IMA store is down and the local IMA service will start from the LHC without any issues. The Local Host Cache stores all the basic information like, published applications and their properties, the Windows network domain trust relationships within the farm, product code and the license information of the Farm.
When the Database is online, the LHC helps in speedup the application enumeration process and creation of new sessions like application availability, zone preference policies and zone fail over policies.
When the Database is offline, the LHC will provide the information about the published application, Workspace control and hosted shared desktops. pre-launch will continue to work and does not affect load-balancing. It will continue to work indefinitely but only that Farm configuration changes are not possible and the administrators won’t be able to start up any management consoles.

No comments:

Post a Comment