-
Notifications
You must be signed in to change notification settings - Fork 857
Adds support for a YAML formatted parent.config file. #4857
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
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,165 @@ | ||
| { | ||
| "title": "Traffic Server parents configuration", | ||
| "description": "parent configuration file structure. Licensed under Apache V2 https://www.apache.org/licenses/LICENSE-2.0", | ||
| "type": "object", | ||
| "properties": { | ||
| "parents": { | ||
| "type": "array", | ||
| "uniqueItems": true, | ||
| "items": { | ||
| "type": "object", | ||
| "properties": { | ||
| "dest_domain": { | ||
| "description": "A requested domain name, and its subdomains.", | ||
| "type": "string" | ||
| }, | ||
| "dest_host": { | ||
| "description": "A requested hostname.", | ||
| "type": "string" | ||
| }, | ||
| "dest_ip": { | ||
| "description": "A requested IP address or range of IP addresses separated by a dash (-)..", | ||
| "type": "string" | ||
| }, | ||
| "url_regex": { | ||
| "description": "A regular expression (regex) to be found in a URL.", | ||
| "type": "string" | ||
| }, | ||
| "internal": { | ||
| "description": "A boolean value, true or false, specifying if the rule should match (or not match) a transaction originating from an internal API.", | ||
| "type": "boolean" | ||
| }, | ||
| "go_direct": { | ||
| "description": "send the request directly to the origin bypassing the parent list.", | ||
| "type": "boolean" | ||
| }, | ||
| "max_simple_retries": { | ||
| "description": "The maximum number of retries for a simple retry.", | ||
| "type": "number", | ||
| "minimum": 1, | ||
| "maximum": 5 | ||
| }, | ||
| "max_unavailable_server_retries": { | ||
| "description": "The maximum number of retries for an unavailable server retry.", | ||
| "type": "number", | ||
| "minimum": 1, | ||
| "maximum": 5 | ||
| }, | ||
| "method": { | ||
| "description": "A request URL method", | ||
| "type": "string", | ||
| "enum": [ | ||
| "get", | ||
| "post", | ||
| "put", | ||
| "trace" | ||
| ] | ||
| }, | ||
| "parent_retry": { | ||
| "description": "Use one or both of 'simple_retry', or 'unavailable_server_retry'", | ||
| "type": "string", | ||
| "enum": [ | ||
| "simple_retry", | ||
| "unavailable_server_retry", | ||
| "both" | ||
| ] | ||
| }, | ||
| "parent_is_proxy": { | ||
| "description": "The parents listed in parent and secondary_parent are caching proxies, set to false if they are origins", | ||
| "type": "boolean" | ||
| }, | ||
| "port": { | ||
| "description": "A requested URL port.", | ||
| "type": "number" | ||
| }, | ||
| "prefix": { | ||
| "description": "A prefix in the path part of a URL.", | ||
| "type": "string" | ||
| }, | ||
| "qstring": { | ||
| "description": "use or ignore the query string when looking up a parent with consistent_hash", | ||
| "type": "string", | ||
| "enum": [ | ||
| "consider", | ||
| "ignore" | ||
| ] | ||
| }, | ||
| "round_robin": { | ||
| "description": "select to use one of the parent strategy algorithms, default is 'false'", | ||
| "enum": [ | ||
| "true", | ||
| "false", | ||
| "strict", | ||
| "consistent_hash", | ||
| "latched" | ||
| ] | ||
| }, | ||
| "scheme": { | ||
| "description": "A request URL method.", | ||
| "type": "string", | ||
| "enum": [ | ||
| "http", | ||
| "https" | ||
| ] | ||
| }, | ||
| "secondary_mode": { | ||
| "description": "The secondary parent list mode (see parent.config doc), defaults to 1.", | ||
| "type": "number", | ||
| "minimum": 1, | ||
| "maximum": 3 | ||
| }, | ||
| "src_ip": { | ||
| "description": "A client IP address.", | ||
| "type": "string" | ||
| }, | ||
| "suffix": { | ||
| "description": "A file suffix in the URL.", | ||
| "type": "string" | ||
| }, | ||
| "time": { | ||
| "description": "A time range, such as 08:00-14:00, during which the parent cache is used to serve requests.", | ||
| "type": "string" | ||
| }, | ||
| "parent": { | ||
| "description": "list of primary parents", | ||
| "type": "string" | ||
| }, | ||
| "secondary_parent": { | ||
| "description": "list of secondary parents", | ||
| "type": "string" | ||
| }, | ||
| "unavailable_server_retry_responses": { | ||
| "description": "When using unavailable_server retry, use this to specify a csv separated list of 5xx resposne codes, default is '503'", | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "oneOf": [ | ||
| { | ||
| "required": [ | ||
| "dest_domain" | ||
| ] | ||
| }, | ||
| { | ||
| "required": [ | ||
| "dest_host" | ||
| ] | ||
| }, | ||
| { | ||
| "required": [ | ||
| "dest_ip" | ||
| ] | ||
| }, | ||
| { | ||
| "required": [ | ||
| "url_regex" | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| }, | ||
| "additionalProperties": false, | ||
| "required": [ | ||
| "parents" | ||
| ] | ||
| } | ||
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,79 @@ | ||
| # | ||
| # parent.yaml | ||
| # | ||
| # Documentation: | ||
| # https://docs.trafficserver.apache.org/en/latest/admin-guide/files/parent.config.en.html | ||
| # | ||
| # The purpose of this file is to specify the parent proxy for | ||
| # specific objects or sets of objects | ||
| # | ||
| # This is the yaml version of the parent.config. Set 'proxy.config.http.parent_proxy.file' | ||
| # to 'parent.yaml' to use a yaml formatted configuration, ie: | ||
| # | ||
| # CONFIG proxy.config.http.parent_proxy.file STRING parent.yaml | ||
| # | ||
| # All entries are part of a yaml sequence, both sequence formats are supported, see below. | ||
| # | ||
| # Each record must include exactly one primary specifier | ||
| # | ||
| # Primary destination specifiers are | ||
| # dest_domain: | ||
| # dest_host: | ||
| # dest_ip: | ||
| # url_regex: | ||
| # | ||
| # | ||
| # record may include any number of the secondary specifiers but | ||
| # secondary specifiers may not be duplicated in the same record | ||
| # | ||
| # Secondary specifiers are | ||
| # port: | ||
| # scheme: | ||
| # prefix: | ||
| # suffix: | ||
| # method: | ||
| # time: | ||
| # src_ip: | ||
| # internal: {true,false} | ||
| # | ||
| # Available parent directives are: | ||
| # parent: (a semicolon separated list of parent proxies) | ||
| # go_direct: {true,false} | ||
| # round_robin: {strict,true,false,consistent_hash,latched} | ||
| # | ||
| # Note: for round_robin, strict means strict round_robin - parents are | ||
| # tried one by one, true means round_robin based on client IP | ||
| # addresses, false means no round_robin, consisten_hash means a hash | ||
| # algorithm over the url path is used, latched is the same as false | ||
| # but will stay latched to a selected parent until it is marked down. | ||
| # | ||
| # Each line must include a parent: directive or a go_direct: | ||
| # directive. If both appear, Traffic Server will directly | ||
| # contact the origin server if all the listed parent proxies | ||
| # are down | ||
| # | ||
| # Example for two records one in two different yaml sequence formats: | ||
| # | ||
| # Alternate requests between proxy1 and proxy2 | ||
| # | ||
| # Sequence Format 1 (2 entries), most readable, dashes matter: | ||
| # | ||
| # - { dest_domain: "stooges.net", parent: "curly:80|1.0;joe:80|1.0;larry:80|1.0", | ||
| # round_robin: "consistent_hash", go_direct: true} | ||
| # - { dest_domain: "lucy.net", parent: "ethel:80|1.0;fred:80|1.0;ricky:80|1.0", | ||
| # roun_robin: "true", go_direct: false} | ||
| # | ||
| # Sequence Format 2 (two entries), tabs and dashes matter. | ||
| # | ||
| # - | ||
| # dest_domain: "stooges.net" | ||
| # parent: "curly:80|1.0;joe:80|1.0;larry:80|1.0" | ||
| # round_robin: "consistent_hash" | ||
| # go_direct: true | ||
| # - | ||
| # dest_domain: "lucy.net" | ||
| # parent: "ethel:80|1.0;fred:80|1.0;ricky:80|1.0" | ||
| # roun_robin: "true" | ||
| # go_direct: false | ||
| # | ||
| # |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.