Vous êtes sur la page 1sur 13

Content Accelerator (10.1.e and 10.

5 +)

2015-01-16 04:55:32 UTC


2015 Citrix Systems, Inc. All rights reserved. Terms of Use | Trademarks | Privacy Statement

Contents

Content Accelerator (10.1.e and 10.5 +) ................................................................

How Content Accelerator Works ...............................................................

Configuring Content Accelerator ..............................................................

Content Accelerator (10.1.e and 10.5 +)


Note: Supported on NetScaler 10.1.e and from NetScaler 10.5 onwards. It is not
supported on NetScaler 10.1.
Content accelerator is a NetScaler feature that you can use in a Citrix ByteMobile T1100
deployment, to store data on a Citrix ByteMobile T2100 appliance. For more information
about Citrix ByteMobile, see How ByteMobile Works.
Storing data on a T2100 appliance saves bandwidth and provides faster response times,
because the NetScaler does not have to connect to the server for repeated requests of the
same data.
Note: Content accelerator works with a Citrix ByteMobile platinum license. Contact
customer support for more information and for obtaining the license.
The following video shows the packet flow and configuration steps (also explained in
subsequent topics) for the content accelerator feature.
None
Note: The video might take some time to load. If it does not open, click here.

How Content Accelerator Works


When a load balancing or content switching virtual server receives a client request, the
NetScaler appliance evaluates a content accelerator policy that you have bound to the
virtual server. The policy filters the requests to identify the ones to which to apply the
content accelerator feature.
Note: For HTTP requests, the content accelerator feature can serve partial content in
response to single byte-range requests.
The following figure illustrates the operations that the appliance performs when a client
request arrives at a virtual server configured to use the content accelerator feature:

The process flow is as follows:


1. Client sends request.
2. NetScaler forwards the request to the server.
3. Server responds with the predefined size of the response (specified by the
accumResSize parameter of the add ca action command).
4. NetScaler computes a hash of the response sent by the server.
5. NetScaler looks up the hash on the T2100 appliance.
6. A successful lookup indicates that the data is available and the T2100 appliance sends
the data to the NetScaler.
Note:

When a lookup does not succeed, the NetScaler fetches all of the requested data
from the server, and simultaneously serves the data to the client and updates the
data on the T2100 appliance.

The T2100 appliance can be configured to specify the number of requests after
which to cache the data.

How Content Accelerator Works


7. NetScaler sends the response to the client.

Configuring Content Accelerator


Before configuring the content accelerator feature, you must enable it on the NetScaler
appliance.
You can configure the content accelerator feature to use one or multiple T2100 appliances.
You must add each T2100 appliance as a service and bind these services to a load balancing
virtual server that is dedicated to distributing the load between the configured T2100
appliances.
You must also configure a content accelerator action to lookup the data on the T2100
appliance. The action must also specify the T2100 load balancing virtual server and the size
of data (in KB) to be fetched from the server to calculate the hash.
The action must be bound to a content accelerator policy that defines the traffic on which
to perform content acceleration. The content accelerator policy must be bound to a
content switching or load balancing virtual server that receives client traffic. Alternatively,
you can bind the policy globally to be applicable to all virtual servers.

Configuring content accelerator by using the


command line interface
At the command prompt, do the following:
1. Enable the content accelerator feature.
enable ns feature ca
2. Identify the T2100 appliances and add each as a service on the NetScaler appliance.
add service <name> <IPAddress> <serviceType> <port>
Example:
> add service T2100-A 10.102.29.61 HTTP 30
> add service T2100-B 10.102.29.62 HTTP 40
> add service T2100-C 10.102.29.63 HTTP 50
Note: The services must be of type HTTP only.
3. Create a load balancing virtual server for the T2100 appliances. Specify the token load
balancing method and the rule shown in the following syntax.
add lb vserver <name> <serviceType> <IPAddress> <port> -lbMethod TOKEN -rule
"http.req.url.after_str(\"/lookup/\") alt
http.req.url.path.SKIP(1).PREFIX(64)"
Example:

Configuring Content Accelerator

> add lb vserver T2100-lbvserver HTTP 10.102.29.64 99 -lbMethod TOKEN -rule "http.req.url.after_str(\"/
http.req.url.path.SKIP(1).PREFIX(64)"
4. Bind the T2100 services to the load balancing virtual server that you created for them.
bind lb vserver <name> <serviceName>
Example:
> bind lb vserver T2100-lbvserver T2100-A
> bind lb vserver T2100-lbvserver T2100-B
> bind lb vserver T2100-lbvserver T2100-C
5. Define a content accelerator action.
add ca action <name> -accumResSize <KBytes> -lbvserver <string> -type lookup
Example:
> add ca action ca_action1 -type lookup -lbvserver T2100-lbvserver -accumResSize 60
6. Define a content accelerator policy.
add ca policy <name> -rule <expression> -action <name>
Example: To create a content accelerator policy that caches all video formats.
> add ca policy ca_mp4_pol -rule ns_video -action ca_action1
where ns_video is a built-in expression.
7. Bind the content accelerator policy to either a virtual server that receives traffic or
globally to the NetScaler system.
bind lb vserver <name> -policyName <string>
bind cs vserver <name> -policyName <string>
bind ca global -policyName <string> -priority <num> -type <type>
Example: To apply the content accelerator policy to a virtual server named "traf_rec"
> bind lb vserver traf_rec -policyName ca_mp4_pol
Example: To apply the content accelerator policy for all traffic reaching the NetScaler.
> bind ca global -policyName ca_mp4_pol -priority 100 -type RES_DEFAULT
8. Save the configuration.
save ns config

Configuring Content Accelerator

Configuring content accelerator by using the


configuration utility
1. Navigate to System > Settings > Configure Advanced Features and select Content
Accelerator.
2. Create a service for each of the T2100 appliances.
a. Navigate to Traffic Management > Load Balancing > Services.
b. Click Add and specify the relevant details. In the Server field, make sure you
specify the IP address of the T2100 appliance. In the Protocol field select HTTP.
3. Create a virtual server and bind the T2100 services to it.
a. Navigate to Traffic Management > Load Balancing > Virtual Servers.
b. Click Add and specify the relevant details.
c. In the Method and Persistence tab, specify the Method as Token.
d. In the Policies tab, specify the rule as
http.req.url.after_str(\"/lookup/\") alt
http.req.url.path.SKIP(1).PREFIX(64).
e. In the Services tab, select the T2100 services that you want to bind to the virtual
server.
4. Create a content accelerator action.
a. Navigate to Optimization > Content Accelerator > Actions.
b. Specify the relevant details.
5. Create a content accelerator policy.
a. Navigate to Optimization > Content Accelerator > Policies.
b. Click Add, specify the policy rule, and associate the content accelerator action.
6. Bind the content accelerator policy globally or to a virtual server.
a. Navigate to Optimization > Content Accelerator.
b. Under the Content Accelerator Policy Manager [REQUEST] or Content Accelerator
Policy Manager [RESPONSE] sections, bind the content accelerator policy globally or
to a virtual server.

Parameter Descriptions (of commands listed in the


CLI procedure)
enable ns feature
No parameters provided in this topic or the command has no parameters. View
description(s) in command reference Top
8

Configuring Content Accelerator

add service
name
Name for the service. Must begin with an ASCII alphabetic or underscore (_) character,
and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon
(:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the service
has been created.
serviceType
Protocol in which data is exchanged with the service.
Possible values: HTTP, FTP, TCP, UDP, SSL, SSL_BRIDGE, SSL_TCP, DTLS, NNTP, RPCSVR,
DNS, ADNS, SNMP, RTSP, DHCPRA, ANY, SIP_UDP, DNS_TCP, ADNS_TCP, MYSQL, MSSQL,
ORACLE, RADIUS, RDP, DIAMETER, SSL_DIAMETER, TFTP
port
Port number of the service.
View description(s) in command reference Top

add lb vserver
name
Name for the virtual server. Must begin with an ASCII alphanumeric or underscore (_)
character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.),
space, colon (:), at sign (@), equal sign (=), and hyphen (-) characters. Can be changed
after the virtual server is created.
CLI Users: If the name includes one or more spaces, enclose the name in double or single
quotation marks (for example, "my vserver" or 'my vserver').
serviceType
Protocol used by the service (also called the service type).
Possible values: HTTP, FTP, TCP, UDP, SSL, SSL_BRIDGE, SSL_TCP, DTLS, NNTP, DNS,
DHCPRA, ANY, SIP_UDP, DNS_TCP, RTSP, PUSH, SSL_PUSH, RADIUS, RDP, MYSQL, MSSQL,
DIAMETER, SSL_DIAMETER, TFTP, ORACLE
IPAddress
IPv4 or IPv6 address to assign to the virtual server.
port
Port number for the virtual server.
lbMethod
Load balancing method. The available settings function as follows:

Configuring Content Accelerator


* ROUNDROBIN - Distribute requests in rotation, regardless of the load. Weights can be
assigned to services to enforce weighted round robin distribution.
* LEASTCONNECTION (default) - Select the service with the fewest connections.
* LEASTRESPONSETIME - Select the service with the lowest average response time.
* LEASTBANDWIDTH - Select the service currently handling the least traffic.
* LEASTPACKETS - Select the service currently serving the lowest number of packets per
second.
* CUSTOMLOAD - Base service selection on the SNMP metrics obtained by custom load
monitors.
* LRTM - Select the service with the lowest response time. Response times are learned
through monitoring probes. This method also takes the number of active connections into
account.
Also available are a number of hashing methods, in which the appliance extracts a
predetermined portion of the request, creates a hash of the portion, and then checks
whether any previous requests had the same hash value. If it finds a match, it forwards
the request to the service that served those previous requests. Following are the hashing
methods:
* URLHASH - Create a hash of the request URL (or part of the URL).
* DOMAINHASH - Create a hash of the domain name in the request (or part of the domain
name). The domain name is taken from either the URL or the Host header. If the domain
name appears in both locations, the URL is preferred. If the request does not contain a
domain name, the load balancing method defaults to LEASTCONNECTION.
* DESTINATIONIPHASH - Create a hash of the destination IP address in the IP header.
* SOURCEIPHASH - Create a hash of the source IP address in the IP header.
* TOKEN - Extract a token from the request, create a hash of the token, and then select
the service to which any previous requests with the same token hash value were sent.
* SRCIPDESTIPHASH - Create a hash of the string obtained by concatenating the source IP
address and destination IP address in the IP header.
* SRCIPSRCPORTHASH - Create a hash of the source IP address and source port in the IP
header.
* CALLIDHASH - Create a hash of the SIP Call-ID header.
Possible values: ROUNDROBIN, LEASTCONNECTION, LEASTRESPONSETIME, URLHASH,
DOMAINHASH, DESTINATIONIPHASH, SOURCEIPHASH, SRCIPDESTIPHASH,
LEASTBANDWIDTH, LEASTPACKETS, TOKEN, SRCIPSRCPORTHASH, LRTM, CALLIDHASH,
CUSTOMLOAD, LEASTREQUEST
Default value: PEMGMT_LB_LEASTCONNS
rule

10

Configuring Content Accelerator


Expression, or name of a named expression, against which traffic is evaluated. Written in
the classic or default syntax.
Note:
Maximum length of a string literal in the expression is 255 characters. A longer string can
be split into smaller strings of up to 255 characters each, and the smaller strings
concatenated with the + operator. For example, you can create a 500-character string as
follows: '"<string of 255 characters>" + "<string of 245 characters>"'
The following requirements apply only to the NetScaler CLI:
* If the expression includes one or more spaces, enclose the entire expression in double
quotation marks.
* If the expression itself includes double quotation marks, escape the quotations by using
the \ character.
* Alternatively, you can use single quotation marks to enclose the rule, in which case you
do not have to escape the double quotation marks.
Default value: "none"
View description(s) in command reference Top

bind lb vserver
name
Name for the virtual server. Must begin with an ASCII alphanumeric or underscore (_)
character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.),
space, colon (:), at sign (@), equal sign (=), and hyphen (-) characters. Can be changed
after the virtual server is created.
CLI Users: If the name includes one or more spaces, enclose the name in double or single
quotation marks (for example, "my vserver" or 'my vserver').
serviceName
Name of the service.
policyName
Name of the policy to bind to the virtual server.
View description(s) in command reference Top

add ca action
name
Name of the content adaptation action. Must begin with an ASCII alphabetic or
underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash
(#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters.

11

Configuring Content Accelerator


accumResSize
Size of the data, in KB, that the server must respond with. The NetScaler uses this data
to compute a hash which is then used to lookup within the T2100 appliance.
lbvserver
Name of the load balancing virtual server that has the T2100 appliances as services.
type
Specifies whether the NetScaler must lookup for the response on the T2100 appliance or
serve the response directly from the server.
Possible values: nolookup, lookup, noop
View description(s) in command reference Top

add ca policy
name
Name for the content adaptation policy. Must begin with an ASCII alphabetic or
underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash
(#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Can be
changed after the policy is created.
rule
Expression that determines which requests or responses match the content adaptation
policy. When specifying the rule in the CLI, the description must be enclosed within
double quotes.
action
Name of content adaptation action to be executed when the rule is evaluated to true.
View description(s) in command reference Top

bind cs vserver
name
Name of the content switching virtual server to which the content switching policy
applies.
policyName
Name of the content switching policy to bind to the content switching virtual server Must
begin with an ASCII alphanumeric or underscore (_) character, and must contain only
ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at sign (@), equal
sign (=), and hyphen (-) characters. Cannot be changed after a policy is created.

12

Configuring Content Accelerator


To bind a content switching policy, you need a content-based virtual server (content
switching virtual server) and an address-based virtual server (load balancing virtual
server). You can assign multiple policies to the virtual server pair.
Note: When binding a CS virtual server to a default LB virtual server, the Policy Name
parameter is optional.
The following requirement applies only to the NetScaler CLI:
If the name includes one or more spaces, enclose the name in double or single quotation
marks (for example, "my policy" or 'my policy').
View description(s) in command reference Top

bind ca global
policyName
Name of the content accelerator policy.
View description(s) in command reference Top

save ns config
No parameters provided in this topic or the command has no parameters. View
description(s) in command reference Top

13

Vous aimerez peut-être aussi