Product Documentation

Cache Insight

Jun 30, 2016

You can monitor the NetScaler Integrated Caching(IC) using NetScaler Insight Center.  If you have enabled NetScaler integrated caching, you then will have a cache to serve the duplicate user requests more quickly, the integrated cache provides in-memory storage on the Citrix NetScaler appliance and serves Web content to users without requiring a round trip to an origin server. Cache Insight enables you to see and monitor the various actions performed by the NetScaler cache. For example, you can view the cache analytics on the devices, applications, content type, URLs, etc on your Netscaler Cache.

You can find the following metrics details in the NetScaler insight Center:

  • Integrated Cache Utilization. Data, in bytes, sent from the NetScaler cache to serve requests.
  • Integrated Cache Hits. Number of client requests served from the NetScaler cache.
  • Integrated Cache Refreshes. Number of revalidations of cache data during a specified time frame.
  • Integrated Cache Misses (Storable). Number of client requests that could not be served from the cache.
    Note: The response received from the origin server for this requests will be stored in the integrated cache.
  • Integrated Cache Misses (Non- Storable). Number of client requests that could not be served from the cache.
    These requests might be affected by a policy, response size, minimum hits, or so on, specifying not to store the data in the cache.
  • Uncached Resources. Reasons not storing an object in the cache (for example, policy, size of object, cache bypass).

 

Cache Insight Inter-operability

Note

Integrated Cache Metrics are not supported on NetScaler Insight center with NetScaler appliances running on version 10.5 and below.

NetScaler Version NetScaler Insight Center version Supportable Features

11.1

11.1

  • Cache Metrics
  • Web Insight Reports

Below 11.0 66.x (Eg 65.x)

11.1

  • Cache Metrics
  • Web Insight Reports

11.0 66.x

11.1

Web Insight Reports

11.0 66.x

Any version below 11.1

Web Insight Reports

Below 11.0 66.x (Eg 65.x)

Any version below 11.1

                       -NA-

Configuring Cache Insight

Important Notes:

  • You need to install an Integrated Cache(IC) license on the NetScaler appliance before you enable this feature.
  • You need to set a memory limit for the NetScaler cache after enabling the integrated caching.
  • Cache Metrics are displayed as a part of Web Insight reports. You need to enable AppFlow for Web Insight to enable Cache Insight.

When you enable integrated caching, the NetScaler appliance begins caching server responses. If you have not configured any policies or content groups, the built in policies store cached objects in the default content groups. You can configure new policies to allow or restrict objects and object types to cache in NetScaler Integrated Cache.

Install Integrated Cache License

To Install Integrated Cache License by using the command line interface

1. Obtain a license code from Citrix, go to the command line interface, and log in.

2. At the command line interface, copy the license file to the /nsconfig/license folder.

3. Reboot the NetScaler appliance by using the following command:

command Copy

reboot

For information about licenses, see information about obtaining NetScaler licenses at http://support.citrix.com/article/ctx121062.

Enable Integrated Caching

To enable integrated caching by using the command line interface

At the command prompt, type the following command to enable integrated caching:

To enable integrated caching by using the configuration utility

Navigate to Configuration > System > Settings, click Configure Basic Features, and select Integrated Caching.

Enable AppFlow Feature

Note

You can enable the Appflow feature either from NetScaler Insight Center or from the NetScaler appliance.

To enable the AppFlow feature from NetScaler Insight Center

1. On the Configuration tab, click Inventory.

2. From the inventory list, select the IP address of the ADC on which you want to enable data collection.

3. On the NetScaler Insight Center Inventory Setup screen, in the Application List pane, from the View drop-down list, select the type of virtual server (Load Balancing, Cache Redirection, or Content Switching).

4. Select a virtual server for which you want to enable data collection.

Note

You cannot enable data collection on a virtual server if the operational state of the virtual server is other than UP.

5. From the Action drop-down list, select Enable Appflow.

To enable the AppFlow feature from the NetScaler command line

At the command prompt, type:

command Copy

enable ns feature AppFlow 

To enable the AppFlow feature by using the configuration utility

Navigate to Configuration > System > Settings, click Configure Advanced Features and select AppFlow.

Set Memory Limit

To set memory limit by using the command line interface

At the command prompt, type one of the following commands to enable or disable integrated caching:

command Copy

set cache parameter [-memLimit <MBytes>] 

To set memory limit by using the configuration utility

Navigate to Configuration > Optimization > Integrated Caching, click Change Cache Settings, and in the Cache Global Settings set the Memory Usage Limit (MB) field.

localized image

For an overview of enabling the integrated caching on a NetScaler appliance, see Setting Up the Integrated Cache.

Enable Cache Insight Parameter

Note

Enabling cache insight parameter is supported only on CLI.

To enable cache insight parameter

At the command prompt, type one of the following commands to enable or disable integrated caching:

command Copy

appflow param –cacheInsight ENABLED

Configuring a Policy in the Integrated Cache

You can configure new policies in a NetScaler appliance to handle data that the built-in policies cannot process. You configure separate policies for caching, preventing caching from occurring, and for invalidating cached data.

To configure a policy for caching by using the command line interface

At the NetScaler command prompt, type:

command Copy

add cache policy <policyName> -rule <expression> -action CACHE|MAY_CACHE|NOCACHE|MAY_NOCACHE [-storeInGroup <contentGroupName>] [-undefAction NOCACHE|RESET]

Examples:

> add cache policy image_cache -rule "http.req.url.contains(\"jpg\") || http.req.url.contains(\"jpeg\")" -action CACHE -storeingroup myImages_group -undefaction NOCACHE

> add cache policy bugReportPolicy -rule "http.req.url.query.contains(\"IssuePage\")" -action CACHE -storeInGroup bugReportGroup

> add cache policy my_form_policy -rule "http.req.header(\"Host\")contains(\"my.company.com\") && http.req.method.eq(\"GET\") && http.req.url.query.contains(\"v=7\")" -action CACHE -storeInGroup my_form_event

> add cache policy viewproducts_policy –rule "http.req.url.contains(\"viewproducts.aspx\")" –action CACHE -storeInGroup Product_Details

To configure a policy for caching by using the configuration utility

1. In a web browser, type the IP address of the NetScaler appliance (for example, http://192.168.100.1).

2. In the User Name and Password fields, enter the administrator credentials.

3. Navigate to Optimization > Integrated Caching > Policies, and create the new policy.

For an overview of Configuring a Policy in the Integrated Cache, see Configuring a Policy in the Integrated Cache.

Viewing the Integrated Cache Metrics

NetScaler Insight Center cache metrics provide a detailed view of the performance of the NetScaler Integrated Caching. With the help of these metrics, you can analyze and optimize your NetScaler integrated cache and track performance issues.

To monitor Cache Metrics in NetScaler Insight Center

1. On the Dashboard tab, navigate to Web Insight and click the node for which to display the metrics.

2. In the right pane, select a timeframe from the drop-down list. You can further customize the time frame by using the timeframe slider. Click Go.

3. Select the type of metrics you want to see from the drop-down list at the right of the dialog box.
The metrics displays bar graphs, which you can click for details

localized image

Use Cases

Reduction of origin server load

You can reduce the load on your origin server by using integrated caching. The integrated cache provides in-memory storage on the Citrix NetScaler appliance and serves web content to users without requiring a round trip to an origin server. The cache metrics show the number of bytes that the origin servers did not have to process.

The total bytes served by the cache can be calculated by the formula (Bandwidth - Integrated Cache Utilization). You can configure policies to enhance the IC performance.

Improving server time

As a NetScaler administrator monitoring the cached objects through NetScaler Insight Center, if you notice that a large number of requests are served by the backend serves, you can configure a policy to cache frequently requested objects. If a policy is already configured not to cache those objects, you will be notified in the Uncached Details section.

For example, if 25 users request the same object, and the object is cacheable, the first user request is classified as Integrated Cache Miss (Storable), and the object returned in the response is stored in the cache memory. The subsequent requests for the same object are served by the integrated cache. This reduces the origin server’s load by 24 times. It also reduces the response time, because it eliminates 24 round trips to and from the origin server

localized image

Analysis of all types of requests

In various situations, origin-server header values might not allow some otherwise cacheable objects to be cached in the NetScaler Integrated Cache (IC). With strict header checking, any requests for these types of objects become cache misses. Too many cache misses for cacheable data might decrease server performance to the point that the purpose and utility of integrated caching is lost.  

Monitoring how many cacheable requests were cache hits, and observing the content type of cache hits (for example, text file or .js file) can produce a granular analysis that facilitates a solution.

Another possibility is that caching large objects (for example, images larger than 1 MB, or 3.5 MB videos) might consume a large portion of the IC memory, causing numerous requests for smaller cacheable objects to become cache misses. Configuring a policy to not store such objects can reduce the load on the origin servers.

What can a NetScaler Administrator determine by viewing the Integrated Cache Metrics?

As a NetScaler administrator, you can monitor the NetScaler cache through NetScaler Insight Center. You can view the details such as efficiency of the cache (Integrated Cache Hits), cache misses (Integrated Cache Misses (Storable)), non-storable cache misses (Integrated Cache Misses (non-Storable)), and so on.

With Cache insight, you can view the cache misses that have occurred and can determine whether or not the objects were cacheable. You can also view the policy names that resulted in the failures.

For example, if 70% of the requests resulted in cache misses (Integrated Cache Misses (Storable) and Integrated Cache Misses (Non-Storable)), and 50% of those requests were for objects that can be cached, you can view the Uncached details to identify the policy or configuration causing the cache misses, and take remedial action.