Local Host Cache (LHC) | Citrix DaaS

by Uddave Jajoo, Indianapolis CUGC Leader, CTA

With enterprises moving towards cloud, their first strategy would be to deploy solution which will be highly available and resilient. With this recent outage (Networking issues impacting Azure Services in Central US Region), a subset of customers experienced issues with their services and intermittent connection issues.

To overcome outage scenarios like this and to make your business operations highly resilient, Citrix offers two great features allowing users to access their resources from Cloud even if there is an outage reported within those regions.

In this blog post, I describe in detail how these features could benefit customers and why they should be implemented within your Citrix DAAS deployments.

Local Host Cache

Local Host Cache enables brokering of connections in Citrix DaaS (formerly known as Citrix Virtual Apps and Desktop Service) deployment to continue, in case of disconnection to Citrix Cloud Service for more than 60 seconds.
In Citrix DaaS deployment, Local Host Cache is always enabled. You don’t have to do anything else to configure or manage it.

As noted previously, the Microsoft SQL Server Express LocalDB database is installed automatically when you install a Cloud Connector in a resource location. Do not attempt to disable or remove it. Citrix updates the Cloud Connector regularly. If you disable or remove the SQL Server Express LocalDB software manually, the next Cloud Connector update replaces it.

Requirements

  • Local Host Cache requires a customer deployed on-premises Storefront
  • All cloud connectors should be added as a single site within the store as delivery controllers. Refer the blog post for detailed information.
  • StoreFront should be able to communicate with the cloud connectors over port 80/443.
  • StoreFront minimum supported version should be 1912 CU1 and above.
  • Advanced Health Check feature should be enabled on each store.
  • For deployments with no on-premises StoreFront, use the service continuity Citrix workspace platform feature to allow users to connect to resources during outages. For more information, see Service continuity.

During Normal Operations

During an Outage

How to enable Advanced Health Check Feature

To ensure resource availability you could do the following:

1: Ensure resources are published in each resource location
2: Or publish resources to at least one resource location and use the following procedure to enable Advanced Health Check feature in each storefront store:

  1. Upgrade the StoreFront installation in each resource location to minimum version 1912 CU4. For guidance, see the StoreFront documentation.
  2. For each StoreFront store, enable the advanced health check option. In the store’s web.config file, under farmsets, add advancedHealthCheck=”on”.
    Option example:
  1. After you update the file, manually restart IIS. Repeat the web.config file update and IIS restart for other stores.

    Important Note:
    Local Host Cache works only with customer-deployed StoreFront. It does not support workspace.
    Local Host Cache supports server-hosted applications and desktops, and static (assigned) desktops.
    For Pooled delivery groups perform following changes on Delivery group level to enable them to broker connections during outage:

    Per DG
    Set-BrokerDesktopGroup -Name “name” -ReuseMachinesWithoutShutdownInOutage $true
    Per Site
    Set-BrokerSite -DefaultReuseMachinesWithoutShutdownInOutage $true
    Reference – https://support.citrix.com/article/CTX272155/enable-local-host-cache-with-citrix-cloud

Resource Locations with Multiple Cloud Connectors

During an outage mode, if the primary broker fails to connect to the Configuration Sync Service, the election process resumes and secondary broker would be elected amongst the remaining cloud connectors in the resource location.
If an elected secondary broker fails to communicate during an outage, another secondary broker is elected to take over. VDAs would register with the newly secondary elected broker.

What happens if a cloud connector is restarted:

1. If that Cloud Connector is not the elected broker, restart has no impact.
2. If that broker is the elected broker, a different cloud connector will be elected, causing VDAs to register. After restart, it automatically takes over the brokering, which cause VDAs to register again.

Note: Always schedule different maintenance windows on your cloud connectors, refer the deployment guidelines highlighted in this post.

Verify Local Host Cache is Working

Follow through all the requirements mentioned above to verify LHC is functioning as expected. Review all the event logs during synchronization and outage occurrence to get better understanding.

Below are important links to identify what different event logs may be generated during normal and outage mode.
Config Synchronizer Service
High Availability Service Event Logs

You would also want to test the LHC functionality by forcing an outage deliberately in a resource location.

  • To force an outage, edit the registry of each Cloud Connector server. In HKLM\Software\Citrix\DesktopServer\LHC, create and set OutageModeForced as REG_DWORD to 1.

    This setting instructs the Local Host Cache broker to enter outage mode, regardless of the state of the connection to Citrix Cloud.

    Setting the value to 0 takes the Local Host Cache broker out of outage mode.
  • To verify events, monitor the Current_HighAvailabilityService log file in C:\ProgramData\Citrix\workspaceCloud\Logs\Plugins\HighAvailabilityService.
  • Events will be generated under Application logs with source Citrix Remote Broker Provider, confirming the ForcedOutageMode
  • Session Launched successfully in outage mode
  • Delete the registry entry from all the cloud connectors and monitor for the logs in event viewer and High Availability service

Reference Links
https://docs.citrix.com/en-us/citrix-daas/manage-deployment/local-host-cache.html#verify-that-local-host-cache-is-working
https://docs.citrix.com/en-us/citrix-daas/manage-deployment/local-host-cache.html

Leave a Reply