netscaler 9.3 web 2.0 push - citrix.com · to avoid such problems, server push technology often...

24
NetScaler Web 2.0 Push 2015-04-27 05:30:16 UTC © 2015 Citrix Systems, Inc. All rights reserved. Terms of Use | Trademarks | Privacy Statement

Upload: lephuc

Post on 28-Apr-2018

234 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: NetScaler 9.3 Web 2.0 Push - Citrix.com · To avoid such problems, server push technology often uses a long polling technique. ... messages that the notification servers push to the

NetScaler Web 2.0 Push

2015-04-27 05:30:16 UTC

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

Page 2: NetScaler 9.3 Web 2.0 Push - Citrix.com · To avoid such problems, server push technology often uses a long polling technique. ... messages that the notification servers push to the

Contents

NetScaler Web 2.0 Push ..................................................................................... 3

Web 2.0 Push Applications...................................................................... 4

How Web 2.0 Push Works ....................................................................... 7

Understanding NetScaler Web 2.0 Push Protocol ........................................... 9

Configuring Web 2.0 Push....................................................................... 11

Enabling NetScaler Web 2.0 Push ........................................................ 12

Creating a NetScaler Web 2.0 Push Virtual Server .................................... 13

Configuring a Load Balancing or Content Switching Virtual Server ................. 16

Monitoring the Configuration ............................................................. 19

Customizing the NetScaler Web 2.0 Push Configuration ................................... 20

Setting a Time-out Value for Idle Client Connections ................................ 21

Redirecting Client Requests to an Alternative URL.................................... 23

2

Page 3: NetScaler 9.3 Web 2.0 Push - Citrix.com · To avoid such problems, server push technology often uses a long polling technique. ... messages that the notification servers push to the

3

NetScaler Web 2.0 Push

Modern web applications, also referred to as web 2.0 applications, provide highlyresponsive interfaces that generate asynchronous updates that can impose an additionalload on a server. Typically, asynchronous notifications are sent by using HTTP and serverpush techniques, such as long-polling and streaming response, which enable servers to pushthe notifications to clients. These techniques require the servers to maintain a largenumber of TCP/IP connections, which provides low latency but results in low bandwidth. Asthe number of clients increases, the servers are overloaded with connections kept open foreach client. Further, the large number of connections terminating on the server requireskernel resources and memory for data structures like protocol control blocks, socketdescriptors, and socket buffers.

With the NetScaler Web 2.0 push feature, you can use the NetScaler appliance as a proxyserver to offload long-lived client TCP connections and maintain relatively fewer, reusableconnections to the server. NetScaler Web 2.0 push is application agnostic, with theflexibility to work seamlessly with various technologies and configurations used forasynchronous messaging. It can be extended to co-exist with developing technologies, andit preserves backward compatibility. NetScaler Web 2.0 Push is also scalable, with supportfor multiple NetScaler appliances.

With the NetScaler Web 2.0 push feature, the NetScaler appliance multiplexes and managesthe exchange of data reliably and securely, reducing the number of server-side connectionsacross potentially millions of persistent client connections. For every HTTP, HTTPS, or SSLtransaction, the appliance can de-link and rebalance the server farm to distribute clientrequests across multiple servers.

The NetScaler Web 2.0 Push feature reduces the number of server-side connections acrossmillions of persistent client connections.

Page 4: NetScaler 9.3 Web 2.0 Push - Citrix.com · To avoid such problems, server push technology often uses a long polling technique. ... messages that the notification servers push to the

4

Web 2.0 Push Applications

With modern Web applications, termed broadly as Web 2.0 applications, servers use AJAXtechnologies such as polling to maintain up-to-date information about the client. Pollingenables an AJAX application to periodically poll the server for updates. For example, a chatbased application can poll a Web server every 10 seconds for any chat updates. To get suchupdates from the Web server, the client browser periodically opens a connection to theWeb server.

Figure 1. Polling Technique

Such frequent polling can overload the server. Also, if you deploy the AJAX application on aWeb server with low resources and a large number of simultaneous users poll the server forupdates, the network can become saturated, with significant degradation in the serverperformance. And if there is no update from the server, the client requests overload theserver for a void response.

To avoid such problems, server push technology often uses a long polling technique. Longpolling enables the client application to open a persistent connection to the server and waitfor the server to push updates when available.

Page 5: NetScaler 9.3 Web 2.0 Push - Citrix.com · To avoid such problems, server push technology often uses a long polling technique. ... messages that the notification servers push to the

Figure 2. Long Polling Technique

If your server supports asynchronous request processing, long polling is a scalabletechnique. However, long polling can hold the server connections until updates areavailable. For example, if 1,000 AJAX applications open one long polled connection, 1,000threads hold the server while waiting for updates.

Another technique, called HTTP streaming, is identical to the long polling technique exceptthat the connection is not closed after the server pushes the updates. The AJAX applicationsends a single request and receives chunks of responses (partial responses) over the sameconnection. With HTTP streaming, the browsers and server do not open or close theconnection. Therefore, HTTP streaming significantly reduces the network latency.

Web 2.0 Push Applications

5

Page 6: NetScaler 9.3 Web 2.0 Push - Citrix.com · To avoid such problems, server push technology often uses a long polling technique. ... messages that the notification servers push to the

Figure 3. HTTP Streaming Technique

In HTTP streaming, as in long polling techniques, if the server frequently pushes updates,the performance of the network and the AJAX applications are significantly degraded andthe client may lose the updates. If your AJAX application opens both long polling and HTTPstreaming connections to the same Web server, other AJAX applications cannot openconnections to the server, because the browser blocks such connections.

NetScaler Web 2.0 push uses connection labeling to overcome the limitations of long pollingand HTTP streaming.

Web 2.0 Push Applications

6

Page 7: NetScaler 9.3 Web 2.0 Push - Citrix.com · To avoid such problems, server push technology often uses a long polling technique. ... messages that the notification servers push to the

7

How Web 2.0 Push Works

The NetScaler Web 2.0 push feature enables the server to label a client connection andsubsequently identify and send data over that labeled connection. With NetScaler Web 2.0push enabled, the client first establishes a TCP/IP connection and connects to the NetScalerappliance. The appliance uses the configured load balancing method or content switchingpolicy to select a Web server to which to open a connection and send the client request.The server interacts with the client and uses either authentication or a previouslyestablished cookie to identify the client.

When the NetScaler appliance receives a request with push enabled, it initiates the labelingprotocol with the Web server. This protocol enables the Web server to label the connectionand defer the response. The protocol also enables the server to process other requestswithout invoking push processing. The Web server (referred to as a notification server) usesthe label to send updates to the client through the NetScaler appliance when the updatesbecome available. Servers can choose to push multiple updates over a single TCPconnection or open one connection per update.

Note: The set of Web servers that respond to requests from the NetScaler does notnecessarily include the notification servers that push updates to client.

A central component of a NetScaler Web 2.0 push configuration is a push virtual server,which is a load balancing virtual server with service type PUSH or SSL_PUSH. The NetScalerappliance uses the push virtual server to expose the message push protocol to the Webservers. A server uses the protocol to push asynchronous messages to connected clients. Apush virtual server exposes a simple REST interface for posting updates.

Important: For the NetScaler Web 2.0 Push feature to work correctly, you must configurethe NetScaler appliance as a proxy for the traffic between the clients and servers. Youcan use multiple NetScaler appliances to scale up your connection management.

For each transaction, the NetScaler Web 2.0 push feature maintains a state machine, whichmanages the actions of the transaction. The state machine has the following states:

• Waiting for Request State (Q)-A connection has been established between the clientand the NetScaler appliance. The appliance waits in this state until the client sends arequest.

• Waiting for Server Response State (R) -A request has been received from the client andforwarded to a Web server. The appliance waits in this state for the server to respond.

• Waiting for Asynchronous Messages State (A) -The appliance is waiting for asynchronousmessages that the notification servers push to the push virtual server.

Until the client establishes a connection with the NetScaler appliance's load balancing orcontent switching virtual server, the initial state of the transaction is Q. When theappliance receives a request, it forwards the request to the server, and the transactionmoves to state R.

If the appliance receives a deferred response (also called a labeled response), the transaction moves to state A. In this state, if the appliance receives a push message through the message push protocol, it processes the message and forwards the message to

Page 8: NetScaler 9.3 Web 2.0 Push - Citrix.com · To avoid such problems, server push technology often uses a long polling technique. ... messages that the notification servers push to the

the client. If this message is marked as the last message, the appliance closes thetransaction and moves to state Q. If not, the transaction remains in state A.

The push virtual server can manage long-polling and streaming responses from the server.Each update that the server sends to the push virtual server has a flag (with queryparameters) that indicates whether there are updates from the server. When the flagindicates that the updates from the server are unavailable, the NetScaler applianceperforms one of the following functions:

1. If the client uses HTTP 1.1 protocol and multiple updates are received from the server,the appliance sends a chunked response to the client and appends a zero chunk to thefinal response. If the first response itself has the flag set, the content length itself issent as the response.

2. If the client uses HTTP 1.0 protocol and multiple updates are received from the server,then just the contents of the chunked response or the body of the content lengthresponse is sent to the client and the connection is terminated. If the first responseitself has the flag set then, the content length itself is sent as the response.

The appliance sends a content-length response regardless of which HTTP version the clientuses. The connection-labeling and message-push protocols, which identify the client andthe server connections, provide the basic functionality of the NetScaler Web 2.0 pushfeature.

How Web 2.0 Push Works

8

Page 9: NetScaler 9.3 Web 2.0 Push - Citrix.com · To avoid such problems, server push technology often uses a long polling technique. ... messages that the notification servers push to the

9

Understanding NetScaler Web 2.0 PushProtocol

For the NetScaler Web 2.0 Push feature to work correctly, the NetScaler appliance mustlabel the client connection and then identify and send the deferred response from theserver over the labeled connection. For this purpose, the Web 2.0 push feature uses theconnection labeling and the message push protocols.

Connection Labeling ProtocolThe connection labeling protocol is used between the server and the NetScaler appliance tolabel the client connection. After a label is negotiated, the Web server includes the label inthe update that is sent to the client.

The appliance forwards a request to the server after adding an X-NS-PUSHVSERVER headercontaining the IP address and port of the push virtual server. The server either responds tothis request with an HTTP response or defers the response. If the server defers theresponse, it labels the connection with an X-NS-DEFERRABLE header, which indicates thatthe connection is deferred.

A policy configured on the load balancing or content switching virtual server enables theNetScaler appliance to extract the label from the response. The appliance uses theinformation in the label to send the push message (update) to the push virtual server,which sends the response on the corresponding client connection.

Note: For any update from the Web server, the NetScaler does not support rewrite andcompression.

When a server receives a request that it is deferrable, it sends an HTTP 200 OK responsewith the X-NS-DEFERRABLE header, which indicates to the NetScaler appliance that thepush feature should be applied to the request. The appliance removes theX‑NS-DEFERRABLE header, sends the response to the client, and waits for updates. Forexample:

HTTP/1.1 200 OK Date: Wed, 25 Aug 2010 18:22:47 GMT Server: Apache/2.0.61 (FreeBSD) PHP/5.2.5 with Suhosin-Patch mod_ssl/2.0.61 OpenSSL/0.9.8e mod_perl/2.0.3 Perl/v5.8.8 X-NS-DEFERRABLE: YES X-NS-SERVERLABEL: 04c2442bcb7c4b5f826d41a623e374e! Content-Length: 0 Content-Type: text/plain;charset=UTF-8

Page 10: NetScaler 9.3 Web 2.0 Push - Citrix.com · To avoid such problems, server push technology often uses a long polling technique. ... messages that the notification servers push to the

Message Push ProtocolThe message push protocol is used between a notification server and the NetScalerappliance to enable the notification server to send a notification to a previously labeledclient connection.

Web servers use the message push protocol to push asynchronous messages to connectedclients. The push protocol is built as a REST interface, exposed through the push virtualserver on the NetScaler appliance. The server connects to the push virtual server and sendsa request to the appliance. The BODY of the request contains the payload to be sent to theclient. Additionally, the request identifies the label for the target client connection and thelast message of the response.

When the NetScaler appliance receives the deferred response from the server, it sends theresponse to the client as a single HTTP chunk and sends a 200 OK response with the XMLinformation to the server. If the message is marked as the last message of the response, theNetScaler also closes the HTTP response on the server.

Note: If the NetScaler is aware of the content length, it may send a response specifyingthe Content-Length, instead of a chunk. This enables the NetScaler to manage both HTTPstreaming and long-polling responses.

Notification from Server to Push Server

POST /CLIENT/V10/04c2442bcb7c4b5f826d41a623e374e!?MSG_END=0 HTTP/1.1Host: 10.102.80.66:8080Content-Length: 6

Response from Push vserver to the server

HTTP/1.1 200 OKContent-Type: text/xml; charset="UTF-8"Content-Length: 130<?xml version="1.0" encoding="UTF-8"?><CLIENTINFO> <CLIENT ID="04c2442bcb7c4b5f826d41a623e374e!" INFO="SUCCESS" /></CLIENTINFO>

Understanding NetScaler Web 2.0 Push Protocol

10

Page 11: NetScaler 9.3 Web 2.0 Push - Citrix.com · To avoid such problems, server push technology often uses a long polling technique. ... messages that the notification servers push to the

11

Configuring Web 2.0 Push

To configure NetScaler Web 2.0 push, you must first enable the feature. Then, create apush virtual server and associate it with a load balancing or content switching virtualserver. Once you have a working configuration, you can customize it to suit yourdeployment.

You can also monitor the Web 2.0 push configuration by viewing statistics about the pushvirtual server and the other entities, such as the load balancing or the content switchingvirtual servers, that are part of the configuration.

Page 12: NetScaler 9.3 Web 2.0 Push - Citrix.com · To avoid such problems, server push technology often uses a long polling technique. ... messages that the notification servers push to the

12

Enabling NetScaler Web 2.0 Push

You have to enable the NetScaler Web 2.0 push feature before you can use it. Beforeenabling the feature, you must have the appropriate license installed on the NetScalerappliance. With the feature disabled, you can configure NetScaler Web 2.0 push entities,such as the push virtual server, but the entities will not work until the feature is enabled.

To enable NetScaler Web 2.0 push by using thecommand line interface

At the command prompt, type:

enable ns feature push

If NetScaler Web 2.0 Push is not licensed or disabled, the push virtual server state is DOWN.

To enable NetScaler Web 2.0 Push by using theconfiguration utility

1. In the navigation pane, expand System, and then click Settings.

2. In the details pane, under Modes and Features, click Change advanced features.

3. In the Configure advanced features dialog box, select the NetScaler Push check box,and then click OK.

4. At the Enable/Disable Feature(s)? prompt, click Yes.

Page 13: NetScaler 9.3 Web 2.0 Push - Citrix.com · To avoid such problems, server push technology often uses a long polling technique. ... messages that the notification servers push to the

13

Creating a NetScaler Web 2.0 PushVirtual Server

A push virtual server enables the NetScaler appliance to multiplex and manage theexchange of data (server push) reliably, securely, and in a scalable manner. It enables thenotification server to send a notification to a previously labeled client connection by usingthe message push protocol. The notification servers push the out-of-band updates to thepush virtual server. When the clients access the load balancing or the content switchingvirtual servers, the push virtual server uses the labeling protocol to label the deferredclients.

You can add, modify, and remove push virtual servers, however, you cannot bind services tothe push virtual server.

To create a NetScaler Web 2.0 Push virtual server byusing the command line interface

At a command prompt, type the following commands to create a push virtual server andverify the configuration:

• add lb vserver <name> <serviceType> <IPAddress> <Port>

• show lb vserver <name>

Example

add lb vserver Vserver-Push-1 PUSH 10.102.29.162 80show lb vserver Vserver-Push-1

Page 14: NetScaler 9.3 Web 2.0 Push - Citrix.com · To avoid such problems, server push technology often uses a long polling technique. ... messages that the notification servers push to the

To create a NetScaler Web 2.0 Push virtual server byusing the configuration utility

1. Navigate to Traffic Management > Load Balancing > Virtual Servers.

2. In the details pane, click Add.

3. In the Name, Port, and IP Address text boxes, type a name for the push virtual server, aport, and an IP address (for example, Vserver-Push-1, 80, and 10.102.29.162).

4. In Protocol, select either SSL_PUSH or PUSH.

5. Click Create, and then click Close. The push virtual server you created appears in theLoad Balancing Virtual Servers pane.

To remove a push virtual server, use the rm lb vserver command that takes only the nameparameter.

Parameter Descriptions (of commands listed in theCLI procedure)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 changedafter the virtual server is created.

CLI Users: If the name includes one or more spaces, enclose the name in double or singlequotation 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

IPAddress

IPv4 or IPv6 address to assign to the virtual server.

Port

Port number for the virtual server.

View description(s) in command reference Top

Creating a NetScaler Web 2.0 Push Virtual Server

14

Page 15: NetScaler 9.3 Web 2.0 Push - Citrix.com · To avoid such problems, server push technology often uses a long polling technique. ... messages that the notification servers push to the

show lb vservername

Name of the virtual server. If no name is provided, statistical data of all configuredvirtual servers is displayed.

View description(s) in command reference Top

Creating a NetScaler Web 2.0 Push Virtual Server

15

Page 16: NetScaler 9.3 Web 2.0 Push - Citrix.com · To avoid such problems, server push technology often uses a long polling technique. ... messages that the notification servers push to the

16

Configuring a Load Balancing or ContentSwitching Virtual Server

After creating a push virtual server, you need to associate it with the load balancing orcontent switching virtual servers. For details about creating a load balancing virtual server,see "Creating a Virtual Server." Also, for details about creating a content switching setup,see "Creating Content Switching Virtual Servers."

Once you have created the load balancing or content switching virtual servers, you mustassociate them with the push virtual server.

To configure a load balancing virtual server or contentswitching virtual server for NetScaler Web 2.0 push byusing the command line interface

At the command prompt, type the following commands to configure a load balancing virtualserver for NetScaler Web 2.0 push. To configure a content switching virtual server, replaceset lb vserver with set cs vserver.

set lb vserver <name> <ServiceType> <IPAddress> <Port> -push (ENABLED | DISABLED)-pushVserver <PushVservername> -pushLabel <Expression> -pushMultiClients (YES | NO)

Examples

set lb vserver Vserver-LB-1 HTTP 10.102.29.161 80 -push ENABLED - pushVserver PushVserver1 -pushLabel "HTTP.RES.HEADER(\"NSLABEL\").VALUE(0)" –pushMultiClients YES

set cs vserver Vserver-CS-1 HTTP 10.102.29.161 80 -push ENABLED - pushVserver PushVserver1 -pushLabel "HTTP.RES.HEADER(\"NSLABEL\").VALUE(0)" –pushMultiClients YES

To modify or remove a load balancing or contentswitching virtual server by using the command lineinterface

• To modify a virtual server, type the set lb vserver or set cs vserver command, the nameof the virtual server, and the parameters to be changed, with their new values.

• To remove a virtual server, type the rm lb vserver or rm cs vserver command and thename of the load balancing or content switching virtual server.

Page 17: NetScaler 9.3 Web 2.0 Push - Citrix.com · To avoid such problems, server push technology often uses a long polling technique. ... messages that the notification servers push to the

To create a load balancing virtual server for NetScalerWeb 2.0 Push by using the configuration utility

1. Navigate to Traffic Management > Load Balancing > Virtual Servers.

2. In the details pane, select the virtual server for which you want to configure pushvirtual server (for example, Vserver-LB-1), and click Open.

3. In the Configure Virtual Server (Load Balancing) dialog box, on the Advanced tab, clickthe arrow next to Push to expand it. Then, in the Push VServer list, select the pushvirtual server and click OK.

Note: To create a content switching virtual server for NetScaler Web 2.0 Push byusing the configuration utility, in the navigation pane, expand Content Switching,click Virtual Servers, Then, perform steps 2 and 3.

Parameter Descriptions (of commands listed in theCLI procedure)set lb vserver

name

Name of the virtual server.

IPAddress

IPv4 or IPv6 address to assign to the virtual server.

push

Process traffic with the push virtual server that is bound to this load balancing virtualserver.

Possible values: ENABLED, DISABLED

Default value: DISABLED

pushVserver

Name of the load balancing virtual server, of type PUSH or SSL_PUSH, to which the serverpushes updates received on the load balancing virtual server that you are configuring.

pushLabel

Expression for extracting a label from the server's response. Can be either an expressionor the name of a named expression.

Default value: "none"

pushMultiClients

Configuring a Load Balancing or Content Switching Virtual Server

17

Page 18: NetScaler 9.3 Web 2.0 Push - Citrix.com · To avoid such problems, server push technology often uses a long polling technique. ... messages that the notification servers push to the

Allow multiple Web 2.0 connections from the same client to connect to the virtual serverand expect updates.

Possible values: YES, NO

Default value: NO

View description(s) in command reference Top

Configuring a Load Balancing or Content Switching Virtual Server

18

Page 19: NetScaler 9.3 Web 2.0 Push - Citrix.com · To avoid such problems, server push technology often uses a long polling technique. ... messages that the notification servers push to the

19

Monitoring the Configuration

To monitor the NetScaler Web 2.0 push configuration, you need to view the statistics of thepush virtual servers and load balancing entities. This is useful for troubleshooting.

For instructions on how to display statistics of load balancing entities, see "Load Balancing."Available statistics include labeled connections, push labeled connections, and deferredrequests.

To view the properties of the push virtual server byusing the command line interface

At the command prompt, type:

show lb vserver <PushVserverName>

Example

show lb vserver Vserver-Push-1

Parameter Descriptions (of commands listed in theCLI procedure)show lb vserver

No parameters provided in this topic or the command has no parameters. Viewdescription(s) in command reference Top

Page 20: NetScaler 9.3 Web 2.0 Push - Citrix.com · To avoid such problems, server push technology often uses a long polling technique. ... messages that the notification servers push to the

20

Customizing the NetScaler Web 2.0 PushConfiguration

Once your basic Web 2.0 Push configuration is operational, you can customize it by setting atime-out value for idle client connections and configuring URL redirects.

Page 21: NetScaler 9.3 Web 2.0 Push - Citrix.com · To avoid such problems, server push technology often uses a long polling technique. ... messages that the notification servers push to the

21

Setting a Time-out Value for Idle ClientConnections

Once a client connects to the push virtual server, you can configure the virtual server toclose any idle client connections after a configured time period.

To configure a time-out value, use the cltTimeout parameter, which specifies the time, inseconds, after which the NetScaler appliance closes any idle client connections. The defaultvalue is 180sec for HTTP/SSL-based services and 9000sec for TCP-based services.

To set a time out value for idle client connections byusing the command line interface

At the command prompt, type:

set lb vserver <PushVserverName> [-cltTimeout <secs>]

Example

set lb vserver Vserver-Push-1 -cltTimeout 100

To set a time-out value for idle client connections byusing the configuration utility

1. Navigate to Traffic Management > Load Balancing > Virtual Servers.

2. In the details pane, select the virtual server for which you want to configure virtualserver port insertion (for example, Vserver-Push-1), and then click Open.

3. In the Configure Virtual Server (Load Balancing) dialog box, click the Advanced tab.

4. In the Client Time-out (secs) text box, type the timeout value (for example, 100).

5. Click OK.

Page 22: NetScaler 9.3 Web 2.0 Push - Citrix.com · To avoid such problems, server push technology often uses a long polling technique. ... messages that the notification servers push to the

Parameter Descriptions (of commands listed in theCLI procedure)set lb vserver

cltTimeout

Idle time, in seconds, after which a client connection is terminated.

Default value: VAL_NOT_SET

Maximum value: 31536000

View description(s) in command reference Top

Setting a Time-out Value for Idle Client Connections

22

Page 23: NetScaler 9.3 Web 2.0 Push - Citrix.com · To avoid such problems, server push technology often uses a long polling technique. ... messages that the notification servers push to the

23

Redirecting Client Requests to anAlternative URL

You can configure a URL to which to redirect HTTP or HTTPS client requests when the pushvirtual server is down or disabled. This URL can be a local or a remote link. The NetScalerappliance uses HTTP 302 redirect to redirect client requests.

Redirects can be absolute URLs or relative URLs. If the configured redirect URL contains anabsolute URL, the HTTP redirect is sent to the configured location, regardless of the URLspecified in the incoming HTTP request. If the configured redirect URL contains only adomain name (relative URL), the incoming URL is appended to the domain configured in theredirect URL.

The domain specified in the redirect URL must not be the same as the domain specified inthe domain name argument of a content switching policy. If the same domain is specified inboth arguments, the request is redirected continuously to the same unavailable virtualserver in the NetScaler appliance, and the user cannot get the requested content.

To configure a virtual server to redirect the clientrequest to a URL by using the command line interface

At the command prompt, type:

set lb vserver <name> -redirectURL URLValue

Example

set lb vserver Vserver-Push-1 -redirectURL http://www.newdomain.com/mysite/maintenance

To configure a virtual server to redirect the clientrequest to a URL by using the configuration utility

1. Navigate to Traffic Management > Load Balancing > Virtual Servers.

2. In the details pane, select the push virtual server for which you want to configureredirect URL (for example, Vserver-Push-1), and then click Open.

3. On the Advanced tab, in the Redirect URL text box, type the URL (for example,http://www.newdomain.com/mysite/maintenance).

4. Click OK.

Page 24: NetScaler 9.3 Web 2.0 Push - Citrix.com · To avoid such problems, server push technology often uses a long polling technique. ... messages that the notification servers push to the

Parameter Descriptions (of commands listed in theCLI procedure)set lb vserver

name

Name of the virtual server.

redirectURL

URL to which to redirect traffic if the virtual server becomes unavailable.

WARNING! Make sure that the domain in the URL does not match the domain specifiedfor a content switching policy. If it does, requests are continuously redirected to theunavailable virtual server.

View description(s) in command reference Top

Redirecting Client Requests to an Alternative URL

24