{"action":"created","issue":{"url":"https://api.github.com/repos/coredns/coredns/issues/847","repository_url":"https://api.github.com/repos/coredns/coredns","labels_url":"https://api.github.com/repos/coredns/coredns/issues/847/labels{/name}","comments_url":"https://api.github.com/repos/coredns/coredns/issues/847/comments","events_url":"https://api.github.com/repos/coredns/coredns/issues/847/events","html_url":"https://github.com/coredns/coredns/issues/847","id":248399893,"number":847,"title":"no way to set Etcd client Transport","user":{"login":"zzxun","id":6768053,"avatar_url":"https://avatars1.githubusercontent.com/u/6768053?v=4","gravatar_id":"","url":"https://api.github.com/users/zzxun","html_url":"https://github.com/zzxun","followers_url":"https://api.github.com/users/zzxun/followers","following_url":"https://api.github.com/users/zzxun/following{/other_user}","gists_url":"https://api.github.com/users/zzxun/gists{/gist_id}","starred_url":"https://api.github.com/users/zzxun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zzxun/subscriptions","organizations_url":"https://api.github.com/users/zzxun/orgs","repos_url":"https://api.github.com/users/zzxun/repos","events_url":"https://api.github.com/users/zzxun/events{/privacy}","received_events_url":"https://api.github.com/users/zzxun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-08-07T12:44:47Z","updated_at":"2017-08-08T02:20:25Z","closed_at":null,"body":"IN \r\n[middleware/etcd/setup.go#newEtcdClient](https://github.com/coredns/coredns/blob/master/middleware/etcd/setup.go#L132) \r\nEtcd Client use\r\n[middleware/pkg/tls.go#NewHTTPSTransport](https://github.com/coredns/coredns/blob/master/middleware/pkg/tls/tls.go#L110) \r\nto build a `http.Transport`.\r\nBut there is NO WAY TO SETTING `http.Transport`.  Specially the DEAULT `MaxIdleConnsPerHost` in go is just `2`, raises a big problem!\r\n\r\nWe are using coredns + etcd. On our testing environment, LXC on Linux:\r\n\r\n- Intel(R) Xeon(R) CPU E5-2670 v3 @ 2.30GHz / 48 cores\r\n- 128G memory\r\n\r\nAfter continual stress testing it for few days, `etcdctl` begin to error with `connect: cannot assign requested address` :\r\n\r\n```\r\nError:  client: etcd cluster is unavailable or misconfigured; error #0: dial tcp 10.187.15.167:2379: connect: cannot assign requested address\r\n; error #1: dial tcp xx:2379: connect: cannot assign requested address\r\n; error #2: dial tcp xx:2379: connect: cannot assign requested address\r\n; error #3: dial tcp xx:2379: connect: cannot assign requested address\r\n; error #4: dial tcp xx:22379: connect: cannot assign requested address\r\n...\r\n```\r\n\r\nAnd the are so many `TIME_WAIT` on `2379`:\r\n```\r\nnetstat -apn | grep 2379 | wc -l\r\n(Not all processes could be identified, non-owned process info\r\n will not be shown, you would have to be root to see it all.)\r\n130646\r\n```\r\n\r\nBecause sockets on 2379 open/close frequently under stress testing. \r\nThen I checkout source of coredns, and  change the `tls.go` make `MaxIdleConnsPerHost=25`, after rebuild and restart:\r\n```\r\nnetstat -an | grep '2379' | grep 'ESTABLISH' | wc -l\r\n46\r\nnetstat -an | grep '2379' | grep 'TIME_WAIT' | wc -l\r\n4\r\n```\r\n\r\nResolved."},"comment":{"url":"https://api.github.com/repos/coredns/coredns/issues/comments/320831425","html_url":"https://github.com/coredns/coredns/issues/847#issuecomment-320831425","issue_url":"https://api.github.com/repos/coredns/coredns/issues/847","id":320831425,"user":{"login":"zzxun","id":6768053,"avatar_url":"https://avatars1.githubusercontent.com/u/6768053?v=4","gravatar_id":"","url":"https://api.github.com/users/zzxun","html_url":"https://github.com/zzxun","followers_url":"https://api.github.com/users/zzxun/followers","following_url":"https://api.github.com/users/zzxun/following{/other_user}","gists_url":"https://api.github.com/users/zzxun/gists{/gist_id}","starred_url":"https://api.github.com/users/zzxun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zzxun/subscriptions","organizations_url":"https://api.github.com/users/zzxun/orgs","repos_url":"https://api.github.com/users/zzxun/repos","events_url":"https://api.github.com/users/zzxun/events{/privacy}","received_events_url":"https://api.github.com/users/zzxun/received_events","type":"User","site_admin":false},"created_at":"2017-08-08T02:20:25Z","updated_at":"2017-08-08T02:20:25Z","body":"#853 "}}
{"actor":{"display_login":"zzxun"}}