-
Notifications
You must be signed in to change notification settings - Fork 639
chore: add GCS HTTP config #4005
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
Conversation
cb0d7f4
to
3d0ae4e
Compare
3d0ae4e
to
b007f51
Compare
# Conflicts: # pkg/phlare/phlare.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM: Great find!
Maybe worth capturing the grpc interface as an issue
type HTTPConfig struct { | ||
IdleConnTimeout time.Duration `yaml:"idle_conn_timeout"` | ||
ResponseHeaderTimeout time.Duration `yaml:"response_header_timeout"` | ||
InsecureSkipVerify bool `yaml:"insecure_skip_verify"` | ||
TLSHandshakeTimeout time.Duration `yaml:"tls_handshake_timeout"` | ||
ExpectContinueTimeout time.Duration `yaml:"expect_continue_timeout"` | ||
MaxIdleConns int `yaml:"max_idle_conns"` | ||
MaxIdleConnsPerHost int `yaml:"max_idle_conns_per_host"` | ||
MaxConnsPerHost int `yaml:"max_conns_per_host"` | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably better to mark them all as advanced:
type HTTPConfig struct { | |
IdleConnTimeout time.Duration `yaml:"idle_conn_timeout"` | |
ResponseHeaderTimeout time.Duration `yaml:"response_header_timeout"` | |
InsecureSkipVerify bool `yaml:"insecure_skip_verify"` | |
TLSHandshakeTimeout time.Duration `yaml:"tls_handshake_timeout"` | |
ExpectContinueTimeout time.Duration `yaml:"expect_continue_timeout"` | |
MaxIdleConns int `yaml:"max_idle_conns"` | |
MaxIdleConnsPerHost int `yaml:"max_idle_conns_per_host"` | |
MaxConnsPerHost int `yaml:"max_conns_per_host"` | |
} | |
type HTTPConfig struct { | |
IdleConnTimeout time.Duration `yaml:"idle_conn_timeout"` `category:"advanced"` | |
ResponseHeaderTimeout time.Duration `yaml:"response_header_timeout"` `category:"advanced"` | |
InsecureSkipVerify bool `yaml:"insecure_skip_verify"` `category:"advanced"` | |
TLSHandshakeTimeout time.Duration `yaml:"tls_handshake_timeout"` `category:"advanced"` | |
ExpectContinueTimeout time.Duration `yaml:"expect_continue_timeout"` `category:"advanced"` | |
MaxIdleConns int `yaml:"max_idle_conns"` `category:"advanced"` | |
MaxIdleConnsPerHost int `yaml:"max_idle_conns_per_host"` `category:"advanced"` | |
MaxConnsPerHost int `yaml:"max_conns_per_host"` `category:"advanced"` | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been thinking about it and decided to make it symmetric with the S3 config.
Actually, now that I look at it, it should be advanced
– I'll add it in the follow up PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding it in #4007
* chore: add GCS HTTP config * chore: update help message
The change will allow tuning the HTTP conn pool: the default parameters may cause excessive TLS handshakes:
Defaults:

1K idle connections, 10m idle timeout:

N.B.: it's worth exploring the GCS gRPC interface as well.