|
| 1 | +{ |
| 2 | + "$schema": "http://json-schema.org/draft-06/schema#", |
| 3 | + "$id": "https://github.com/apache/trafficserver/tree/master/configs/strategies.schema.json", |
| 4 | + "$ref": "#/definitions/Strategies", |
| 5 | + "definitions": { |
| 6 | + "Strategies": { |
| 7 | + "type": "object", |
| 8 | + "additionalProperties": false, |
| 9 | + "properties": { |
| 10 | + "hosts": { |
| 11 | + "type": "array", |
| 12 | + "description": "An array of hosts assinged to a group", |
| 13 | + "items": { |
| 14 | + "$ref": "#/definitions/Host" |
| 15 | + } |
| 16 | + }, |
| 17 | + "groups": { |
| 18 | + "type": "array", |
| 19 | + "description": "A group otherwise known as a ring, is a collection of hosts", |
| 20 | + "items": { |
| 21 | + "type": "array", |
| 22 | + "items": { |
| 23 | + "$ref": "#/definitions/Group" |
| 24 | + } |
| 25 | + } |
| 26 | + }, |
| 27 | + "strategies": { |
| 28 | + "type": "array", |
| 29 | + "description": "A next hop selection strategy definition", |
| 30 | + "items": { |
| 31 | + "$ref": "#/definitions/Strategy" |
| 32 | + } |
| 33 | + } |
| 34 | + }, |
| 35 | + "required": [ |
| 36 | + "groups", |
| 37 | + "hosts", |
| 38 | + "strategies" |
| 39 | + ], |
| 40 | + "title": "Trafficserver Strategies" |
| 41 | + }, |
| 42 | + "Group": { |
| 43 | + "type": "object", |
| 44 | + "additionalProperties": false, |
| 45 | + "description": "A host member within a group or ring", |
| 46 | + "properties": { |
| 47 | + "host": { |
| 48 | + "type": "string", |
| 49 | + "description": "The hosts fully qualified hostname or IP address" |
| 50 | + }, |
| 51 | + "protocol": { |
| 52 | + "type": "array", |
| 53 | + "description": "The set of protocols supported on this host", |
| 54 | + "items": { |
| 55 | + "$ref": "#/definitions/Protocol" |
| 56 | + } |
| 57 | + }, |
| 58 | + "weight": { |
| 59 | + "type": "number", |
| 60 | + "description": "The optional weighting to apply for this host within a ring" |
| 61 | + } |
| 62 | + }, |
| 63 | + "required": [ |
| 64 | + "host", |
| 65 | + "protocol" |
| 66 | + ], |
| 67 | + "title": "Group" |
| 68 | + }, |
| 69 | + "Protocol": { |
| 70 | + "type": "object", |
| 71 | + "additionalProperties": false, |
| 72 | + "properties": { |
| 73 | + "scheme": { |
| 74 | + "$ref": "#/definitions/Scheme" |
| 75 | + }, |
| 76 | + "port": { |
| 77 | + "type": "integer", |
| 78 | + "description": "the protocol port number", |
| 79 | + "minimum": 80, |
| 80 | + "maximum": 65534 |
| 81 | + }, |
| 82 | + "health_check_url": { |
| 83 | + "type": "string", |
| 84 | + "description": "the optional url that may be used for a health checking system", |
| 85 | + "format": "uri", |
| 86 | + "qt-uri-protocols": [ |
| 87 | + "http", |
| 88 | + "https", |
| 89 | + "tcp" |
| 90 | + ] |
| 91 | + } |
| 92 | + }, |
| 93 | + "required": [ |
| 94 | + "port", |
| 95 | + "scheme" |
| 96 | + ], |
| 97 | + "title": "Protocol" |
| 98 | + }, |
| 99 | + "Host": { |
| 100 | + "type": "object", |
| 101 | + "additionalProperties": false, |
| 102 | + "properties": { |
| 103 | + "host": { |
| 104 | + "type": "string", |
| 105 | + "description": "The fully qualified host name or IP address of the host" |
| 106 | + }, |
| 107 | + "protocol": { |
| 108 | + "type": "array", |
| 109 | + "items": { |
| 110 | + "$ref": "#/definitions/Protocol" |
| 111 | + } |
| 112 | + } |
| 113 | + }, |
| 114 | + "required": [ |
| 115 | + "host", |
| 116 | + "protocol" |
| 117 | + ], |
| 118 | + "title": "Host" |
| 119 | + }, |
| 120 | + "Strategy": { |
| 121 | + "type": "object", |
| 122 | + "additionalProperties": false, |
| 123 | + "properties": { |
| 124 | + "strategy": { |
| 125 | + "type": "string", |
| 126 | + "description": "the name assigned to this strategy" |
| 127 | + }, |
| 128 | + "policy": { |
| 129 | + "type": "string", |
| 130 | + "description": "the host selection algorithm for the strategy", |
| 131 | + "enum": [ |
| 132 | + "rr_ip", |
| 133 | + "rr_strict", |
| 134 | + "first_live", |
| 135 | + "latched", |
| 136 | + "consistent_hash" |
| 137 | + ] |
| 138 | + }, |
| 139 | + "hash_key": { |
| 140 | + "type": "string", |
| 141 | + "description": "when using consistent_hash, this specifies the chosen key used for the hash", |
| 142 | + "enum": [ |
| 143 | + "hostname", |
| 144 | + "path", |
| 145 | + "path+query", |
| 146 | + "path+fragment", |
| 147 | + "cache_key", |
| 148 | + "url" |
| 149 | + ] |
| 150 | + }, |
| 151 | + "go_direct": { |
| 152 | + "type": "boolean", |
| 153 | + "description": "wether, true/false, users of the strategy may bypass parents and go directly to the origin" |
| 154 | + }, |
| 155 | + "parent_is_proxy": { |
| 156 | + "type": "boolean", |
| 157 | + "description": "all the hosts assigned to the strategy are all caching proxy servers" |
| 158 | + }, |
| 159 | + "cache_peer_result": { |
| 160 | + "type": "boolean", |
| 161 | + "description": "cache or do not cache proxy peer responses when using a peering ring mode and consistent hashing" |
| 162 | + }, |
| 163 | + "groups": { |
| 164 | + "type": "array", |
| 165 | + "description": "the groups of hosts assigned to the strategy", |
| 166 | + "items": { |
| 167 | + "type": "array", |
| 168 | + "items": { |
| 169 | + "$ref": "#/definitions/Group" |
| 170 | + } |
| 171 | + } |
| 172 | + }, |
| 173 | + "scheme": { |
| 174 | + "$ref": "#/definitions/Scheme" |
| 175 | + }, |
| 176 | + "failover": { |
| 177 | + "$ref": "#/definitions/Failover" |
| 178 | + } |
| 179 | + }, |
| 180 | + "required": [ |
| 181 | + "groups", |
| 182 | + "policy", |
| 183 | + "scheme", |
| 184 | + "strategy" |
| 185 | + ], |
| 186 | + "title": "Strategy" |
| 187 | + }, |
| 188 | + "Failover": { |
| 189 | + "type": "object", |
| 190 | + "description": "failover configuration for the strategy", |
| 191 | + "additionalProperties": false, |
| 192 | + "properties": { |
| 193 | + "max_simple_retries": { |
| 194 | + "type": "integer", |
| 195 | + "description": "the maximum number of retries for a transaction when using simple retry", |
| 196 | + "minimum": 0, |
| 197 | + "maximum": 5 |
| 198 | + }, |
| 199 | + "max_unavailable_retries": { |
| 200 | + "type": "integer", |
| 201 | + "description": "the maximum number of retries for a transaction when using unavailable server retry", |
| 202 | + "minimum": 0, |
| 203 | + "maximum": 5 |
| 204 | + }, |
| 205 | + "ring_mode": { |
| 206 | + "type": "string", |
| 207 | + "description": "the ring host selection mode", |
| 208 | + "enum": [ |
| 209 | + "exhaust_ring", |
| 210 | + "alternate_ring", |
| 211 | + "peering_ring" |
| 212 | + ] |
| 213 | + }, |
| 214 | + "response_codes": { |
| 215 | + "type": "array", |
| 216 | + "description": "list of simple retry http response codes", |
| 217 | + "items": { |
| 218 | + "type": "integer", |
| 219 | + "minimum": 400, |
| 220 | + "maximum": 599 |
| 221 | + } |
| 222 | + }, |
| 223 | + "markdown_codes": { |
| 224 | + "type": "array", |
| 225 | + "description": "list of unavailable server retry http response codes", |
| 226 | + "items": { |
| 227 | + "type": "integer", |
| 228 | + "minimum": 400, |
| 229 | + "maximum": 599 |
| 230 | + } |
| 231 | + }, |
| 232 | + "health_check": { |
| 233 | + "type": "array", |
| 234 | + "description": "the health checking mode used for the strategy", |
| 235 | + "items": { |
| 236 | + "type": "string", |
| 237 | + "enum": [ |
| 238 | + "active", |
| 239 | + "passive" |
| 240 | + ] |
| 241 | + } |
| 242 | + } |
| 243 | + }, |
| 244 | + "title": "Failover" |
| 245 | + }, |
| 246 | + "Scheme": { |
| 247 | + "type": "string", |
| 248 | + "description": "the supported protocols used within the strategy", |
| 249 | + "enum": [ |
| 250 | + "http", |
| 251 | + "https" |
| 252 | + ], |
| 253 | + "title": "Scheme" |
| 254 | + } |
| 255 | + } |
| 256 | +} |
0 commit comments