-
Notifications
You must be signed in to change notification settings - Fork 851
Parent selection 2.0 #321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parent selection 2.0 #321
Conversation
…erver retry pull request.
…erver retry pull request.
…etry configuration information.
|
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. |
|
I am getting this compiler error when building - |
|
I fixed that, ParentSelectionStrategy now has a virtual destructor. |
…g fixes a seg fault in get_ka_info_from_config().
|
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. |
YTSATS-1006 Toggling on/off wiretrace requires ATS restart
* 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. ...
This is a refactor of Parent Selection to add the following features:
multi-site origin - using parent selection, origin servers may be selected using round robin or consistent hash algorithms.
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.
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.
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