RE: [Pound Mailing List] multiple URLs configured on Pound not working

Joe Gooch <[email protected]>
Newsgroups gmane.comp.web.pound.general
Message-ID <[email protected]>
Why would you want to do such a thing? ☺

I would think with that many lines, just doing the regular expressions is going to cause a noticeable performance hit.  I certainly haven’t tested with more than 3 or 4.  But pound puts them in a linked list, so it should handle whatever you supply.  No limit.  But if you give 1000 URLS, every request is going to have to call regex_match 1000 times.

This is why Robert said creating a proper pattern is the way to go.  Then it’s a single regex match.  (Albeit a complicated one… I’ve never benchmarked 1000 regex_matches vs a pattern with 1000 ors)

All my patch done is modify the Boolean behavior.

Joe



From: Qingshan Xie [mailto:[email protected]]
Sent: Monday, July 01, 2013 3:55 PM
To: Joe Gooch; '[email protected]'; 'Leo'
Subject: Re: [Pound Mailing List] multiple URLs configured on Pound not working

Thanks Joe.

how many lines of "URLMatch Or" can handle?  Can it goes to ~1000 lines or URLs?  I tested it with 350 lines of URLs, seems not working as expected.  Could you clarify it?

Thanks Again, Q.Xie

________________________________
From: Joe Gooch <[email protected]<mailto:[email protected]>>
To: 'Qingshan Xie' <[email protected]<mailto:[email protected]>>; "'[email protected]'" <[email protected]<mailto:[email protected]>>; 'Leo' <[email protected]<mailto:[email protected]>>
Sent: Monday, July 1, 2013 12:00 PM
Subject: RE: [Pound Mailing List] multiple URLs configured on Pound not working

URL “/A”
URL “/B”
URLMatch Or

Joe

From: Qingshan Xie [mailto:[email protected]]
Sent: Monday, July 01, 2013 2:59 PM
To: Joe Gooch; '[email protected]'; 'Leo'
Subject: Re: [Pound Mailing List] multiple URLs configured on Pound not working

Thanks Joe for your quick reply.

I downloaded v2.7b.zip, installed it, and tried URLMatch and Or like below, but it keeps throwing "unknown directive".   Could you tell me what is the right syntax for multiple URLs with OR relation?

 Service
          URLMatch "/A"  Or
          URLMatch "/B"
          BackEnd
                Address xxx.xx.xx.xxx
                 Port    84
          End
 End
Many Thanks,
Q.Xie
________________________________
From: Joe Gooch <[email protected]<mailto:[email protected]>>
To: 'Qingshan Xie' <[email protected]<mailto:[email protected]>>; "'[email protected]'" <[email protected]<mailto:[email protected]>>; 'Leo' <[email protected]<mailto:[email protected]>>
Sent: Monday, July 1, 2013 11:25 AM
Subject: RE: [Pound Mailing List] multiple URLs configured on Pound not working

You either need to run the stage for upstream v2.7b branch here:
https://github.com/goochjj/pound/archive/stage_for_upstream/v2.7b.zip

Or apply these two patches:
https://github.com/goochjj/pound/commit/14a59cf9811ce767f438d4a6b7d7a0c20b679881.diff
https://github.com/goochjj/pound/commit/cb72327e704a0c74ae7677714134b963b197ff03.diff

Joe

From: Qingshan Xie [mailto:[email protected]]
Sent: Monday, July 01, 2013 2:12 PM
To: [email protected]<mailto:[email protected]>; Leo; Joe Gooch
Subject: Re: [Pound Mailing List] multiple URLs configured on Pound not working

Thanks Leo for your help.
I went to Joe Gooch's site at https://github.com/goochjj/pound/, but did not see which patch I should download for configuring URLMatch And/Or.  Could you help me more to get install this patch?

Joe, If you see this email, could you give me the instruction to download your patch, install and configure URLMatch/Or?

Thanks, Q.Xie

________________________________
From: Leo <[email protected]<mailto:[email protected]>>
To: [email protected]<mailto:[email protected]>
Sent: Monday, July 1, 2013 12:28 AM
Subject: Re: [Pound Mailing List] multiple URLs configured on Pound not working

Hello Q.Xie,

we have had this discussion several times on the list. Robert Segall has already explained why multiple URLs are ANDed:

"There is a reason for it: it is easy to write an OR regular expression, but AND expressions can be more difficult."
(http://www.apsis.ch/pound/pound_list/archive/2013/2013-05/1367581651000/index_html#1367583174000)

If you want a different behaviour take a look at Joe Gooch's Pound patches. As far as I know he has written a patch to use a "URLMatch" directive with "AND"/"OR" value ... (https://github.com/goochjj/pound/)

Hope this helps!

Leo
On 06/29/2013 12:32 AM, Qingshan Xie wrote:
I realized it, the Multiple URLs are ANDed not ORed relation in Pound.  Not sure why Multiple URLs are designed as AND relation not OR?  At least from my experience OR relation should be available in Pound in order to split traffics.  For example a group applications have URLs /A, /B, /C, ....., and another group of apps have URLs /x, /y, /z, ......., but they share the same virtual.   it is very difficulty to manage thousands apps in a big company to use regx in one URL, especially this URLs may change frequently.    If Pound can handle multiple URLs in OR relation.  That will make this job much easier.

Thanks, Q.Xie


________________________________
From: Qingshan Xie <[email protected]><mailto:[email protected]>
To: "[email protected]"<mailto:[email protected]> <[email protected]><mailto:[email protected]>
Sent: Friday, June 28, 2013 11:53 AM
Subject: [Pound Mailing List] multiple URLs configured on Pound not working

Hello, expert,

    According to manual, Pound should be able to configure multiple URLs.  However, it failed when I tried to configure two URLs as below in service showed as below, but it worked if I remove on URL.
......
 Service
            URL "/ccivm0"
            URL "/ccivm4"
            BackEnd
                Address xxx.xx.x.xxx
                Port    84
            End
 End
......

am I configured it wrongly?  what is the right way to configure it?

Thanks, Q.Xie
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.