• Tobias Schmidt's avatar
    plugin/forward: Increase minimum read timeout to 200ms (#1889) · 422aec5f
    Tobias Schmidt authored
    After several experiments at SoundCloud we found that the current
    minimum read timeout of 10ms is too low. A single request against a
    slow/unavailable authoritative server can cause all TCP connections to
    get closed. We record a 50th percentile forward/proxy latency of <5ms,
    and a 99th percentile latency of 60ms. Using a minimum timeout of 200ms
    seems to be a fair trade-off between avoiding unnecessary high
    connection churn and reacting to upstream failures in a timely manner.
    
    This change also renames hcDuration to hcInterval to reflect its usage,
    and removes the duplicated timeout constant to make code comprehension
    easier.
    422aec5f
proxy.go 2.58 KB