N-Tier cache redirection
How N-tier cache redirection Is implemented
Setup necessary for configuring N-Tier CRD
-
Enable Layer 3 mode.
-
Define policies for policy-based routes (PBRs) so that traffic is forwarded according to the range of the destination port.
-
Configure a load balancing virtual server.
-
Configure the virtual server to listen to all the traffic coming from the client. Set the Service Type/Protocol to be ANY and IP Address as asterisk (*).
-
Enable sessionless load balancing with MAC-based redirection mode to avoid unnecessary load on the upper-tier NetScaler appliances.
-
Make sure that the Use Proxy Port option is enabled.
-
Create a service for each lower-tier appliance and bind all the services to the virtual server.
-
Configure the cache redirection port range on the appliance. Assign an exclusive range to each lower-tier appliance.
-
Configure a load balancing virtual server and enable MAC-based redirection.
-
Create a service for each cache server that is to be load balanced by this appliance. When creating the service, enable insertion of client IP in the header. Then, bind all the services to the load balancing virtual server.
-
Configure a transparent mode cache redirection virtual server with the following settings:
-
Enable the Origin USIP option.
-
Add a source IP expression to include the client IP in the header.
-
Enable the Use Port Range option.
-
How N-tier cache redirection works during a cache hit
Traffic flow
-
Client sends a request, and the router forwards it to L1NS1.
-
L1NS1 load balances the request to L2NS2.
-
L2NS2 load balances the request to the cache server CRS1, and the request is cacheable. L2NS2 includes the client IP in the request header.
-
CRS1 sends the response to L2NS2 because L2NS2 used its MIP as the source IP address when connecting to CRS1.
-
With the help of the client IP address in the request header, L2NS2 identifies the client from which the request came. L2NS2 directly sends the response to the router, avoiding unnecessary load on the appliance in the upper tier.
-
The router forwards the response to Client A.
How N-tier cache redirection works during a cache bypass
Traffic flow
-
Client sends a request, and the router forwards it to L1NS1.
-
L1NS1 load balances the request to L2NS2.
-
The request is uncacheable (cache bypass). Therefore, L2NS2 sends the request to the origin server through the router.
-
The origin server sends the response to an upper-tier appliance, L1NS2.
-
According to the PBR policies, L1NS2 forwards the traffic to the appropriate appliance in the lower tier, L2NS2.
-
L2NS2 uses the client IP address in the request header to identify the client from which the request came and sends the response directly to the router, avoiding unnecessary load on the appliance in the upper tier.
-
The router forwards the response to Client A.
How N-tier cache redirection works during a cache miss
Traffic flow
-
Client sends a request, and the router forwards it to L1NS1.
-
L1NS1 load balances the request to L2NS2.
-
L2NS2 load balances the request to the cache server CRS1 because the request is cacheable.
-
CRS1 does not have the response (cache miss). CRS1 forwards the request to the origin server through the appliance in the lower tier. L2NS3 intercepts the traffic.
-
L2NS3 takes the client IP from the header and forwards the request to the origin server. The source port included in the packet is the L2NS3 port from which the request is sent to the origin server.
-
The origin server sends the response to an upper-tier appliance, L1NS2.
-
According to the PBR policies, L1NS2 forwards the traffic to the appropriate appliance in the lower tier, L2NS3.
-
L2NS3 forwards the response to the router.
-
The router forwards the response to Client A.