Skip to content

Conversation

@jrushford
Copy link
Contributor

This is a refactor of Parent Selection to add the following features:

  1. multi-site origin - using parent selection, origin servers may be selected using round robin or consistent hash algorithms.

  2. simple retry - if the parent is an origin server and a 404 response is received when this feature is enabled, the transaction will be retried using another parent. The user may define a list of response codes for simple retry. Both enabling and defining response codes may be done using header_rewrite on a delivery service basis.

  3. dead server retry - if the parent is an origin server and a 503 response is received when this feature is enabled, the current parent is marked down for 5 minutes and the transaction will be retried using another parent. The user may define a list of response codes for dead server retry. Both enabling and defining response codes may be done using header_rewrite on a delivery service basis.

  4. Added a secondary_parent list to parent.config when round_robin=consistent_hash. The secondary parents are added to a secondary hash ring for parent selection when a primary parent is down. In a cache hierarchy this would allow you to take advantage of another set of mid tier caches content affinity when a primary parent is down, see TS-3418.

I refactored Parent Selection using a Strategy design pattern where the Round robin and consistent hash implementations are in there own class. These strategy implementations are created per row in parent.config when the traffic server starts and reads the parent.config file. This refactor made it easier to add the secondary hash feature.

I plan on doing a presentation of all this at the ATS summit this month.

thanks

@jpeach
Copy link
Contributor

jpeach commented Nov 4, 2015

I think that we really need to break this feature down into smaller commits before we can digest and merge it. Right now the only way I can see doing it is if we squash it all into one or two very large commits, which is risky and hard to review and test. I'm happy to help break it down, grab me on IRC or at the summit.

@SolidWallOfCode
Copy link
Member

I am getting this compiler error when building -

../../proxy/ParentSelection.h:164:7: error: ‘class ParentSelectionStrategy’ has virtual functions and accessible non-virtual destructor [-Werror=non-virtual-dtor]
 class ParentSelectionStrategy

@jrushford
Copy link
Contributor Author

I fixed that, ParentSelectionStrategy now has a virtual destructor.

@jpeach
Copy link
Contributor

jpeach commented Nov 15, 2015

John and I spoke about how we can get this merged. The plan we came up with is to make a separate pull request that contains just the major strategy pattern refactoring with no changes in behavior. We can review and QA this change and it should be fine. Once that is in, we can add the changes that implement the features, and this code should be easier to review.

@asfgit asfgit closed this in 09a93ea Dec 18, 2015
@jrushford jrushford deleted the parent-selection-2.0 branch April 12, 2016 21:07
SolidWallOfCode pushed a commit to SolidWallOfCode/trafficserver that referenced this pull request Feb 1, 2017
YTSATS-1006 Toggling on/off wiretrace requires ATS restart
maskit pushed a commit to maskit/trafficserver that referenced this pull request Feb 2, 2017
* asf/master: (392 commits)
  Doh, chomp does not trim WS ...
  Make sure any trailing WS is removed from the Jira summary
  Change the changelog.pl script to use /usr/bin/env to find perl
  TS-4089: clang-format
  [TS-4091] addressing internal headers This close apache#387.
  TS-4089: Fixed coverity issues in parent selection.
  TS-4074: Escape backslashes in user/group/machine name
  TS-4043: Prevent bogus FQDN characters in host header This close apache#356.
  TS-3418: clang-format
  This closes apache#190.
  This closes apache#321.
  TS-4071: Unused mutex Diags::rotate_lock
  TS-3418: Various style fixes.
  TS-3418: Refactored parent selection to add a secondary parent consistent hash ring.
  This closes apache#368.
  TS-4084: Empty README.md file
  TS-4079: Support for arbitrary esi vars through HTTP request headers. This closes apache#378
  TS-3944: Add documentation for TSHttpTxnServerAddrSet to clarify when it must be called. This close apache#385.
  Clang format.
  TS-3908: Fix clang errors in WCCP.
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants