lzx404243 commented on PR #9620: URL: https://github.com/apache/trafficserver/pull/9620#issuecomment-1522017513
@serrislew Thanks for the question. I share the same question as to what the `fail_threshold` does and the relationship with the other parent configs and I believe the doc can be improved to clarify that. This `configured_connect_attempts_max_retries()` function is currently used when setting the attempt counts. We choose to return values based on the `parent_proxy.total_connect_attempt` and `parent_proxy.per_parent_connect_attempts` because we see the attempt count is only compared against those values, such as in https://github.com/apache/trafficserver/blob/master/proxy/http/HttpTransact.cc#L3644 . As for `parent_proxy.fail_threshold`, guessing from the source code I think it might be a next-tier accounting that takes into account a timing component. From https://github.com/apache/trafficserver/blob/master/proxy/ParentSelectionStrategy.cc#L90-L93 , it seems a parent can be marked "down" several times and is only set to unavailable when it passed the `fail_threshold`. Based on the above, my impression is that `parent_proxy.total_connect_attempt` and `parent_proxy.per_parent_connect_attempts` configs work with the attempt count to determine whether to use parent proxy and when to switch to the next parent. `parent_proxy.fail_threshold` seems to be separate from this. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
