Discussion:
Redundant origin server support
Burak Sarp
2017-12-23 12:51:56 UTC
Permalink
Hi all,
Is there any way to cover origin server failover cases on ATS ?
I mean if origin server is down, ATS will try another origin server..
Thanks,Sarp
Miles Libbey
2017-12-23 16:06:54 UTC
Permalink
Hi Sarp-
I believe the way to do that purely in current ATS (eg, avoiding DNS)
is to configure parent.config with the destination hostname that you
need failover support.
https://docs.trafficserver.apache.org/en/7.1.x/admin-guide/files/parent.config.en.html

I've not used it (as we use smart DNS that does active health checks),
but, I believe the config would look like
remap.config
map http://example.com http://origin.example.com
parent.config
dest_domain=origin.example.com scheme=http
parent="igodown.origin.example.com:80" parent_is_proxy=false
parent_retry="Idontgodown.origin.example.com:80"
unavailable_server_retry_responses=502,503

records.config
CONFIG proxy.config.http.parent_proxy_routing_enable INT 1
Post by Burak Sarp
Hi all,
Is there any way to cover origin server failover cases on ATS ?
I mean if origin server is down, ATS will try another origin server..
Thanks,
Sarp
Leif Hedstrom
2017-12-23 16:07:27 UTC
Permalink
Yeh you can do this with parent.config or possibly the escalate plugin. I’d favor the former if possible, it has a new feature to go to an alternative parent/origin on specified errors, as well as load balancing etc.

— Leif
Post by Burak Sarp
Hi all,
Is there any way to cover origin server failover cases on ATS ?
I mean if origin server is down, ATS will try another origin server..
Thanks,
Sarp
Alan Carroll
2017-12-23 16:16:52 UTC
Permalink
You can also use DNS round robin along with setting the server retries to a
non-zero value.
Post by Leif Hedstrom
Yeh you can do this with parent.config or possibly the escalate plugin.
I’d favor the former if possible, it has a new feature to go to an
alternative parent/origin on specified errors, as well as load balancing
etc.
— Leif
Hi all,
Is there any way to cover origin server failover cases on ATS ?
I mean if origin server is down, ATS will try another origin server..
Thanks,
Sarp
Miles Libbey
2017-12-23 16:28:53 UTC
Permalink
Post by Alan Carroll
You can also use DNS round robin along with setting the server retries to a
non-zero value.
Will that "save" the first request to the dead origin? (or would the
error make its way back to the user?)
Post by Alan Carroll
Post by Leif Hedstrom
Yeh you can do this with parent.config or possibly the escalate plugin.
The escalate plugin works on missing objects, not dead servers. For
instance, perhaps origin1 periodically gets its data from
masterorigin, but, sometimes fails. The escalate plugin would have you
go to masterorigin when origin1 said it didn't have the content.
Post by Alan Carroll
Post by Leif Hedstrom
I’d favor the former if possible, it has a new feature to go to an
alternative parent/origin on specified errors, as well as load balancing
etc.
— Leif
Hi all,
Is there any way to cover origin server failover cases on ATS ?
I mean if origin server is down, ATS will try another origin server..
Thanks,
Sarp
John Rushford
2017-12-23 16:52:27 UTC
Permalink
We use parent.config to provide redundancy and load balance over origins.
See here for info on configuring parent.config.

https://docs.trafficserver.apache.org/en/latest/admin-guide/files/parent.config.en.html?highlight=parent%20config#std:configfile-parent.config <https://docs.trafficserver.apache.org/en/latest/admin-guide/files/parent.config.en.html?highlight=parent%20config#std:configfile-parent.config>
Post by Miles Libbey
Post by Alan Carroll
You can also use DNS round robin along with setting the server retries to a
non-zero value.
Will that "save" the first request to the dead origin? (or would the
error make its way back to the user?)
Post by Alan Carroll
Post by Leif Hedstrom
Yeh you can do this with parent.config or possibly the escalate plugin.
The escalate plugin works on missing objects, not dead servers. For
instance, perhaps origin1 periodically gets its data from
masterorigin, but, sometimes fails. The escalate plugin would have you
go to masterorigin when origin1 said it didn't have the content.
Post by Alan Carroll
Post by Leif Hedstrom
I’d favor the former if possible, it has a new feature to go to an
alternative parent/origin on specified errors, as well as load balancing
etc.
— Leif
Hi all,
Is there any way to cover origin server failover cases on ATS ?
I mean if origin server is down, ATS will try another origin server..
Thanks,
Sarp
Alan Carroll
2017-12-23 20:07:18 UTC
Permalink
If it's a GET, ATS should retry the request on the next available server.
POST is a bit trickier, ATS shouldn't retry if any bytes have been sent but
that won't be the case if the server is really dead and doesn't accept a
connection. There's a finish number of retries and if all of those fail,
the error will then go back to the user.

Will that "save" the first request to the dead origin? (or would the
Post by Miles Libbey
error make its way back to the user?)
Burak Sarp
2017-12-25 13:31:44 UTC
Permalink
Firstly thanks for advice,
we are trying to use parent.config, but we have problems on it.when trafficserver is up, it is direct going to parent origin server, I always see parent hit ats' access log while origin server is up on remap.config
our parent.config is
dest_ip=10.31.25.5 parent="10.31.25.6:80" parent_is_proxy=false round_robin=true parent_retry=unavailable_server_retry unavailable_server_retry_responses=500,502,503
our remap.config
map http://10.31.24.4/ http://10.31.25.5/ 
On Saturday, December 23, 2017, 7:52:34 PM GMT+3, John Rushford <***@gmail.com> wrote:

We use parent.config to provide redundancy and load balance over origins.See here for info on configuring parent.config.  
https://docs.trafficserver.apache.org/en/latest/admin-guide/files/parent.config.en.html?highlight=parent%20config#std:configfile-parent.config


On Dec 23, 2017, at 9:28 AM, Miles Libbey <***@apache.org> wrote:
On Sat, Dec 23, 2017 at 8:16 AM, Alan Carroll <***@oath.com> wrote:

You can also use DNS round robin along with setting the server retries to a
non-zero value.


Will that "save" the first request to the dead origin? (or would the
error make its way back to the user?)


On Sat, Dec 23, 2017 at 10:07 AM, Leif Hedstrom <***@apache.org> wrote:


Yeh you can do this with parent.config or possibly the escalate plugin.



The escalate plugin works on missing objects, not dead servers. For
instance, perhaps origin1 periodically gets its data from
masterorigin, but, sometimes fails. The escalate plugin would have you
go to masterorigin when origin1 said it didn't have the content.



I’d favor the former if possible, it has a new feature to go to an
alternative parent/origin on specified errors, as well as load balancing
etc.

— Leif

On Dec 23, 2017, at 5:51 AM, Burak Sarp <***@yahoo.com> wrote:

Hi all,

Is there any way to cover origin server failover cases on ATS ?

I mean if origin server is down, ATS will try another origin server..

Thanks,
Sarp
John Rushford
2017-12-25 14:14:26 UTC
Permalink
Is proxy.config.http.parent_proxy_routing_enable set to 1 in your records.config?

Sent from my iPad
Post by Burak Sarp
Firstly thanks for advice,
we are trying to use parent.config, but we have problems on it.
when trafficserver is up, it is direct going to parent origin server, I always see parent hit ats' access log while origin server is up on remap.config
our parent.config is
dest_ip=10.31.25.5 parent="10.31.25.6:80" parent_is_proxy=false round_robin=true parent_retry=unavailable_server_retry unavailable_server_retry_responses=500,502,503
our remap.config
map http://10.31.24.4/ http://10.31.25.5/
We use parent.config to provide redundancy and load balance over origins.
See here for info on configuring parent.config.
https://docs.trafficserver.apache.org/en/latest/admin-guide/files/parent.config.en.html?highlight=parent%20config#std:configfile-parent.config
Post by Miles Libbey
Post by Alan Carroll
You can also use DNS round robin along with setting the server retries to a
non-zero value.
Will that "save" the first request to the dead origin? (or would the
error make its way back to the user?)
Post by Alan Carroll
Post by Leif Hedstrom
Yeh you can do this with parent.config or possibly the escalate plugin.
The escalate plugin works on missing objects, not dead servers. For
instance, perhaps origin1 periodically gets its data from
masterorigin, but, sometimes fails. The escalate plugin would have you
go to masterorigin when origin1 said it didn't have the content.
Post by Alan Carroll
Post by Leif Hedstrom
I’d favor the former if possible, it has a new feature to go to an
alternative parent/origin on specified errors, as well as load balancing
etc.
— Leif
Hi all,
Is there any way to cover origin server failover cases on ATS ?
I mean if origin server is down, ATS will try another origin server..
Thanks,
Sarp
Burak Sarp
2017-12-25 15:23:07 UTC
Permalink
Yes, it is enabled.
Is ats ignored remap.config while parent is exist?


Sent from Yahoo Mail for iPhone


On Monday, December 25, 2017, 5:14 PM, John Rushford <***@gmail.com> wrote:

Is proxy.config.http.parent_proxy_routing_enable set to 1 in your records.config?

Sent from my iPad
On Dec 25, 2017, at 6:31 AM, Burak Sarp <***@yahoo.com> wrote:


Firstly thanks for advice,
we are trying to use parent.config, but we have problems on it.when trafficserver is up, it is direct going to parent origin server, I always see parent hit ats' access log while origin server is up on remap.config
our parent.config is
dest_ip=10.31.25.5 parent="10.31.25.6:80" parent_is_proxy=false round_robin=true parent_retry=unavailable_server_retry unavailable_server_retry_responses=500,502,503
our remap.config
map http://10.31.24.4/ http://10.31.25.5/ 
On Saturday, December 23, 2017, 7:52:34 PM GMT+3, John Rushford <***@gmail.com> wrote:

We use parent.config to provide redundancy and load balance over origins.See here for info on configuring parent.config.  
https://docs.trafficserver.apache.org/en/latest/admin-guide/files/parent.config.en.html?highlight=parent%20config#std:configfile-parent.config


On Dec 23, 2017, at 9:28 AM, Miles Libbey <***@apache.org> wrote:
On Sat, Dec 23, 2017 at 8:16 AM, Alan Carroll <***@oath.com> wrote:

You can also use DNS round robin along with setting the server retries to a
non-zero value.


Will that "save" the first request to the dead origin? (or would the
error make its way back to the user?)


On Sat, Dec 23, 2017 at 10:07 AM, Leif Hedstrom <***@apache.org> wrote:


Yeh you can do this with parent.config or possibly the escalate plugin.



The escalate plugin works on missing objects, not dead servers. For
instance, perhaps origin1 periodically gets its data from
masterorigin, but, sometimes fails. The escalate plugin would have you
go to masterorigin when origin1 said it didn't have the content.



I’d favor the former if possible, it has a new feature to go to an
alternative parent/origin on specified errors, as well as load balancing
etc.

— Leif

On Dec 23, 2017, at 5:51 AM, Burak Sarp <***@yahoo.com> wrote:

Hi all,

Is there any way to cover origin server failover cases on ATS ?

I mean if origin server is down, ATS will try another origin server..

Thanks,
Sarp
John Rushford
2017-12-25 18:23:00 UTC
Permalink
No, it does not ignore remap.config. Try turning on debug with “parent_select” and let’s see the logs. Your config looks good and should be working

Sent from my iPad
Post by Burak Sarp
Yes, it is enabled.
Is ats ignored remap.config while parent is exist?
Sent from Yahoo Mail for iPhone
Is proxy.config.http.parent_proxy_routing_enable set to 1 in your records.config?
Sent from my iPad
Post by Burak Sarp
Firstly thanks for advice,
we are trying to use parent.config, but we have problems on it.
when trafficserver is up, it is direct going to parent origin server, I always see parent hit ats' access log while origin server is up on remap.config
our parent.config is
dest_ip=10.31.25.5 parent="10.31.25.6:80" parent_is_proxy=false round_robin=true parent_retry=unavailable_server_retry unavailable_server_retry_responses=500,502,503
our remap.config
map http://10.31.24.4/ http://10.31.25.5/
We use parent.config to provide redundancy and load balance over origins.
See here for info on configuring parent.config.
https://docs.trafficserver.apache.org/en/latest/admin-guide/files/parent.config.en.html?highlight=parent%20config#std:configfile-parent.config
Post by Miles Libbey
Post by Alan Carroll
You can also use DNS round robin along with setting the server retries to a
non-zero value.
Will that "save" the first request to the dead origin? (or would the
error make its way back to the user?)
Post by Alan Carroll
Post by Leif Hedstrom
Yeh you can do this with parent.config or possibly the escalate plugin.
The escalate plugin works on missing objects, not dead servers. For
instance, perhaps origin1 periodically gets its data from
masterorigin, but, sometimes fails. The escalate plugin would have you
go to masterorigin when origin1 said it didn't have the content.
Post by Alan Carroll
Post by Leif Hedstrom
I’d favor the former if possible, it has a new feature to go to an
alternative parent/origin on specified errors, as well as load balancing
etc.
— Leif
Hi all,
Is there any way to cover origin server failover cases on ATS ?
I mean if origin server is down, ATS will try another origin server..
Thanks,
Sarp
John Rushford
2017-12-26 16:04:10 UTC
Permalink
Burak,



Your config looks good. If you turn on debug inrecords.config with a tag
of “parent_select”, we can see what’s going on. By default, go_direct in
parent.config is set to ‘true’ so, if there is a problem, connecting to
your parent, the transaction will go direct to the origin. Verify that you
are able to connect to the parent listed in parent.config. You can also
set parent_direct=false. It will then not go to the origin directly but,
if there is a problem connecting to the parent, you’ll get a 502.



If you get a chance, send along your debug logs and I’ll have a look.



*proxy.config.diags.debug.enabled INT 1*

*proxy.config.diags.debug.tags STRING “http*|parent_select”*
Post by John Rushford
No, it does not ignore remap.config. Try turning on debug with
“parent_select” and let’s see the logs. Your config looks good and should
be working
Sent from my iPad
Yes, it is enabled.
Is ats ignored remap.config while parent is exist?
Sent from Yahoo Mail for iPhone
<https://overview.mail.yahoo.com/?.src=iOS>
Is proxy.config.http.parent_proxy_routing_enable set to 1 in your records.config?
Sent from my iPad
Firstly thanks for advice,
we are trying to use parent.config, but we have problems on it.
when trafficserver is up, it is direct going to parent origin server, I
always see parent hit ats' access log while origin server is up on
remap.config
our parent.config is
dest_ip=10.31.25.5 parent="10.31.25.6:80" parent_is_proxy=false
round_robin=true parent_retry=unavailable_server_retry
unavailable_server_retry_responses=500,502,503
our remap.config
map http://10.31.24.4/ http://10.31.25.5/
On Saturday, December 23, 2017, 7:52:34 PM GMT+3, John Rushford <
We use parent.config to provide redundancy and load balance over origins.
See here for info on configuring parent.config.
https://docs.trafficserver.apache.org/en/latest/admin-
guide/files/parent.config.en.html?highlight=parent%
20config#std:configfile-parent.config
You can also use DNS round robin along with setting the server retries to a
non-zero value.
Will that "save" the first request to the dead origin? (or would the
error make its way back to the user?)
Yeh you can do this with parent.config or possibly the escalate plugin.
The escalate plugin works on missing objects, not dead servers. For
instance, perhaps origin1 periodically gets its data from
masterorigin, but, sometimes fails. The escalate plugin would have you
go to masterorigin when origin1 said it didn't have the content.
I’d favor the former if possible, it has a new feature to go to an
alternative parent/origin on specified errors, as well as load balancing
etc.
— Leif
Hi all,
Is there any way to cover origin server failover cases on ATS ?
I mean if origin server is down, ATS will try another origin server..
Thanks,
Sarp
--
John Rushford
***@gmail.com
Loading...