GitHub user jrushf1239k opened a pull request:

    https://github.com/apache/trafficserver/pull/283

    Multi site origin feature

    
    We have a use case where our linear video and video on demand origin 
servers are deployed to geographically dispersed data centers and we would like 
to use these origins for redundancy and load balancing.  I have added a feature 
to Apache traffic server that lets us use these redundant origins servers using 
the existing parent selection code.  I've added a new configuration parameter 
to Parent Selection, parent_is_proxy, which defaults to true.  When left at 
true, parent selection operates as it always has with parent proxies.  When set 
to false, this indicates that the parent is an origin server by setting the 
ParentResult type to a new enum value, PARENT_ORIGIN.  All the existing 
round_robin and consistent hashing algorithms function with this new feature 
and when a request is made to the origin, the HTTP Request is modified to 
remove the fully qualified hostname from the request if present and to send 
only the path in the request.  We now have these features in production in o
 ur CDN and are beginning to use the parent selection of origin servers for 
linear video delivery.
    
    Two additional features have been added that examine the Response from the 
origin.  These two features come with new configuration parameters in 
records.config that let you enable and configure them.  The features are called 
simple retry and dead server retry.  I've updated the documentation for 
records.config that describes these features.  They are for the case when an 
origin endpoint may not yet have the linear video fragment available yet when 
another origin may already have it.  Or for in the case when an origin endpoint 
may not be available due to maintenance.  Connection failures or timeouts work 
as they did previously.
    
    simple retry is enabled with this parameter:
    CONFIG proxy.config.http.parent_origin.simple_retry_enabled INT 1
    
    A comma separated list of response codes may be configured with this 
parameter, the default is 404:
    CONFIG proxy.config.http.parent_origin.simple_retry_response_codes STRING 
404
    
    When a response is received from the parent origin that matches an entry in 
the response codes list,
    the next parent is selected and the request is retried.  If all parents are 
tried without success, the final error response is sent to the client.
    
    The dead server retry is similar but marks failed parents as down.  The 
configuration parameters for this feature are here:
    
    CONFIG proxy.config.http.parent_origin.dead_server_retry_enabled INT 1
    CONFIG proxy.config.http.parent_origin.dead_server_retry_response_codes 
STRING 503,505
    
    The above is just an example, dead_server_retry_response_codes defaults to 
503.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jrushf1239k/trafficserver multi-site-origin

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafficserver/pull/283.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #283
    
----
commit ee589430e6c6eda02b44dffe4fa15ebe4d8e1aab
Author: John J. Rushford <[email protected]>
Date:   2015-08-25T17:02:08Z

    Modified RecordsConfig.cc and added simple and dead_server retry 
configuration parameters.

commit 1ac67edeb674c219e3be15bd68ada069d1c418b2
Author: John J. Rushford <[email protected]>
Date:   2015-08-25T21:39:56Z

    Updated ConsistentHash and ParentSelection for multi-site-origin.

commit 2e7b140e0177d071b744bf3529bf4b2bbf8e160a
Author: John J. Rushford <[email protected]>
Date:   2015-08-26T17:05:48Z

    Modified HttpTransact and HttpConfig for multi-site-origin.

commit e774e9ccb7e7839ed4d42ffc5bff066a6048ceb3
Author: John J. Rushford <[email protected]>
Date:   2015-08-27T14:24:23Z

    Added debug messages.

commit 6c2e194f5cff723b9513637b020959ef4bd18879
Author: John J. Rushford <[email protected]>
Date:   2015-08-27T14:26:44Z

    Merge branch 'master' into multi-site-origin

commit bd84a06b0beff5d007556197bdf07f985606d8a8
Author: John J. Rushford <[email protected]>
Date:   2015-08-27T15:19:54Z

    Updated the parent.config documentation.

commit 7c4876b0a8fb6b05f32629ddf6bb1d72b23333aa
Author: John J. Rushford <[email protected]>
Date:   2015-08-27T15:43:51Z

    update records.config documentation for dead_server and simple retry.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to