{"action":"created","issue":{"url":"https://api.github.com/repos/weaveworks/weave/issues/1065","labels_url":"https://api.github.com/repos/weaveworks/weave/issues/1065/labels{/name}","comments_url":"https://api.github.com/repos/weaveworks/weave/issues/1065/comments","events_url":"https://api.github.com/repos/weaveworks/weave/issues/1065/events","html_url":"https://github.com/weaveworks/weave/pull/1065","id":92687501,"number":1065,"title":"Gossip-based DNS embedded in the router.","user":{"login":"tomwilkie","id":444037,"avatar_url":"https://avatars.githubusercontent.com/u/444037?v=3","gravatar_id":"","url":"https://api.github.com/users/tomwilkie","html_url":"https://github.com/tomwilkie","followers_url":"https://api.github.com/users/tomwilkie/followers","following_url":"https://api.github.com/users/tomwilkie/following{/other_user}","gists_url":"https://api.github.com/users/tomwilkie/gists{/gist_id}","starred_url":"https://api.github.com/users/tomwilkie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomwilkie/subscriptions","organizations_url":"https://api.github.com/users/tomwilkie/orgs","repos_url":"https://api.github.com/users/tomwilkie/repos","events_url":"https://api.github.com/users/tomwilkie/events{/privacy}","received_events_url":"https://api.github.com/users/tomwilkie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":22,"created_at":"2015-07-02T17:13:01Z","updated_at":"2015-07-06T19:38:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/weaveworks/weave/pulls/1065","html_url":"https://github.com/weaveworks/weave/pull/1065","diff_url":"https://github.com/weaveworks/weave/pull/1065.diff","patch_url":"https://github.com/weaveworks/weave/pull/1065.patch"},"body":"- Nameserver holds a sorted list of (hostname, peer, container id, ip) tuples.\r\n- Entries are gossiped using topology gossip / broadcast - only new entries are\r\n  propogated as expected.\r\n- Entries for a given peer are removed when the connection to the peer is lost.\r\n- Entries are tombstoned when containers die.  Tombstones are kept for 10mins,\r\n  as they do not need to survive partition, only gossip propagation delay.\r\n- Hostname lookups are O(logn), reverse DNS lookups are O(n), all in memory.\r\n\r\nFixes #826\r\n\r\nLeft to do:\r\n- [x] Make ```weave launch-dns``` and ```weave stop-dns``` print warning and exit cleanly\r\n- [x] Add useful status output\r\n- [x] Audit logging\r\n- [x] Update proxy to send dns commands to the router.\r\n- [x] Make sure restart still works & add tests for that\r\n- [x] make ttl configurable, audit args, arg naming\r\n- [x] Add tests for large responses\r\n- [x] Make ``when_weave_running`` change\r\n- [x] Docs\r\n- [x] Deal with OnGC-gossip race\r\n\r\nNot doing in this PR (left to follow-on issues, to be filed)\r\n- Reduce the complexity of non-hostname-lookups (all of which are O(n))\r\n- Rate limit new entry broadcasts"},"comment":{"url":"https://api.github.com/repos/weaveworks/weave/issues/comments/118973844","html_url":"https://github.com/weaveworks/weave/pull/1065#issuecomment-118973844","issue_url":"https://api.github.com/repos/weaveworks/weave/issues/1065","id":118973844,"user":{"login":"rade","id":109109,"avatar_url":"https://avatars.githubusercontent.com/u/109109?v=3","gravatar_id":"","url":"https://api.github.com/users/rade","html_url":"https://github.com/rade","followers_url":"https://api.github.com/users/rade/followers","following_url":"https://api.github.com/users/rade/following{/other_user}","gists_url":"https://api.github.com/users/rade/gists{/gist_id}","starred_url":"https://api.github.com/users/rade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rade/subscriptions","organizations_url":"https://api.github.com/users/rade/orgs","repos_url":"https://api.github.com/users/rade/repos","events_url":"https://api.github.com/users/rade/events{/privacy}","received_events_url":"https://api.github.com/users/rade/received_events","type":"User","site_admin":false},"created_at":"2015-07-06T19:38:08Z","updated_at":"2015-07-06T19:38:08Z","body":"So [apparently](https://github.com/weaveworks/weave/issues/1091#issuecomment-118972128) this is also meant to fix #733. I'd rather see that done separately. Otherwise we need extra tests that will just distract from the main purpose of this PR."}}