NetScaler with its Cache Redirection module in conjunction with the external Cache Servers provides the best of the solution, reducing the Latency and Bandwidth cost incurred due to evident increase in international bandwidth usage. In this solution, NetScaler used to intelligently manage and distribute the traffic between Origin and Cache Servers. Recently, introduced N- tier module on NetScaler, broadened the horizon, by enabling a solution to handle several gigabytes of data per second most efficiently.
You can also use this Cache Redirection module in conjunction with Integrated Caching to cache the hot objects on NetScaler. This module provides in-memory storage on the NetScaler and serves Web content for hot objects to users without needing a round trip to an origin or a cache server. With this, NetScaler can cache static as well as dynamic data thereby further offloading the load from the cache and the origin servers to another level along with reducing the latency issues.
To elaborate on Integrated Caching more, I will start with a use case where, the ISP wants to serve the top five URL traffic from the in-built integrated caching module of NetScaler.
With NetScalers Graphical User Interface (GUI), configuring this use case of integrated caching is just few clicks away.
With the Integrated Caching enabled, we will start the configuration by setting the Pattern Sets. A pattern set is an array of indexed patterns that you configure on the NetScaler. They eliminate the need for you to configure compound advanced expressions that perform string matching with multiple OR operations (one expression for each comparison). This also reduces the consumption of appliance resources in terms of memory and the number of expressions that the appliance has to evaluate.
To do so, as shown below, after clicking Add, enter the top five sites patterns and click create.
Here we have created pattern of 5 hot objects, which will enable only the mentioned top sites to get cached at NetScaler.
A content group is a container for cached objects that can be served in a response. For example, you can create separate content groups for image data, bug reports etc. You can also configure expiration of an entire content group or selected entries in a content group.
As can be seen above, we have created cg_top_five_url content group with 600 sec as the content group expiry time limit and then set 100 MB as the maximum size of the response.
With the above mentioned procedure, we have created an expression url_hostname under AppExpert tab in GUI which will give the URL and the hostname of the requests.
Now, under Integrated Caching tab again, under policies, we have created a cache policy, cache_top_five_url. As can be seen, we have set the rule as url_hostname.equals_any(“top_five_url”) , set the store in group as cg_top_five_url content group and set the action as CACHE. According to this policy, if the URL and hostname of the requests are any of the five URLs mentioned in the top_five_url patter set, then the content will be cached in cg_top_five_url content group.
Now, we have created another policy in which the direct action is set to NO_CACHE. With this we ensure if the request it not amongst the top URLs, with the below mentioned priorities, the requests will not get cached at the NetScaler and will be forwarded to the backend servers.
Under cache policies only, under Policy Manager, as can be seen above we have set the priorities of the two policies configured as shown below. This will ensure that we only cache the hot objects on NetScaler because in a Cache Redirection deployment you do not want to Cache everything on NetScaler as it is not scalable and will defeat the purpose.
Please note that, the priorities are set such that, cache_top_five_url policy will be processed first and then the nocache_rest policy.
With these configuration steps, any customer can set top five or any number of top priority sites and serve from NetScaler inbuilt Cache, can reduce the latency and offload the connections from the external cache or origin servers to another level.