You may want two consider running two containers on the same machine and 
handling your need of two ATS instances via orchestration…it’s a far more 
elegant and scalable solution



Steve Lerner | Principal Architect, Network Operations | m 212.495.9212 | 
[email protected]<mailto:[email protected]>
[cid:[email protected]]

From: salil GK <[email protected]>
Reply-To: "[email protected]" <[email protected]>
Date: Wednesday, February 8, 2017 at 9:31 AM
To: "[email protected]" <[email protected]>
Subject: Re: Trying to run two instances of traffic servers in same machine

Thanks for the suggestion 'Rebirthing'. Yes this may work - but looks a bit 
untidy :-( ..  two installations of same program in a machine looks bad !

On 8 February 2017 at 08:02, Rebirthing 
<[email protected]<mailto:[email protected]>> wrote:
I didn't check this.

Anyway.. In my guess, this could work!

1. Build the source with A directory base(ex. '/opt/ts1/')
2. Install it
3. Build the source with B directory base(ex. '/opt/ts2/')
4. Install it
5. Config ts1&ts2 properly to prevent conflict(ex. ports).
6. Run them!

the locks of instances will be made in each directory base.

Thus it may work well.

Maybe... not :(

Thank you



2017-02-07 12:35 GMT+09:00 James Peach 
<[email protected]<mailto:[email protected]>>:

> On Feb 6, 2017, at 6:05 AM, salil GK 
> <[email protected]<mailto:[email protected]>> wrote:
>
> Thanks James for the reply.
>
> Over riding the config variable through environment is a good and nice option.
> But another problem is how do I over ride the location of server.lock file  - 
> there is no way I can specify this. What happens is - second instance also 
> try to use the same server.lock file and it fails .

This is controlled by proxy.config.local_state_dir and/or TS_ROOT. Fot example:

$ /opt/ats/bin/traffic_layout | grep RUNTIMEDIR
RUNTIMEDIR: /opt/ats/var/trafficserver
$ TS_ROOT=/instance /opt/ats/bin/traffic_layout | grep RUNTIMEDIR
RUNTIMEDIR: /instance/var/trafficserver
$ PROXY_CONFIG_LOCAL_STATE_DIR=/var/instance/foo /opt/ats/bin/traffic_layout | 
grep RUNTIMEDIR
RUNTIMEDIR: /var/instance/foo


> Regards
> ~S
>
> On 28 December 2016 at 04:51, James Peach 
> <[email protected]<mailto:[email protected]>> wrote:
>
> > On Dec 20, 2016, at 7:19 PM, salil GK 
> > <[email protected]<mailto:[email protected]>> wrote:
> >
> > Hello
> >
> >    I am trying to run two instances of the traffic servers in the same 
> > server. I found it a bit tricky as the configuration and management ( locks 
> > etc ) files locations are like hard coded ( not sure though ). Could some 
> > one please give some tips on how this can be achieved.
>
> This should work fine, though the details are a little subtle.
>
> First, you can use the TS_ROOT environment variable to specify the 
> installation prefix (what you passed to configure —prefix) at runtime, Next, 
> you can override al the paths to various configuration files and directories 
> at runtime by setting the record value in the environment,
>
> https://docs.trafficserver.apache.org/en/latest/admin-guide/files/records.config.en.html#environment-overrides
>
> https://docs.trafficserver.apache.org/en/latest/admin-guide/files/records.config.en.html#proxy-config-config-dir
>
> Finally, traffic_manager listens on local ports, so you need to make sure 
> they don’t collide for each instance. See proxy.config.admin.synthetic_port 
> and proxy.config.process_manager.mgmt_port.
>
> >
> >    My requirement can be summarised as below.
> >
> > 1. I two servers in DMZ zone ( May machine B and machine C )
> > 2. I have one machine ( client ) inside enterprise (machine A ) and one 
> > server in the internet ( Machine D )
> > 3. I want to send a message ( or rather forward ) from Machine A ( enter 
> > prise ) to MAchine D ( internet ) through Machine B and Machine C.
> > 4 there is already ATS running in Machine B and Machine C as reverse proxy.
> > 5. I want to do Mutual TLS verification between Machine B and Machine A
> >
> >
> > in a nutshell
> >
> > A  ->  B  ->  C  ->  D
> >
> > A is in enterprise
> > B and  C are ATS  ( one instance of ATS is already there as reverse proxy )
> > D is in internet
> >
> > A and B mutual TLS
> >
> >
> > Could you please help me out here on how to set this up. Or is there any 
> > pressing reason why I cannot make this setup work ?
> >
> > Thanks a ton in advance
>
>


Reply via email to