{"action":"created","issue":{"url":"https://api.github.com/repos/miekg/dns/issues/218","labels_url":"https://api.github.com/repos/miekg/dns/issues/218/labels{/name}","comments_url":"https://api.github.com/repos/miekg/dns/issues/218/comments","events_url":"https://api.github.com/repos/miekg/dns/issues/218/events","html_url":"https://github.com/miekg/dns/issues/218","id":85547650,"number":218,"title":"Connection limited to 128 requests","user":{"login":"smalldave","id":1242903,"avatar_url":"https://avatars.githubusercontent.com/u/1242903?v=3","gravatar_id":"","url":"https://api.github.com/users/smalldave","html_url":"https://github.com/smalldave","followers_url":"https://api.github.com/users/smalldave/followers","following_url":"https://api.github.com/users/smalldave/following{/other_user}","gists_url":"https://api.github.com/users/smalldave/gists{/gist_id}","starred_url":"https://api.github.com/users/smalldave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smalldave/subscriptions","organizations_url":"https://api.github.com/users/smalldave/orgs","repos_url":"https://api.github.com/users/smalldave/repos","events_url":"https://api.github.com/users/smalldave/events{/privacy}","received_events_url":"https://api.github.com/users/smalldave/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-06-05T14:36:33Z","updated_at":"2015-06-05T16:39:37Z","closed_at":null,"body":"This is an issue that has cropped up when using the consul dns server.\r\n\r\nThe number of requests is limited to 128 for a single connection.\r\n\r\nhttps://github.com/miekg/dns/blob/5a357a6fc5e85268b929350aa6423e2d56dcc4ff/server.go#L497\r\n\r\nI'm doing a DNS query for every request I make as consul is load balancing traffic between services.\r\nCreating a connection for each request leaves a lot of sockets in TIME_WAIT (at least in WIndows, I'd imagine it's the same elsewhere).\r\nMake enough requests to services and you can easily run out of ports.\r\n\r\nMy solution to this was to keep the dns connection open but then I hit that limit.\r\n\r\nWhat is the reason for the limit in the first place. Just that it's suspicious traffic that a public dns server probably doesn't want to serve?\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/miekg/dns/issues/comments/109357355","html_url":"https://github.com/miekg/dns/issues/218#issuecomment-109357355","issue_url":"https://api.github.com/repos/miekg/dns/issues/218","id":109357355,"user":{"login":"smalldave","id":1242903,"avatar_url":"https://avatars.githubusercontent.com/u/1242903?v=3","gravatar_id":"","url":"https://api.github.com/users/smalldave","html_url":"https://github.com/smalldave","followers_url":"https://api.github.com/users/smalldave/followers","following_url":"https://api.github.com/users/smalldave/following{/other_user}","gists_url":"https://api.github.com/users/smalldave/gists{/gist_id}","starred_url":"https://api.github.com/users/smalldave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smalldave/subscriptions","organizations_url":"https://api.github.com/users/smalldave/orgs","repos_url":"https://api.github.com/users/smalldave/repos","events_url":"https://api.github.com/users/smalldave/events{/privacy}","received_events_url":"https://api.github.com/users/smalldave/received_events","type":"User","site_admin":false},"created_at":"2015-06-05T16:39:37Z","updated_at":"2015-06-05T16:39:37Z","body":"Benchmarking is a bit grandiose. I'm working on a DNS client in C#. Weirdly I can't find any that can be pointed at a DNS server on a custom port. Also need to optimize for the zero TTL case when using with consul."}}