[Ultramonkey-l7-users 367] Re: how many modules can one port have?

Back to archive index

紅林 kureb****@oss*****
2010年 7月 20日 (火) 11:32:56 JST


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: ultra****@lists***** [mailto:ultra****@lists*****] On
> Behalf Of Kohei TANUMA
> Sent: Tuesday, July 20, 2010 11:15 AM
> To: Chen, Jiahui
> Cc: ultra****@lists*****
> 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
> Ultra****@lists*****
> http://lists.sourceforge.jp/mailman/listinfo/ultramonkey-l7-users





Ultramonkey-l7-users メーリングリストの案内
Back to archive index