Skip to content

Why not use the http.DefaultTransport of go sdk as the api.DefaultTransport value #1857

@snakorse

Description

@snakorse

Currently, the DefaultRoundTripper in file client_golang/api/client.go creates a different http.Transport with fewer parameters set compared to http.DefaultTransport.

And there are some parameters that may help with reducing the total live connections, such as:

- ForceAttemptHTTP2:     true,
- IdleConnTimeout:       90 * time.Second

So, the question is: Could we simply use the http.DefaultTransport of go sdk as api.DefaultRoundTripper value? Is there any other consideration preventing this change?

var DefaultRoundTripper http.RoundTripper = http.DefaultTransport

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions