apache / trafficcontrol

Apache Traffic Control is an Open Source implementation of a Content Delivery Network
https://trafficcontrol.apache.org/
Apache License 2.0
1.02k stars 339 forks source link

TC or T3C should check simple retry amount vs # of parents #6672

Open ezelkow1 opened 2 years ago

ezelkow1 commented 2 years ago

This Improvement request (usability, performance, tech debt, etc.) affects these Traffic Control components:

Current behavior:

Currently it is possible to have a setting of max_simple_retries= or > number of parents. If the object requested is a 404 and unresolvable by any of the parents and the max number >= num_parents, then a 502 will be sent down because all the parents have been exhausted but was still requested to connect to yet another parent.

New behavior:

There should be a check done somewhere to either warn, or set a max bounds on max_simple_retry to be num_parents-1 so that we dont inadvertently get 502's being generated

This would provide more reliable err codes and states

jrushford commented 2 years ago

@ezelkow1 This applies to max_unavailable_server_retries as well. Both settings have a maximum value of 5. So the check should be num_parents-1 upto a maximum of 5.

jrushford commented 2 years ago

Ran into a situation where MSO only had one origin in the parent.config list. If there is one origin, do NOT configure simple retry or unavailable retry at all. These two features require a minimum of two parents. If you enable them with only one parent every retry will result in a parent lookup failure resulting in an immediate 502 response. There should be a check to ensure a minimum of two parents.