{"action":"created","comment":{"url":"https://api.github.com/repos/containous/traefik/pulls/comments/130885177","pull_request_review_id":53808113,"id":130885177,"diff_hunk":"@@ -54,11 +61,13 @@ type GlobalConfiguration struct {\n \tDefaultEntryPoints        DefaultEntryPoints      `description:\"Entrypoints to be used by frontends that do not specify any entrypoint\"`\n \tProvidersThrottleDuration flaeg.Duration          `description:\"Backends throttle duration: minimum duration between 2 events from providers before applying a new configuration. It avoids unnecessary reloads if multiples events are sent in a short amount of time.\"`\n \tMaxIdleConnsPerHost       int                     `description:\"If non-zero, controls the maximum idle (keep-alive) to keep per-host.  If zero, DefaultMaxIdleConnsPerHost is used\"`\n-\tIdleTimeout               flaeg.Duration          `description:\"maximum amount of time an idle (keep-alive) connection will remain idle before closing itself.\"`\n+\tIdleTimeout               flaeg.Duration          `description:\"(Deprecated) see RespondingTimeouts.IdleTimeout\"`","path":"server/configuration.go","position":23,"original_position":23,"commit_id":"21a590e30159609fbd02e62454cbbbfe3fa674fd","original_commit_id":"21a590e30159609fbd02e62454cbbbfe3fa674fd","user":{"login":"ldez","id":5674651,"avatar_url":"https://avatars0.githubusercontent.com/u/5674651?v=4","gravatar_id":"","url":"https://api.github.com/users/ldez","html_url":"https://github.com/ldez","followers_url":"https://api.github.com/users/ldez/followers","following_url":"https://api.github.com/users/ldez/following{/other_user}","gists_url":"https://api.github.com/users/ldez/gists{/gist_id}","starred_url":"https://api.github.com/users/ldez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldez/subscriptions","organizations_url":"https://api.github.com/users/ldez/orgs","repos_url":"https://api.github.com/users/ldez/repos","events_url":"https://api.github.com/users/ldez/events{/privacy}","received_events_url":"https://api.github.com/users/ldez/received_events","type":"User","site_admin":false},"body":"Could you add `// Deprecated` ?","created_at":"2017-08-02T14:03:49Z","updated_at":"2017-08-02T14:06:30Z","html_url":"https://github.com/containous/traefik/pull/1873#discussion_r130885177","pull_request_url":"https://api.github.com/repos/containous/traefik/pulls/1873","_links":{"self":{"href":"https://api.github.com/repos/containous/traefik/pulls/comments/130885177"},"html":{"href":"https://github.com/containous/traefik/pull/1873#discussion_r130885177"},"pull_request":{"href":"https://api.github.com/repos/containous/traefik/pulls/1873"}}},"pull_request":{"url":"https://api.github.com/repos/containous/traefik/pulls/1873","id":131012124,"html_url":"https://github.com/containous/traefik/pull/1873","diff_url":"https://github.com/containous/traefik/pull/1873.diff","patch_url":"https://github.com/containous/traefik/pull/1873.patch","issue_url":"https://api.github.com/repos/containous/traefik/issues/1873","number":1873,"state":"open","locked":false,"title":"Add configurable timeouts and curate default timeout settings","user":{"login":"marco-jantke","id":4903245,"avatar_url":"https://avatars3.githubusercontent.com/u/4903245?v=4","gravatar_id":"","url":"https://api.github.com/users/marco-jantke","html_url":"https://github.com/marco-jantke","followers_url":"https://api.github.com/users/marco-jantke/followers","following_url":"https://api.github.com/users/marco-jantke/following{/other_user}","gists_url":"https://api.github.com/users/marco-jantke/gists{/gist_id}","starred_url":"https://api.github.com/users/marco-jantke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marco-jantke/subscriptions","organizations_url":"https://api.github.com/users/marco-jantke/orgs","repos_url":"https://api.github.com/users/marco-jantke/repos","events_url":"https://api.github.com/users/marco-jantke/events{/privacy}","received_events_url":"https://api.github.com/users/marco-jantke/received_events","type":"User","site_admin":false},"body":"This PR adds some configurable timeouts to Traefik. Namely it introduces:\r\n\r\n- ForwardingTimeouts -> Timeouts for forwarding requests to the Backend Server's. In specific\r\n  - DialTimeout\r\n  - ResponseHeaderTimeout\r\n- RespondingTimeouts -> Timeouts for the `http.Server` instances that Traefik opens. \r\n  - ReadTimeout\r\n  - WriteTimeout\r\n  - Move of IdleTimeout into this configuration section with proper deprecation for uniformity.\r\n\r\nThe motivation for this PR are the suboptimal default settings of go itself and it is important to make the load balancer robust against bad behaving clients / backends in a microservice environment.\r\n\r\nIn order to introduce this configuration options I had to first clean up the global modification of the `http.DefaultTransport`. I think a global modification of it is in general considered a bad practice and leads to unintended side-effects. To do this I added a `createHTTPTransport` method in the server that will produce a `http.Transport` with a very similar configuration as the 'http.DefaultTransport'. Apart of the removal form global modification this has another big benefit, given TLS is configured we create a new `http.Transport` for that and before this PR this Transport did not have any timeouts configured at all, not even those from the `http.DefaultTransport`.\r\n\r\nI know that this PR is largish and timeouts in general are really difficult to test. Let me know when I can support reviewers in any way, usually I am also hanging around in the Traefik slack channel. I tried to split the commits logically so that at least those should give some guideline of the introduced changes and hopefully make reviewing easier.\r\n\r\nFor background information: There are very good articles regarding timeouts in golang. Here some links:\r\n- https://blog.cloudflare.com/the-complete-guide-to-golang-net-http-timeouts/\r\n- https://medium.com/@nate510/don-t-use-go-s-default-http-client-4804cb19f779","created_at":"2017-07-18T06:37:15Z","updated_at":"2017-08-02T14:06:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0032cfa50aa49c836140406ba287979f36f15aa4","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":{"url":"https://api.github.com/repos/containous/traefik/milestones/6","html_url":"https://github.com/containous/traefik/milestone/6","labels_url":"https://api.github.com/repos/containous/traefik/milestones/6/labels","id":2497355,"number":6,"title":"1.4","description":"","creator":{"login":"ldez","id":5674651,"avatar_url":"https://avatars0.githubusercontent.com/u/5674651?v=4","gravatar_id":"","url":"https://api.github.com/users/ldez","html_url":"https://github.com/ldez","followers_url":"https://api.github.com/users/ldez/followers","following_url":"https://api.github.com/users/ldez/following{/other_user}","gists_url":"https://api.github.com/users/ldez/gists{/gist_id}","starred_url":"https://api.github.com/users/ldez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldez/subscriptions","organizations_url":"https://api.github.com/users/ldez/orgs","repos_url":"https://api.github.com/users/ldez/repos","events_url":"https://api.github.com/users/ldez/events{/privacy}","received_events_url":"https://api.github.com/users/ldez/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":119,"state":"open","created_at":"2017-05-03T13:20:01Z","updated_at":"2017-08-02T13:59:16Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/containous/traefik/pulls/1873/commits","review_comments_url":"https://api.github.com/repos/containous/traefik/pulls/1873/comments","review_comment_url":"https://api.github.com/repos/containous/traefik/pulls/comments{/number}","comments_url":"https://api.github.com/repos/containous/traefik/issues/1873/comments","statuses_url":"https://api.github.com/repos/containous/traefik/statuses/21a590e30159609fbd02e62454cbbbfe3fa674fd","head":{"label":"marco-jantke:connection-timeouts","ref":"connection-timeouts","sha":"21a590e30159609fbd02e62454cbbbfe3fa674fd","user":{"login":"marco-jantke","id":4903245,"avatar_url":"https://avatars3.githubusercontent.com/u/4903245?v=4","gravatar_id":"","url":"https://api.github.com/users/marco-jantke","html_url":"https://github.com/marco-jantke","followers_url":"https://api.github.com/users/marco-jantke/followers","following_url":"https://api.github.com/users/marco-jantke/following{/other_user}","gists_url":"https://api.github.com/users/marco-jantke/gists{/gist_id}","starred_url":"https://api.github.com/users/marco-jantke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marco-jantke/subscriptions","organizations_url":"https://api.github.com/users/marco-jantke/orgs","repos_url":"https://api.github.com/users/marco-jantke/repos","events_url":"https://api.github.com/users/marco-jantke/events{/privacy}","received_events_url":"https://api.github.com/users/marco-jantke/received_events","type":"User","site_admin":false},"repo":{"id":89615013,"name":"traefik","full_name":"marco-jantke/traefik","owner":{"login":"marco-jantke","id":4903245,"avatar_url":"https://avatars3.githubusercontent.com/u/4903245?v=4","gravatar_id":"","url":"https://api.github.com/users/marco-jantke","html_url":"https://github.com/marco-jantke","followers_url":"https://api.github.com/users/marco-jantke/followers","following_url":"https://api.github.com/users/marco-jantke/following{/other_user}","gists_url":"https://api.github.com/users/marco-jantke/gists{/gist_id}","starred_url":"https://api.github.com/users/marco-jantke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marco-jantke/subscriptions","organizations_url":"https://api.github.com/users/marco-jantke/orgs","repos_url":"https://api.github.com/users/marco-jantke/repos","events_url":"https://api.github.com/users/marco-jantke/events{/privacy}","received_events_url":"https://api.github.com/users/marco-jantke/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/marco-jantke/traefik","description":"Træfik, a modern reverse proxy","fork":true,"url":"https://api.github.com/repos/marco-jantke/traefik","forks_url":"https://api.github.com/repos/marco-jantke/traefik/forks","keys_url":"https://api.github.com/repos/marco-jantke/traefik/keys{/key_id}","collaborators_url":"https://api.github.com/repos/marco-jantke/traefik/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/marco-jantke/traefik/teams","hooks_url":"https://api.github.com/repos/marco-jantke/traefik/hooks","issue_events_url":"https://api.github.com/repos/marco-jantke/traefik/issues/events{/number}","events_url":"https://api.github.com/repos/marco-jantke/traefik/events","assignees_url":"https://api.github.com/repos/marco-jantke/traefik/assignees{/user}","branches_url":"https://api.github.com/repos/marco-jantke/traefik/branches{/branch}","tags_url":"https://api.github.com/repos/marco-jantke/traefik/tags","blobs_url":"https://api.github.com/repos/marco-jantke/traefik/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/marco-jantke/traefik/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/marco-jantke/traefik/git/refs{/sha}","trees_url":"https://api.github.com/repos/marco-jantke/traefik/git/trees{/sha}","statuses_url":"https://api.github.com/repos/marco-jantke/traefik/statuses/{sha}","languages_url":"https://api.github.com/repos/marco-jantke/traefik/languages","stargazers_url":"https://api.github.com/repos/marco-jantke/traefik/stargazers","contributors_url":"https://api.github.com/repos/marco-jantke/traefik/contributors","subscribers_url":"https://api.github.com/repos/marco-jantke/traefik/subscribers","subscription_url":"https://api.github.com/repos/marco-jantke/traefik/subscription","commits_url":"https://api.github.com/repos/marco-jantke/traefik/commits{/sha}","git_commits_url":"https://api.github.com/repos/marco-jantke/traefik/git/commits{/sha}","comments_url":"https://api.github.com/repos/marco-jantke/traefik/comments{/number}","issue_comment_url":"https://api.github.com/repos/marco-jantke/traefik/issues/comments{/number}","contents_url":"https://api.github.com/repos/marco-jantke/traefik/contents/{+path}","compare_url":"https://api.github.com/repos/marco-jantke/traefik/compare/{base}...{head}","merges_url":"https://api.github.com/repos/marco-jantke/traefik/merges","archive_url":"https://api.github.com/repos/marco-jantke/traefik/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/marco-jantke/traefik/downloads","issues_url":"https://api.github.com/repos/marco-jantke/traefik/issues{/number}","pulls_url":"https://api.github.com/repos/marco-jantke/traefik/pulls{/number}","milestones_url":"https://api.github.com/repos/marco-jantke/traefik/milestones{/number}","notifications_url":"https://api.github.com/repos/marco-jantke/traefik/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/marco-jantke/traefik/labels{/name}","releases_url":"https://api.github.com/repos/marco-jantke/traefik/releases{/id}","deployments_url":"https://api.github.com/repos/marco-jantke/traefik/deployments","created_at":"2017-04-27T15:54:08Z","updated_at":"2017-04-27T15:54:11Z","pushed_at":"2017-07-21T13:05:42Z","git_url":"git://github.com/marco-jantke/traefik.git","ssh_url":"git@github.com:marco-jantke/traefik.git","clone_url":"https://github.com/marco-jantke/traefik.git","svn_url":"https://github.com/marco-jantke/traefik","homepage":"https://traefik.io/","size":18440,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"containous:master","ref":"master","sha":"c53be185f4c71d41c1b71cd80a78d1613a970b65","user":{"login":"containous","id":16349663,"avatar_url":"https://avatars3.githubusercontent.com/u/16349663?v=4","gravatar_id":"","url":"https://api.github.com/users/containous","html_url":"https://github.com/containous","followers_url":"https://api.github.com/users/containous/followers","following_url":"https://api.github.com/users/containous/following{/other_user}","gists_url":"https://api.github.com/users/containous/gists{/gist_id}","starred_url":"https://api.github.com/users/containous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/containous/subscriptions","organizations_url":"https://api.github.com/users/containous/orgs","repos_url":"https://api.github.com/users/containous/repos","events_url":"https://api.github.com/users/containous/events{/privacy}","received_events_url":"https://api.github.com/users/containous/received_events","type":"Organization","site_admin":false},"repo":{"id":42408804,"name":"traefik","full_name":"containous/traefik","owner":{"login":"containous","id":16349663,"avatar_url":"https://avatars3.githubusercontent.com/u/16349663?v=4","gravatar_id":"","url":"https://api.github.com/users/containous","html_url":"https://github.com/containous","followers_url":"https://api.github.com/users/containous/followers","following_url":"https://api.github.com/users/containous/following{/other_user}","gists_url":"https://api.github.com/users/containous/gists{/gist_id}","starred_url":"https://api.github.com/users/containous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/containous/subscriptions","organizations_url":"https://api.github.com/users/containous/orgs","repos_url":"https://api.github.com/users/containous/repos","events_url":"https://api.github.com/users/containous/events{/privacy}","received_events_url":"https://api.github.com/users/containous/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/containous/traefik","description":"Træfik, a modern reverse proxy","fork":false,"url":"https://api.github.com/repos/containous/traefik","forks_url":"https://api.github.com/repos/containous/traefik/forks","keys_url":"https://api.github.com/repos/containous/traefik/keys{/key_id}","collaborators_url":"https://api.github.com/repos/containous/traefik/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/containous/traefik/teams","hooks_url":"https://api.github.com/repos/containous/traefik/hooks","issue_events_url":"https://api.github.com/repos/containous/traefik/issues/events{/number}","events_url":"https://api.github.com/repos/containous/traefik/events","assignees_url":"https://api.github.com/repos/containous/traefik/assignees{/user}","branches_url":"https://api.github.com/repos/containous/traefik/branches{/branch}","tags_url":"https://api.github.com/repos/containous/traefik/tags","blobs_url":"https://api.github.com/repos/containous/traefik/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/containous/traefik/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/containous/traefik/git/refs{/sha}","trees_url":"https://api.github.com/repos/containous/traefik/git/trees{/sha}","statuses_url":"https://api.github.com/repos/containous/traefik/statuses/{sha}","languages_url":"https://api.github.com/repos/containous/traefik/languages","stargazers_url":"https://api.github.com/repos/containous/traefik/stargazers","contributors_url":"https://api.github.com/repos/containous/traefik/contributors","subscribers_url":"https://api.github.com/repos/containous/traefik/subscribers","subscription_url":"https://api.github.com/repos/containous/traefik/subscription","commits_url":"https://api.github.com/repos/containous/traefik/commits{/sha}","git_commits_url":"https://api.github.com/repos/containous/traefik/git/commits{/sha}","comments_url":"https://api.github.com/repos/containous/traefik/comments{/number}","issue_comment_url":"https://api.github.com/repos/containous/traefik/issues/comments{/number}","contents_url":"https://api.github.com/repos/containous/traefik/contents/{+path}","compare_url":"https://api.github.com/repos/containous/traefik/compare/{base}...{head}","merges_url":"https://api.github.com/repos/containous/traefik/merges","archive_url":"https://api.github.com/repos/containous/traefik/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/containous/traefik/downloads","issues_url":"https://api.github.com/repos/containous/traefik/issues{/number}","pulls_url":"https://api.github.com/repos/containous/traefik/pulls{/number}","milestones_url":"https://api.github.com/repos/containous/traefik/milestones{/number}","notifications_url":"https://api.github.com/repos/containous/traefik/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/containous/traefik/labels{/name}","releases_url":"https://api.github.com/repos/containous/traefik/releases{/id}","deployments_url":"https://api.github.com/repos/containous/traefik/deployments","created_at":"2015-09-13T19:04:02Z","updated_at":"2017-08-02T13:19:02Z","pushed_at":"2017-08-02T09:38:54Z","git_url":"git://github.com/containous/traefik.git","ssh_url":"git@github.com:containous/traefik.git","clone_url":"https://github.com/containous/traefik.git","svn_url":"https://github.com/containous/traefik","homepage":"https://traefik.io","size":17799,"stargazers_count":9075,"watchers_count":9075,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":841,"mirror_url":null,"open_issues_count":289,"forks":841,"open_issues":289,"watchers":9075,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/containous/traefik/pulls/1873"},"html":{"href":"https://github.com/containous/traefik/pull/1873"},"issue":{"href":"https://api.github.com/repos/containous/traefik/issues/1873"},"comments":{"href":"https://api.github.com/repos/containous/traefik/issues/1873/comments"},"review_comments":{"href":"https://api.github.com/repos/containous/traefik/pulls/1873/comments"},"review_comment":{"href":"https://api.github.com/repos/containous/traefik/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/containous/traefik/pulls/1873/commits"},"statuses":{"href":"https://api.github.com/repos/containous/traefik/statuses/21a590e30159609fbd02e62454cbbbfe3fa674fd"}}}}
{"actor":{"display_login":"ldez"}}