Citrix ADC

Cache support for database protocols

The integrated cache feature monitors and caches database request as determined by the cache policies. Users must configure the cache policies for MYSQL and MSSQL protocols as the Citrix ADC appliance does not provide any default policies. When configuring the default protocols, remember the request-based policies support only CACHE and INVAL actions, while the response-based policies support only “NOCACHE” action. After configuring the policies, you must bind them to virtual servers. MYSQL and MSSQL policies, both request and response, are bound only to virtual servers.

在创建一个c之前ache policy, you must create a cache content group of type MYSQL or MSSQL. When you create a cache content group, associate at least one select selector with it. See年代etting Up a Basic Content Groupfor setting up a cache content group.

The following example explains how to configure and verify cache support for SQL protocols.

> enable feature IC > set cache parameter -memlimit 100 > add cache selector sel1 mssql.req.query.text > add cache contentgroup cg1 -type "MSSQL" -hitselector "sel1" -invalselector "inval_sel" -relExpiry "500" -maxResSize "100" > add cache policy cp1 -rule "mssql.req.query.command.contains(\"select\")" -action "CACHE" -storeInGroup "cg1" > add cache policy cp2 -invalObjects "cg1" -rule "mssql.req.query.text.contains(\"insert\")" -action "INVAL" > add db user user1 -password "Pass1" > add service svc_sql_1 10.102.147.70 mssql 64834 -healthMonitor "NO" -downstateflush "ENABLED" > add lb vserver lb_mssql1 mssql 10.102.147.77 1433 -lbmethod "roundrobin" > bind lb vserver lb_mssql1 svc_sql_1 > bind lb vserver lb_mssql1 -policyName cp1 -type "REQUEST" -priority "2" > bind lb vserver lb_mssql1 -policyName cp2 -type "REQUEST" -priority "1" > show cache selector sel1 Name:sel1 Expressions: 1)mssql.req.query.text > show cache policy cp1 Name:cp1 Rule:mssql.req.query.command.contains("select") CacheAction:CACHE Stored in group: cg1 UndefAction:Use Global Hits:2 Undef Hits:0 Policy is bound to following entities 1) Bound to: REQ VSERVER lb_mssql1 Priority:2 GotoPriorityExpression: END 

Note:

The methods for reducing flash crowds, as explained inReducing Flash Crowds, are not supported for MYSQL and MSSQL protocols.

Cache support for database protocols