From f08905d7ff67ebcfee14ffe64ed4b7fb8c515cdf Mon Sep 17 00:00:00 2001 From: Christian Schwede Date: Fri, 11 Sep 2020 15:33:42 +0200 Subject: [PATCH] Decrease Swift proxy timeouts for GET/HEAD requests Adds a new parameter named SwiftProxyRecoverableNodeTimeout. The default node timeout is 10 seconds in Swift, however this has been set to 60 seconds in TripleO in case there are slow nodes. However, this affects all requests - GET, HEAD and PUT. GET/HEAD requests are typically much faster, thus it makes sense to use a lower timeout to recover earlier from node failures. This increases overall stability, because the proxy can select another backend node to retry the request if an initial HEAD request already returns a timeout, for example when uploading Glance images. Depends-On: I2f56bc456427d5deb30d86ad70e890d0897ef0c9 Change-Id: I9694435d5c54568a1636195d73d53903c44d998b --- deployment/swift/swift-proxy-container-puppet.yaml | 5 +++++ ...oxy-recoverable-node-timeout-1fcd7a83f983e61b.yaml | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 releasenotes/notes/swift-proxy-recoverable-node-timeout-1fcd7a83f983e61b.yaml diff --git a/deployment/swift/swift-proxy-container-puppet.yaml b/deployment/swift/swift-proxy-container-puppet.yaml index 60af32cd76..61fa568972 100644 --- a/deployment/swift/swift-proxy-container-puppet.yaml +++ b/deployment/swift/swift-proxy-container-puppet.yaml @@ -54,6 +54,10 @@ parameters: default: 60 description: Timeout for requests going from swift-proxy to swift a/c/o services. type: number + SwiftProxyRecoverableNodeTimeout: + default: 30 + description: Timeout for GET/HEAD requests going from swift-proxy to swift a/c/o services. + type: number SwiftWorkers: default: 0 description: Number of workers for Swift service. @@ -162,6 +166,7 @@ outputs: swift::proxy::authtoken::region_name: {get_param: KeystoneRegion} swift::proxy::s3token::www_authenticate_uri: {get_param: [EndpointMap, KeystoneV3Internal, uri]} swift::proxy::node_timeout: {get_param: SwiftProxyNodeTimeout} + swift::proxy::recoverable_node_timeout: {get_param: SwiftProxyRecoverableNodeTimeout} - if: - swift_workers_zero diff --git a/releasenotes/notes/swift-proxy-recoverable-node-timeout-1fcd7a83f983e61b.yaml b/releasenotes/notes/swift-proxy-recoverable-node-timeout-1fcd7a83f983e61b.yaml new file mode 100644 index 0000000000..fcab05e10f --- /dev/null +++ b/releasenotes/notes/swift-proxy-recoverable-node-timeout-1fcd7a83f983e61b.yaml @@ -0,0 +1,11 @@ +--- +fixes: + - | + Decrease Swift proxy timeouts for GET/HEAD requests using a new parameter + named SwiftProxyRecoverableNodeTimeout. The default node timeout is 10 + seconds in Swift, however this has been set to 60 seconds in TripleO in + case there are slow nodes. However, this affects all requests - GET, HEAD + and PUT. GET/HEAD requests are typically much faster, thus it makes sense + to use a lower timeout to recover earlier from node failures. This will + increase stability, because the proxy can select another backend node to + retry the request.