Document ID: 5308
Contents
Introduction
Before You Begin
Conventions
Prerequisites
Components Used
Configure
Network Diagram
Configuration
Troubleshoot
Configuring the HTTP Keepalive Method
Usage Guidelines
Related Information
Introduction
The Cisco Content Services Switch (CSS) polls the activity of servers using different protocols to check the integrity of the servers at Layers 3 to 5. The polling can be done using ICMP, HTTP (HEAD, Page Checksum, URL), TCP, and FTP. With the exception of Domain Name System (DNS), because the CSS is DNS application aware, Cisco does not support using User Datagram Protocol (UDP) keepalives. Using HTTP, polling can check if a Web page is being served and if it has been modified. Polling can be performed at individual service levels or tied to related service.
Before You Begin
Conventions
For more information on document conventions, see the Cisco Technical Tips Conventions.
Prerequisites
There are no specific prerequisites for this document.
Components Used
The information in this document is based on Cisco CSS 11000 and 11500 series content services switches and all Cisco WebNS versions.
Configure
The client has three servers that distribute basic content. The second server also handles database transactions, and the third server handles specific content. If the backend database goes down, the second server should be taken out of service; likewise, if the content server goes down, it should be taken out of service as well.
Note: To find additional information on the commands used in this document, use the Command Lookup Tool (registered customers only) .
Network Diagram

Configuration
|
Sydney CSS |
|---|
!Generated on 05/01/2004 02:57:42 !Active version: sg0710102 configure !*************************** GLOBAL *************************** ip route 0.0.0.0 0.0.0.0 209.165.202.130 1 !************************* INTERFACE ************************* interface 1/2 bridge vlan 2 interface 2/2 bridge vlan 2 !************************** CIRCUIT ************************** circuit VLAN1 ip address 209.165.202.128 255.255.255.224 circuit VLAN2 ip address 192.168.5.1 255.255.255.0 !************************* KEEPALIVE ************************* keepalive ContentServer !--- Poll the database server using HTTP. Use the default HEAD method, which looks for !--- a 200 OK response from the real server. type http uri "/content.html" ip address 192.168.5.15 active keepalive DatabaseServer type http !--- Use a GET and compare the checksum of the login page. If there is a problem, it is !--- displayed on the login page. method get ip address 192.168.5.10 uri "/dblogin.html" active !************************** SERVICE ************************** !--- Service rule for the real servers. The CSS polls the server using the specified named !--- keepalive. service ContentServer ip address 192.168.5.15 keepalive type named ContentServer active service DatabaseServer ip address 192.168.5.10 keepalive type named DatabaseServer active !--- Service rule for the real servers. The CSS polls the server using the default HTTP !--- keepalive type. service IISWEB ip address 192.168.5.2 keepalive type http active !*************************** OWNER *************************** owner Website !--- Specify a Layer 7 content rule. The CSS matches the most specific rule first. content CONTENT protocol tcp vip address 209.165.202.129 port 80 url "/content.html" add service ContentServer active content DATABASE protocol tcp vip address 209.165.202.129 port 80 url "/dblogin.html" add service DatabaseServer active content WWW protocol tcp add service IISWEB vip address 209.165.202.129 port 80 active !--- Specify a group only if you have real servers with private IP addresses; this will NAT !--- the packet on return to the client. !*************************** GROUP *************************** group WWW vip address 209.165.202.129 add destination service IISWEB active |
Troubleshoot
This section provides information you can use to confirm your configuration is working properly.
The sh keepalive command provides a complete summary of all keepalives on the CSS. If you see State: Alive, you know that that service has been configured, and the CSS can see the device. This command also provides information on what type of keepalive it is and the specifics on what will make the service fail. The services starting with AUTO_ are default services generated by the CSS when you add a service; this includes the default gateway. If a service is shown as State: Down, you need to check your connection from the CSS to your real server (by default it takes three failures of a particular keepalive to mark a service as down). State:Dying means the CSS has not yet had contact with the real server.
SYDNEY# sh keepalive Keepalives: Name: AUTO_nexthop00004 Index: 0 State: Alive Description: Auto generated for service nexthop00004 Address: 209.165.202.130 Port: Any Type: ICMP Frequency: 5 Max Failures: 3 Retry Frequency: 5 Dependent Services: nexthop00004 Name: AUTO_IISWEB Index: 1 State: Alive Description: Auto generated for service IISWEB Address: 192.168.5.2 Port: 80 Type: HTTP:HEAD:/ Frequency: 5 Max Failures: 3 Retry Frequency: 5 Dependent Services: IISWEB Name: DatabaseServer Index: 2 State: Alive Description: Address: 192.168.5.10 Port: 80 Type: HTTP:GET:/dblogin.html Hash: 95bd5419e38977e967b399853729c86f Frequency: 5 Max Failures: 3 Retry Frequency: 5 Dependent Services: DatabaseServer Name: ContentServer Index: 3 State: Alive Description: Address: 192.168.5.15 Port: 80 Type: HTTP:HEAD:/content.html Frequency: 5 Max Failures: 3 Retry Frequency: 5 Dependent Services: ContentServer
If you have a large number of services, it is possible to list only a specified service by typing in the name of the service you are interested in.
SYDNEY# sh keepalive ContentServer Name: ContentServer Index: 3 State: Alive Description: Address: 192.168.5.15 Port: 80 Type: HTTP:HEAD:/content.html Frequency: 5 Max Failures: 3 Retry Frequency: 5 Dependent Services: ContentServer
Configuring the HTTP Keepalive Method
Issue the keepalive method command to specify the HTTP keepalive method for a service. The syntax and options for this service mode command are:
-
method get — The CSS issues an HTTP GET method to the service, computes a hash value on the page, and stores the hash value as a reference hash. Subsequent GETs require a 200 OK status (HTTP command completed OK response) and the hash value to equal the reference hash value. If the 200 OK status is not returned, or if the 200 OK status is returned but the hash value is different from the reference hash value, the CSS considers the service down. When you specify the content information of an HTTP Uniform Resource Identifier (URI) for an HTTP keepalive, the CSS calculates a hash value for the content. If the content information changes, the hash value no longer matches the original hash value and the CSS assumes that the service is down. To prevent the CSS from assuming that a service is down due to a hash value mismatch, specify the keepalive method as head.
-
method head (default) — The CSS issues an HTTP-HEAD method to the service and a 200 OK status is required. The CSS does not compute a reference hash value for this type of keepalive. If the 200 OK status is not returned, the CSS considers the service down. For example, enter:
If you change the keepalive method on an active service, make sure that you suspend and reactivate the service for the change to take effect.
Usage Guidelines
When you specify a Uniform Resource Identifier (?) (URI) for an HTTP keepalive, the CSS calculates a hash value for the Web page specified in the URI. If the Web page changes, the hash value no longer matches the original hash value and the CSS assumes that the service is dead. To prevent the CSS from assuming that a service is dead due to a hash value mismatch, define keepalive method as head. The CSS does not compute a hash value for this type of keepalive.
If you specify the URI of a Web page with changeable content and do not specify the head keepalive method, you must suspend and reactivate the service each time the Web page changes.
Maximums 512 keepalives (255 script keepalive types) with Cisco WebNS version 5.0 onwards
A CSS 11000 or 11500 configuration can have up to 255 keepalives of any one type with a total of all types being less than or equal to 512.
Example
Customer example.com needs to load balance 500 Web Servers.
250 TCP port 80 KeepAlives. 250 HTTP KeepAlives. ------------------------------------- Total: 500 Web Services Content Rule Maximums: 64 Services per Content Rule Content Rule Maximums: 250 Content Rules (example with 2 Services per Content Rule).
Related Information
- CSS Basic Configuration Guide
- Cisco CSS 11000 Series Content Services Switches
- Keepalive Configuration Mode Commands
- Technical Support - Cisco Systems
| Updated: Jan 31, 2006 | Document ID: 5308 |
