Thanks James, I was able to get ATS to work with regex_map as you suggested. It was fairly straight forward and answered my query.
Regards, Rakesh On Wed, Jan 8, 2014 at 11:31 PM, Rakesh G K <[email protected]> wrote: > Yes James, > I was trying out with that itself. Will post the results on the forum > after concluding on it tomorrow. Regex in the hostname can be used for the > origin-server URL as well right? > > > > On Wed, Jan 8, 2014 at 9:52 PM, James Peach <[email protected]> wrote: > >> On Jan 8, 2014, at 1:40 AM, Rakesh G K <[email protected]> wrote: >> >> > Thanks Leif. >> > But what i was trying to convey was a bit different. >> > I have 'n' ats nodes, 'm' tomcat instances and 'p' services offered by >> each of the tomcat servers. So instead of having 'n' X 'm' X 'p' different >> entries in the remap.config, I was wondering if it is possible to have just >> 'p' entries for each of the services, by somehow having a single identifier >> for the ats and a single identifier for any of the tomcat. >> > >> > Is this realizable? Or should all of these entries be mentioned?. >> >> Would the regex_map mapping type work for you? >> >> >> https://trafficserver.readthedocs.org/en/latest/reference/configuration/remap.config.en.html#regular-expression-regex-remap-support >> >> regex_map http://www.ats[0-9]+.com/origin http://www.example.com.origin >> >> > >> > -Rakesh >> > >> > >> > On Tue, Jan 7, 2014 at 10:40 PM, Leif Hedstrom <[email protected]> >> wrote: >> > >> > On Jan 7, 2014, at 5:10 AM, Rakesh G K <[email protected]> wrote: >> > >> >> Hello, >> >> >> >> When in a clustered mode deployment, I need to be able to map certain >> requests that an ats node receives to the origin server. >> >> When I have a load balancer fronting the cluster, there is no way of >> knowing which server which get what request. So assuming that there are 3 >> ats nodes, and a origin server URL, say http://www.example.com/origin, >> is there a better way of remapping this than what is written below? >> >> >> >> map http://www.ats1.com/origin http://www.example.com/origin >> >> map http://www.ats2.com/origin http://www.example.com/origin >> >> map http://www.ats3.com/origin http://www.example.com/origin >> >> >> >> I >> > >> > >> > This sounds like a case where you want to keep pristine Host headers >> across the board. That would imply making sure your origins can handle >> those “client” submitted Host: header, but would allow for a single, >> unified remap config across the board. Just make sure you have >> > >> > CONFIG proxy.config.url_remap.pristine_host_hdr INT 1 >> > >> > >> > That is the default as well. Now, I’m not a clustering expert, so maybe >> cluster doesn’t honor this. If it doesn’t, that smells like a bug to me. >> > >> > — Leif >> > >> > >> >> >
