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

Allow to configure server's read/write/idle timeouts #36

Merged
merged 4 commits into from
Sep 21, 2018
Merged

Conversation

hagen1778
Copy link
Contributor

#35

@hagen1778 hagen1778 requested a review from valyala September 18, 2018 19:08
README.md Outdated
@@ -430,6 +430,19 @@ server:
# By default requests are accepted from all the IPs.
allowed_networks: ["office", "reporting-apps", "1.2.3.4"]

# ReadTimeout is the maximum duration for reading the entire
# request, including the body.
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you specify on which side this timeout is applied - on the chproxy client or on the clickhouse server? Probably, it would be better adding the corresponding prefix to these timeouts? For instance, client_read_timeout

Copy link
Contributor Author

@hagen1778 hagen1778 Sep 20, 2018

Choose a reason for hiding this comment

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

That's the good point! I was sure being a part of server.http and/or server.https section was clear enough. But adding a prefix to the properties names could be verbose a bit. I suggest to specify details in description instead. Do you agree?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes

@@ -630,49 +630,6 @@ func TestNewTLSConfig(t *testing.T) {
}
}

func TestGetMaxResponseTime(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add tests verifying config.TimeoutCfg fields are correctly set for various input configs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please, see update

@valyala valyala merged commit ba2976d into master Sep 21, 2018
@valyala valyala deleted the timeouts branch September 21, 2018 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants