From jiahui.chen ¡÷ verizon.com Wed Jul 21 00:01:25 2010 From: jiahui.chen ¡÷ verizon.com (Chen, Jiahui) Date: Tue, 20 Jul 2010 11:01:25 -0400 Subject: [Ultramonkey-l7-users 368] Re: how many modules can one port have? In-Reply-To: <7464CC5121B840E8A001A62ECFF3074D@D2PDV1BX> References: <2B19ADDD62A01149B514EFDC7FB4E0B304CA3984@FLDP1LUMXCV43.us.one.verizon.com> <4C4506B3.1000705@nttcom.co.jp> <7464CC5121B840E8A001A62ECFF3074D@D2PDV1BX> Message-ID: <2B19ADDD62A01149B514EFDC7FB4E0B304CA3B0B@FLDP1LUMXCV43.us.one.verizon.com> Thanks for the reply, I appreciate for your help To Kurebayashi, I am not sure about the keepalive cause I do not have the accout to access the real server. Actually, after I restarted the l7vsd once, the module from the l7directord.cf was gone, and I have not see it from then. To kouhei, I am not clear about this line: # l7vsadm -a -t 0:80 -m url --pattern-match 'pattern1' -r server1:80 # l7vsadm -A -t 0:80 -m url --pattern-match 'pattern2' . Do you mean adding the second pattern match after the server1:80 in the same line? I tried that but it only add the real server. If I put it in the other line, I can see the following result: # l7vsadm -K Layer-7 Virtual Server version 2.1.2-1 Prot LocalAddress:Port ProtoMod Scheduler Reschedule Protomod_key_string -> RemoteAddress:Port Forward Weight ActiveConn InactConn TCP 10.10.10.10:http url rr 0 --pattern-match /aaa/* -> server1:http Masq 1 0 0 TCP 10.10.10.10:http url rr 0 --pattern-match /bbb/* -> server2:http Masq 1 0 0 Then I send the request from my labtop browser to http://10.10.10,10/aaa/testfora.html it goes to server1 and testfora.html appears, but when I check the balancing status. Server1's ActiveConn increased. # l7vsadm -K Layer-7 Virtual Server version 2.1.2-1 Prot LocalAddress:Port ProtoMod Scheduler Reschedule Protomod_key_string -> RemoteAddress:Port Forward Weight ActiveConn InactConn TCP 10.10.10.10:http url rr 0 --pattern-match /aaa/* -> server1:http Masq 1 *1* 0 TCP 10.10.10.10:http url rr 0 --pattern-match /bbb/* -> server2:http Masq 1 0 0 Then I send the request to http://10.10.10.10/bbb/testforb.html it cannot access. And # l7vsadm -K remain the same, the inactConn does not increase. Any ideas? Thanks Jiahui -----Original Message----- From: ¹ÈÎÓ [mailto:kurebayashi.makoto ¡÷ oss.ntt.co.jp] Sent: Monday, July 19, 2010 10:33 PM To: Chen, Jiahui Cc: ultramonkey-l7-users ¡÷ lists.sourceforge.jp Subject: RE: [Ultramonkey-l7-users 366] Re: how many modules can one port have? Hi, Jiahui I think the HTTP KeepAlive(*1) is enabled on your real servers. *1 http://httpd.apache.org/docs/2.2/en/mod/core.html#keepalive When the "KeepAlive" setting is "On", the url module does not work properly (I believe it behave like you explained). If the "KeepAlive" setting is "Off", please show me your l7directord.cf file. Thanks, Kurebayashi > -----Original Message----- > From: ultramonkey-l7-users-bounces ¡÷ lists.sourceforge.jp > [mailto:ultramonkey-l7-users-bounces ¡÷ lists.sourceforge.jp] On Behalf > Of Kohei TANUMA > Sent: Tuesday, July 20, 2010 11:15 AM > To: Chen, Jiahui > Cc: ultramonkey-l7-users ¡÷ lists.sourceforge.jp > Subject: [Ultramonkey-l7-users 366] Re: how many modules can one port have? > > Hi, > > 2010/07/20 5:20, Chen, Jiahui wrote: > > When I use the url module pattern match, it seems only works for the > > first avalable pattern. For example, I set a pattern 'pattern1' to > > forward url to server 1 first and then 'pattern2' to forward url to > > server 2. Only the pattern 1 work ( the url can be forward to server > > 1 but can not to server 2 ). When I change the order, set 'pattern2' > > first and then 'pattern1', it only works for pattern2. If I set > > these two pattern to different ports, both work. Thus I want to know > > is there only > > 1 module works for 1 port? If not, how to set multiple modules on 1 port? > > It is possible. Create the virtual server as follows. > > # l7vsadm -A -t 0:80 -m url --pattern-match 'pattern1' > # l7vsadm -a -t 0:80 -m url --pattern-match 'pattern1' -r server1:80 # > l7vsadm -A -t 0:80 -m url --pattern-match 'pattern2' > # l7vsadm -a -t 0:80 -m url --pattern-match 'pattern2' -r server2:80 > > Now, 1 port(HTTP port) has 2 url modules. > > # l7vsadm -K > Layer-7 Virtual Server version 2.1.3-1 Prot LocalAddress:Port ProtoMod > Scheduler Reschedule Protomod_key_string > -> RemoteAddress:Port Forward Weight ActiveConn InactConn > TCP 0.0.0.0:http url rr 0 --pattern-match pattern1 > -> server1:http Masq 1 0 0 > TCP 0.0.0.0:http url rr 0 --pattern-match pattern2 > -> server2:http Masq 1 0 0 > > And then, send 'pattern1' request. This request will be send to server1. > > # links -dump http://localhost/pattern1.html > server1 sample content > > Check the balancing status. server1's InactConn should be increased. > > # l7vsadm -K > Layer-7 Virtual Server version 2.1.3-1 Prot LocalAddress:Port ProtoMod > Scheduler Reschedule Protomod_key_string > -> RemoteAddress:Port Forward Weight ActiveConn InactConn > TCP 0.0.0.0:http url rr 0 --pattern-match pattern1 > -> server1:http Masq 1 0 *1* > TCP 0.0.0.0:http url rr 0 --pattern-match pattern2 > -> server2:http Masq 1 0 0 > > Next, send 'pattern2' request. This request will be send to server2. > > # links -dump http://localhost/pattern2.html > server2 sample content > > Check the balancing status again. > server2's InactConn should be increased this time. > > # l7vsadm -K > Layer-7 Virtual Server version 2.1.3-1 Prot LocalAddress:Port ProtoMod > Scheduler Reschedule Protomod_key_string > -> RemoteAddress:Port Forward Weight ActiveConn InactConn > TCP 0.0.0.0:http url rr 0 --pattern-match pattern1 > -> server1:http Masq 1 0 1 > TCP 0.0.0.0:http url rr 0 --pattern-match pattern2 > -> server2:http Masq 1 0 *1* > > Thanks, > > Kohei > > _______________________________________________ > Ultramonkey-l7-users mailing list > Ultramonkey-l7-users ¡÷ lists.sourceforge.jp > http://lists.sourceforge.jp/mailman/listinfo/ultramonkey-l7-users