Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Severe performance degredation using TraceLoggingTransport #108

Open
bkuschel opened this issue Nov 9, 2018 · 0 comments
Open

Severe performance degredation using TraceLoggingTransport #108

bkuschel opened this issue Nov 9, 2018 · 0 comments

Comments

@bkuschel
Copy link
Contributor

bkuschel commented Nov 9, 2018

When uploading or downloading large streams of data, the tracing facility imposes a large tax. Perhaps the default should allow it to be disabled.

Work around is to define a cluster HTTPClient in the config without the trace wrapper.

func NewHTTPClient(config *ibmcloud.Config) *http.Client {
	return &http.Client{
		Transport: makeTransport(config),
		Timeout:   config.HTTPTimeout,
	}
}

func makeTransport(config *ibmcloud.Config) http.RoundTripper {
	return &http.Transport{
		Proxy: http.ProxyFromEnvironment,
		Dial: (&net.Dialer{
			Timeout:   50 * time.Second,
			KeepAlive: 30 * time.Second,
		}).Dial,
		TLSHandshakeTimeout: 20 * time.Second,
		DisableCompression:  true,
		TLSClientConfig: &tls.Config{
			InsecureSkipVerify: config.SSLDisable,
		},
	}
}
...
c.HTTPConfig = NewHTTPClient(c)
@bkuschel bkuschel changed the title Severe performance deprecation using TraceLoggingTransport Severe performance depreciation using TraceLoggingTransport Nov 14, 2018
@bkuschel bkuschel changed the title Severe performance depreciation using TraceLoggingTransport Severe performance degredation using TraceLoggingTransport Nov 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant