Skip to content

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

Merged
valyala merged 4 commits intomasterfrom
timeouts
Sep 21, 2018
Merged

Allow to configure server's read/write/idle timeouts#36
valyala merged 4 commits intomasterfrom
timeouts

Conversation

@hagen1778
Copy link
Contributor

#35

@hagen1778 hagen1778 requested a review from valyala September 18, 2018 19:08
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

}
}

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