KTCPVS PHTTP

From LVSKB
Revision as of 03:34, 14 October 2006 by Wensong (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Introduction

The phttp scheduler in KTCPVS has persistent connection support between clients and KTCPVS load balancer, it to assign HTTP requests to web servers according to the specified content-based scheduling rules in regular expression.

Using the KTCPVS PHTTP scheduler

Using the KTCPVS PHTTP scheduler is quite similar to that of the KTCPVS HTTP scheduler.

In the example, there are three web servers, web1, web2 and web3. web1 is used for serving images, web2 is for static pages, web3 is for the rest. The tcpvsadm commands of this example are as follows:

 tcpvsadm -A -i http -s phttp
 tcpvsadm -a -i http -r web1:80
 tcpvsadm -a -i http -r web2:80
 tcpvsadm -a -i http -r web3:80
 tcpvsadm --add-rule -i http --pattern=/images/.* -r web1:80
 tcpvsadm --add-rule -i http --pattern=/html/.* -r web2:80
 tcpvsadm --add-rule -i http --pattern=.* -r web3:80