-
Notifications
You must be signed in to change notification settings - Fork 851
Adds a new peering ring mode to next hop selection strategies. #7897
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it possible that the upstream group uses a VIP? In that case would the upstream group just have one member, the VIP hostname?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure that's possible but, that vip should be added to the 2nd group and it's fine if it only has one member. Are you asking for a change in the documentation @ywkaras ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No that's fine as long as a group is allowed to have a one member that should handle the upstream VIP case.