Skip to content

Configurable http client timeout for Azure Blob Storage - #162

Open
jochenehret wants to merge 2 commits into
mainfrom
azure_http_timeouts
Open

Configurable http client timeout for Azure Blob Storage#162
jochenehret wants to merge 2 commits into
mainfrom
azure_http_timeouts

Conversation

@jochenehret

Copy link
Copy Markdown
Contributor

No description provided.

@stephanme
stephanme force-pushed the azure_http_timeouts branch from c27e2cb to 64ea3e3 Compare August 31, 2026 11:45

@stephanme stephanme left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude review mentioned that RequestTimeout is problematic for long running up/downloads and recommends to use ResponseHeaderTimeout instead so that connection/network problems are detected fast but long running data flow is not interrupted.

I remember that we discussed this and therefore decided to allow setting RequestTimeout but use an "infinite" default.
Maybe we should add ResponseHeaderTimeout with a 60s default. This would come closer to the fog/excon client behavior.

}
return &blockblob.ClientOptions{
ClientOptions: azcore.ClientOptions{
Transport: &http.Client{Timeout: dsc.httpRequestTimeout},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no transport set in the &http.Client{} which means that http.Client uses http.DefaultTransport instead of the default transport of the azure SDK.

http.DefaultTransport uses RenegotiateNever and has no HTTP/2 health-check pings. azcore's default transport uses RenegotiateFreelyAsClient, TLS 1.2 minimum, and ReadIdleTimeout: 10s for HTTP/2 pings. In environments with corporate proxies or Azure sovereign-cloud endpoints that request TLS renegotiation, all connections silently fail. The fix is to build a transport derived from azcore's defaults (via azidentity.DefaultTransportFromEnvironment or azcorehttp.NewDefaultTransport), set only the Timeout, and keep the RenegotiateFreelyAsClient config intact.

}
}

func (dsc DefaultStorageClient) containerClientOptions() *azContainer.ClientOptions {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All 3 xxxClientOptions() methods have the same body. Could probably be simplified.

@github-project-automation github-project-automation Bot moved this from Inbox to Waiting for Changes | Open for Contribution in Foundational Infrastructure Working Group Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Waiting for Changes | Open for Contribution

Development

Successfully merging this pull request may close these issues.

2 participants