[GitHub] trafficserver pull request #1084: TS-4701: Add a new latched parent selectio...

2016-10-14 Thread jrushford
Github user jrushford closed the pull request at:

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


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver pull request #1084: TS-4701: Add a new latched parent selectio...

2016-10-06 Thread jrushford
Github user jrushford commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1084#discussion_r82292764
  
--- Diff: doc/admin-guide/files/parent.config.en.rst ---
@@ -207,6 +207,13 @@ The following list shows the possible actions and 
their allowed values.
The other traffic is unaffected. Once the downed parent becomes
available, the traffic distribution returns to the pre-down
state.
+- ``latched`` - The first parent in the list is marked as primary and 
is 
+  always chosen until connection errors cause it to be marked down.  
When 
+  this occurs the next parent in the list then becomes primary.  The 
primary
+  will wrap back to the first parent in the list when it is the last 
parent
+  in the list and is marked down due to a connection error.  Newly 
chosen
+  primary parents marked as unavilable will then be restored if the 
failure
--- End diff --

thanks, i've fixed that.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver pull request #1084: TS-4701: Add a new latched parent selectio...

2016-10-06 Thread jpeach
Github user jpeach commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1084#discussion_r82291438
  
--- Diff: doc/admin-guide/files/parent.config.en.rst ---
@@ -207,6 +207,13 @@ The following list shows the possible actions and 
their allowed values.
The other traffic is unaffected. Once the downed parent becomes
available, the traffic distribution returns to the pre-down
state.
+- ``latched`` - The first parent in the list is marked as primary and 
is 
+  always chosen until connection errors cause it to be marked down.  
When 
+  this occurs the next parent in the list then becomes primary.  The 
primary
+  will wrap back to the first parent in the list when it is the last 
parent
+  in the list and is marked down due to a connection error.  Newly 
chosen
+  primary parents marked as unavilable will then be restored if the 
failure
--- End diff --

s/unavilable/unavailable/


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver pull request #1084: TS-4701: Add a new latched parent selectio...

2016-10-06 Thread PSUdaemon
Github user PSUdaemon commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1084#discussion_r82288142
  
--- Diff: proxy/ParentSelection.h ---
@@ -59,12 +59,7 @@ enum ParentResultType {
   PARENT_FAIL,
 };
 
-enum ParentRR_t {
-  P_NO_ROUND_ROBIN = 0,
-  P_STRICT_ROUND_ROBIN,
-  P_HASH_ROUND_ROBIN,
-  P_CONSISTENT_HASH,
-};
+enum ParentRR_t { P_NO_ROUND_ROBIN = 0, P_STRICT_ROUND_ROBIN, 
P_HASH_ROUND_ROBIN, P_CONSISTENT_HASH, P_LATCHED_ROUND_ROBIN };
--- End diff --

Ok, I guess that is just an unfortunate name for that enum.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver pull request #1084: TS-4701: Add a new latched parent selectio...

2016-10-06 Thread jrushford
Github user jrushford commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1084#discussion_r82285415
  
--- Diff: proxy/ParentSelection.h ---
@@ -59,12 +59,7 @@ enum ParentResultType {
   PARENT_FAIL,
 };
 
-enum ParentRR_t {
-  P_NO_ROUND_ROBIN = 0,
-  P_STRICT_ROUND_ROBIN,
-  P_HASH_ROUND_ROBIN,
-  P_CONSISTENT_HASH,
-};
+enum ParentRR_t { P_NO_ROUND_ROBIN = 0, P_STRICT_ROUND_ROBIN, 
P_HASH_ROUND_ROBIN, P_CONSISTENT_HASH, P_LATCHED_ROUND_ROBIN };
--- End diff --

Oops, I'll fix that.  

The interfaces are defined in ParentSelection.h and the enum is used in 
both ParentSelection.cc, ParentConsistentHash.cc and ParentRoundRobin.cc all of 
which include ParentSelection.h


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver pull request #1084: TS-4701: Add a new latched parent selectio...

2016-10-06 Thread PSUdaemon
Github user PSUdaemon commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1084#discussion_r82283074
  
--- Diff: proxy/ParentSelection.h ---
@@ -59,12 +59,7 @@ enum ParentResultType {
   PARENT_FAIL,
 };
 
-enum ParentRR_t {
-  P_NO_ROUND_ROBIN = 0,
-  P_STRICT_ROUND_ROBIN,
-  P_HASH_ROUND_ROBIN,
-  P_CONSISTENT_HASH,
-};
+enum ParentRR_t { P_NO_ROUND_ROBIN = 0, P_STRICT_ROUND_ROBIN, 
P_HASH_ROUND_ROBIN, P_CONSISTENT_HASH, P_LATCHED_ROUND_ROBIN };
--- End diff --

@jpeach the previous form is the more desirable one, no?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver pull request #1084: TS-4701: Add a new latched parent selectio...

2016-10-06 Thread PSUdaemon
Github user PSUdaemon commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1084#discussion_r82281304
  
--- Diff: proxy/ParentSelection.h ---
@@ -59,12 +59,7 @@ enum ParentResultType {
   PARENT_FAIL,
 };
 
-enum ParentRR_t {
-  P_NO_ROUND_ROBIN = 0,
-  P_STRICT_ROUND_ROBIN,
-  P_HASH_ROUND_ROBIN,
-  P_CONSISTENT_HASH,
-};
+enum ParentRR_t { P_NO_ROUND_ROBIN = 0, P_STRICT_ROUND_ROBIN, 
P_HASH_ROUND_ROBIN, P_CONSISTENT_HASH, P_LATCHED_ROUND_ROBIN };
--- End diff --

What happened here?

Also, how come this isn't defined in `ParentRoundRobin.h`


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver pull request #1084: TS-4701: Add a new latched parent selectio...

2016-10-06 Thread jrushford
GitHub user jrushford opened a pull request:

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

TS-4701: Add a new latched parent selection strategy.

Add a new "latched" round  robin parent selection strategy.  A primary 
parent is chosen from the first parent in the parent list and is always 
returned as the resulting call to findParent().  When connection failure occurs 
and the primary parent is marked down, the state changes the primary to the 
next parent in the list and remains latched until the state is changed when a 
error causes the primary parent to be marked down.  

This strategy is helpful for delivery of live video.  A failure and switch 
to a new parent origin will cause a video client to retune as the manifest and 
video fragment names between origins are different.  With the other strategies, 
once the retry time for a marked down parent has elapsed, another switch and 
retune may occur.  To keep retunes to a minimum, this strategy "latches" state 
to always use the same healthy parent.

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

$ git pull https://github.com/jrushford/trafficserver TS-4701

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

https://github.com/apache/trafficserver/pull/1084.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 #1084


commit ebcf828ae6300db7d770abc35fef16a8b9c82e89
Author: John J. Rushford 
Date:   2016-10-06T20:22:59Z

TS-4701: Add a new latched parent selection strategy.




---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---