Configure an HTTP service
On the NetScaler appliance, a service represents a physical server on the network. In the transparent cache redirection configuration, the service represents the cache server. Cacheable requests are sent by the cache redirection virtual server to the load balancing virtual server, which in turn forwards each request to the correct service, which passes it on to the cache server.
Configure an HTTP service by using the CLI
At the command prompt, type the following commands to create an HTTP service and verify the configuration:
- add service <name> <IP> <serviceType> <port> -cacheType <cacheType>
- show service [<name>]
<!--NeedCopy-->
Example:
> add service Service-HTTP-1 10.102.29.40 HTTP 80 -cacheType TRANSPARENT
Done
> show service Service-HTTP-1
Service-HTTP-1 (10.102.29.40:80) - HTTP
State: DOWN
Last state change was at Fri Jul 2 09:14:17 2010
Time since last state change: 0 days, 00:00:13.820
Server Name: 10.102.29.40
Server ID : 0 Monitor Threshold : 0
Max Conn: 0 Max Req: 0 Max Bandwidth: 0 kbits
Use Source IP: NO
Client Keepalive(CKA): NO
Access Down Service: NO
TCP Buffering(TCPB): NO
HTTP Compression(CMP): YES
Idle timeout: Client: 180 sec Server: 360 sec
Client IP: DISABLED
Cache Type: TRANSPARENT Redirect Mode:
Cacheable: NO
SC: OFF
SP: ON
Down state flush: ENABLED
1) Monitor Name: tcp-default
State: DOWN Weight: 1
Probes: 3 Failed [Total: 3 Current: 3]
Last response: Failure - Time out during TCP connection establishment stage
Response Time: N/A
Done
<!--NeedCopy-->
Modify or remove a service by using the CLI
- To modify a service, use the set service command, which is just like using the add service command, except that you enter the name of an existing service.
- To remove a service, use the
rm service
command, which accepts only the <name> argument.
Add an HTTP service by using the GUI
-
Navigate to Traffic Management > Load Balancing > Services
-
In the details pane, click Add.
-
In the Create Service dialog box, specify values for the following parameters as shown:
- Service Name*—name
- Server*— IP
- Port*—port
*A required parameter
-
In the Protocol* drop-down list, select a supported protocol (for example, HTTP).
-
Click Create, and then click Close.