Redundant origin server support

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Redundant origin server support

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
Reply | Threaded
Open this post in threaded view
|

Re: Redundant origin server support

Miles Libbey
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


On Sat, Dec 23, 2017 at 4:51 AM, Burak Sarp <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: Redundant origin server support

Leif Hedstrom
In reply to this post by Burak Sarp
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 

On Dec 23, 2017, at 5:51 AM, Burak Sarp <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: Redundant origin server support

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

On Sat, Dec 23, 2017 at 10:07 AM, Leif Hedstrom <[hidden email]> wrote:
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 

On Dec 23, 2017, at 5:51 AM, Burak Sarp <[hidden email]> 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

Reply | Threaded
Open this post in threaded view
|

Re: Redundant origin server support

Miles Libbey
On Sat, Dec 23, 2017 at 8:16 AM, Alan Carroll <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Redundant origin server support

John Rushford
We use parent.config to provide redundancy and load balance over origins.
See here for info on configuring parent.config.  

<a href="https://docs.trafficserver.apache.org/en/latest/admin-guide/files/parent.config.en.html?highlight=parent config#std:configfile-parent.config" class="">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 <[hidden email]> wrote:

On Sat, Dec 23, 2017 at 8:16 AM, Alan Carroll <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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



Reply | Threaded
Open this post in threaded view
|

Re: Redundant origin server support

Alan Carroll-2
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
error make its way back to the user?)

Reply | Threaded
Open this post in threaded view
|

Re: Redundant origin server support

Burak Sarp
In reply to this post by John Rushford
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


On Saturday, December 23, 2017, 7:52:34 PM GMT+3, John Rushford <[hidden email]> wrote:


We use parent.config to provide redundancy and load balance over origins.
See here for info on configuring parent.config.  

<a rel="nofollow" shape="rect" class="yiv8329277169" target="_blank" href="https://docs.trafficserver.apache.org/en/latest/admin-guide/files/parent.config.en.html?highlight=parent config#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

On Dec 23, 2017, at 9:28 AM, Miles Libbey <[hidden email]> wrote:

On Sat, Dec 23, 2017 at 8:16 AM, Alan Carroll <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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



Reply | Threaded
Open this post in threaded view
|

Re: Redundant origin server support

John Rushford
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 <[hidden email]> 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


On Saturday, December 23, 2017, 7:52:34 PM GMT+3, John Rushford <[hidden email]> wrote:


We use parent.config to provide redundancy and load balance over origins.
See here for info on configuring parent.config.  

<a rel="nofollow" shape="rect" class="yiv8329277169" target="_blank" href="https://docs.trafficserver.apache.org/en/latest/admin-guide/files/parent.config.en.html?highlight=parent config#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

On Dec 23, 2017, at 9:28 AM, Miles Libbey <[hidden email]> wrote:

On Sat, Dec 23, 2017 at 8:16 AM, Alan Carroll <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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



Reply | Threaded
Open this post in threaded view
|

Re: Redundant origin server support

Burak Sarp
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 <[hidden email]> 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 <[hidden email]> 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 <a rel="nofollow" shape="rect" target="_blank" onclick="return window.theMainWindow.showLinkWarning(this)" href="http://10.31.24.4">http://10.31.24.4/ <a rel="nofollow" shape="rect" target="_blank" onclick="return window.theMainWindow.showLinkWarning(this)" href="http://10.31.25.5">http://10.31.25.5/ 

On Saturday, December 23, 2017, 7:52:34 PM GMT+3, John Rushford <[hidden email]> wrote:


We use parent.config to provide redundancy and load balance over origins.
See here for info on configuring parent.config.  

<a rel="nofollow" shape="rect" class="yiv4780540909" target="_blank" href="https://docs.trafficserver.apache.org/en/latest/admin-guide/files/parent.config.en.html?highlight=parent config#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

On Dec 23, 2017, at 9:28 AM, Miles Libbey <[hidden email]> wrote:

On Sat, Dec 23, 2017 at 8:16 AM, Alan Carroll <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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



Reply | Threaded
Open this post in threaded view
|

Re: Redundant origin server support

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

On Dec 25, 2017, at 8:23 AM, Burak Sarp <[hidden email]> wrote:

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 <[hidden email]> 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 <[hidden email]> 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


On Saturday, December 23, 2017, 7:52:34 PM GMT+3, John Rushford <[hidden email]> wrote:


We use parent.config to provide redundancy and load balance over origins.
See here for info on configuring parent.config.  

<a rel="nofollow" shape="rect" class="yiv4780540909" target="_blank" href="https://docs.trafficserver.apache.org/en/latest/admin-guide/files/parent.config.en.html?highlight=parent config#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

On Dec 23, 2017, at 9:28 AM, Miles Libbey <[hidden email]> wrote:

On Sat, Dec 23, 2017 at 8:16 AM, Alan Carroll <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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



Reply | Threaded
Open this post in threaded view
|

Re: Redundant origin server support

John Rushford

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”


[hidden email]



On Mon, Dec 25, 2017 at 11:23 AM, John Rushford <[hidden email]> wrote:
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

On Dec 25, 2017, at 8:23 AM, Burak Sarp <[hidden email]> wrote:

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 <[hidden email]> 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 <[hidden email]> 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


On Saturday, December 23, 2017, 7:52:34 PM GMT+3, John Rushford <[hidden email]> 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 <[hidden email]> wrote:

On Sat, Dec 23, 2017 at 8:16 AM, Alan Carroll <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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
[hidden email]