forked from apache/trafficserver
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adds a new peering ring mode to next hop selection strategies. (apa…
…che#7897) * Adds a new configuration parameter to the next hop strategies.yaml. The new config, cache_peer_result is enabled by default. When the setting is set to false, responses from peer hosts will not be cached locally. This config is used only for next hop strategies using a consistent_hash policy and a peering ring mode.
- Loading branch information
Showing
9 changed files
with
227 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
# @file | ||
# | ||
# Unit test data strategy.yaml file for testing the NextHopStrategyFactory | ||
# | ||
# @section license License | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# @section details Details | ||
# | ||
# | ||
# unit test 'peering' with combined hosts and strategies, peering.yaml example | ||
# | ||
hosts: | ||
- &p1 # shorthand name of host object, with an "anchor name" | ||
host: p1.bar.com # name or IP of host | ||
hash_string: slsklslsk # optional hash string that replaces the hostname in consistent hashing. | ||
protocol: | ||
- scheme: http | ||
port: 80 | ||
health_check_url: http://192.168.1.1:80 | ||
- scheme: https | ||
port: 443 | ||
health_check_url: https://192.168.1.1:443 | ||
- &p2 | ||
host: p2.bar.com | ||
protocol: | ||
- scheme: http | ||
port: 80 | ||
health_check_url: http://192.168.1.2:80 | ||
- scheme: https | ||
port: 443 | ||
health_check_url: https://192.168.1.2:443 | ||
- &p3 | ||
host: p3.bar.com | ||
protocol: | ||
- scheme: http | ||
port: 80 | ||
health_check_url: http://192.168.1.3:80 | ||
- scheme: https | ||
port: 443 | ||
health_check_url: https://192.168.1.3:443 | ||
- &p4 | ||
host: p4.bar.com | ||
protocol: | ||
- scheme: http | ||
port: 8080 | ||
health_check_url: http://192.168.1.4:8080 | ||
- scheme: https | ||
port: 8443 | ||
health_check_url: https://192.168.1.5:8443 | ||
- &m1 | ||
host: m1.bar.com | ||
protocol: | ||
- scheme: http | ||
port: 80 | ||
health_check_url: http://192.168.2.1:80 | ||
- scheme: https | ||
port: 443 | ||
health_check_url: https://192.168.2.1:443 | ||
- &m2 | ||
host: m2.bar.com | ||
protocol: | ||
- scheme: http | ||
port: 80 | ||
health_check_url: http://192.168.2.2:80 | ||
- scheme: https | ||
port: 443 | ||
health_check_url: https://192.168.2.2:443 | ||
- &m3 | ||
host: m3.bar.com | ||
protocol: | ||
- scheme: http | ||
port: 80 | ||
health_check_url: http://192.168.2.3:80 | ||
- scheme: https | ||
port: 443 | ||
health_check_url: https://192.168.2.3:443 | ||
groups: | ||
- &g1 | ||
- <<: *p1 | ||
weight: 0.25 | ||
- <<: *p2 | ||
weight: 0.25 | ||
- <<: *p2 | ||
weight: 0.25 | ||
- <<: *p3 | ||
weight: 0.25 | ||
- &g2 | ||
- <<: *m1 | ||
weight: 0.33 | ||
- <<: *m2 | ||
weight: 0.33 | ||
- <<: *m3 | ||
weight: 0.33 | ||
strategies: | ||
- strategy: "peering-group-1" | ||
policy: consistent_hash | ||
go_direct: false | ||
parent_is_proxy: true | ||
cache_peer_result: false | ||
groups: | ||
- *g1 | ||
- *g2 | ||
scheme: http | ||
failover: | ||
max_simple_retries: 2 | ||
ring_mode: | ||
peering_ring | ||
response_codes: # defines the responses codes for failover in exhaust_ring mode | ||
- 404 | ||
health_check: # specifies the list of healthchecks that should be considered for failover. A list of enums: 'passive' or 'active' | ||
- passive | ||
- active |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters