trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Jackson <jacksontj...@gmail.com>
Subject Re: Remap/regex_remap consolidation
Date Wed, 26 Mar 2014 18:31:20 GMT
The biggest performance gain I see of separate regexes is that I can
execute the unique domain regexes which should resolve to a list of path
regexes. This should be pretty big performance wise as a lot of rules in
large remaps have the same domain which may or may not be a regex.
On Mar 26, 2014 6:20 AM, "Leif Hedstrom" <zwoop@apache.org> wrote:

>
>
> > On Mar 26, 2014, at 2:02 AM, Brian Geffon <briang@apache.org> wrote:
> >
> > Thomas, I somewhat agree: my guess would be the additional regexes would
> > likely cancel any performance gain there.
> >
> > Does anyone else have feedback or comments?
>
>
> The other argument for this is that with separate regexes, you don't have
> to create the full URL string representation. I don't know if the core has
> any optimizations here, but for a plugin that is an expensive operation.
> With separate regexes for host and path, this is a non-issue.
>
> Maybe you can do separate regexes but let expansions cross over? $h[1] for
> a host group etc.
>
> Pros and cons :)
>
> -- Leif
>
> >
> > Brian
> >
> >> On Tuesday, March 25, 2014, Thomas Jackson <jacksontj.89@gmail.com>
> wrote:
> >>
> >> Another consideration for having >1 regex (which may or may not be
> >> premature optimization) is that if you have seperate regexes we can
> create
> >> hash maps similar to how maps work (a hashmap of domain_regex -> list of
> >> path regexes) which would make overall remap performance faster/better.
> >>
> >>
> >> On Tue, Mar 25, 2014 at 9:50 PM, Brian Geffon <briang@apache.org
> <javascript:_e(%7B%7D,'cvml','briang@apache.org');>
> >>> wrote:
> >>
> >>> Right.
> >>>
> >>>
> >>> On Tuesday, March 25, 2014, Leif Hedstrom <zwoop@apache.org
> <javascript:_e(%7B%7D,'cvml','zwoop@apache.org');>>
> >>> wrote:
> >>>
> >>>>
> >>>>> On Mar 25, 2014, at 7:51 PM, Brian Geffon <briangeffon@gmail.com>
> wrote:
> >>>>>
> >>>>> What Thomas called Question #1 -- 1 Regex.
> >>>>
> >>>> Makes sense to have them combined. Assuming groups etc. works, that
> >>>> allows you to do e.g.
> >>>>
> >>>>   regex_map http://(.*)\.ogre\.com/([^/]+)/(.*)  http://$2/$1/$3
> >>>>
> >>>>
> >>>> or some such. i.e. take parts from the path match and use as the host,
> >>>> and vice versa. Right? :)
> >>>>
> >>>> Cheers,
> >>>>
> >>>> -- Leif
> >>
>

Mime
View raw message