{"action":"created","comment":{"url":"https://api.github.com/repos/uber/hyperbahn/pulls/comments/46235558","id":46235558,"diff_hunk":"@@ -350,9 +354,10 @@ function handleLazily(conn, reqFrame) {\n         }\n     }\n \n-    var serviceChannel = self.channel.subChannels[serviceName];\n+    // use the rd (routing delegate) or the serviceName if there was no rd set\n+    var serviceChannel = self.channel.subChannels[rd || serviceName];","path":"service-proxy.js","position":24,"original_position":24,"commit_id":"f20c948523c417b7fa17953a42727b57f7448d33","original_commit_id":"f20c948523c417b7fa17953a42727b57f7448d33","user":{"login":"Raynos","id":479538,"avatar_url":"https://avatars.githubusercontent.com/u/479538?v=3","gravatar_id":"","url":"https://api.github.com/users/Raynos","html_url":"https://github.com/Raynos","followers_url":"https://api.github.com/users/Raynos/followers","following_url":"https://api.github.com/users/Raynos/following{/other_user}","gists_url":"https://api.github.com/users/Raynos/gists{/gist_id}","starred_url":"https://api.github.com/users/Raynos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Raynos/subscriptions","organizations_url":"https://api.github.com/users/Raynos/orgs","repos_url":"https://api.github.com/users/Raynos/repos","events_url":"https://api.github.com/users/Raynos/events{/privacy}","received_events_url":"https://api.github.com/users/Raynos/received_events","type":"User","site_admin":false},"body":"The weird thing is that we double count the rate limiter. we shouldnt increment rate limit for service if we do not route to service :(","created_at":"2015-12-01T03:02:39Z","updated_at":"2015-12-01T03:02:39Z","html_url":"https://github.com/uber/hyperbahn/pull/177#discussion_r46235558","pull_request_url":"https://api.github.com/repos/uber/hyperbahn/pulls/177","_links":{"self":{"href":"https://api.github.com/repos/uber/hyperbahn/pulls/comments/46235558"},"html":{"href":"https://github.com/uber/hyperbahn/pull/177#discussion_r46235558"},"pull_request":{"href":"https://api.github.com/repos/uber/hyperbahn/pulls/177"}}},"pull_request":{"url":"https://api.github.com/repos/uber/hyperbahn/pulls/177","id":52207161,"html_url":"https://github.com/uber/hyperbahn/pull/177","diff_url":"https://github.com/uber/hyperbahn/pull/177.diff","patch_url":"https://github.com/uber/hyperbahn/pull/177.patch","issue_url":"https://api.github.com/repos/uber/hyperbahn/issues/177","number":177,"state":"open","locked":false,"title":"service-proxy: implement routing delegate header","user":{"login":"rf","id":1093601,"avatar_url":"https://avatars.githubusercontent.com/u/1093601?v=3","gravatar_id":"","url":"https://api.github.com/users/rf","html_url":"https://github.com/rf","followers_url":"https://api.github.com/users/rf/followers","following_url":"https://api.github.com/users/rf/following{/other_user}","gists_url":"https://api.github.com/users/rf/gists{/gist_id}","starred_url":"https://api.github.com/users/rf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rf/subscriptions","organizations_url":"https://api.github.com/users/rf/orgs","repos_url":"https://api.github.com/users/rf/repos","events_url":"https://api.github.com/users/rf/events{/privacy}","received_events_url":"https://api.github.com/users/rf/received_events","type":"User","site_admin":false},"body":"r @Raynos @jcorbin \r\n\r\nIf there's a routing delegate we defer to it as soon as possible.\r\n\r\nShould this actually hit the rate limiting logic, at least for total RPS?","created_at":"2015-12-01T02:06:25Z","updated_at":"2015-12-01T03:02:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3e6055d224b7ba8d48876af2e2a3956042ad8504","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/uber/hyperbahn/pulls/177/commits","review_comments_url":"https://api.github.com/repos/uber/hyperbahn/pulls/177/comments","review_comment_url":"https://api.github.com/repos/uber/hyperbahn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uber/hyperbahn/issues/177/comments","statuses_url":"https://api.github.com/repos/uber/hyperbahn/statuses/f20c948523c417b7fa17953a42727b57f7448d33","head":{"label":"uber:rd-header","ref":"rd-header","sha":"f20c948523c417b7fa17953a42727b57f7448d33","user":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"repo":{"id":41167537,"name":"hyperbahn","full_name":"uber/hyperbahn","owner":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uber/hyperbahn","description":"Service discovery and routing for large scale microservice operations","fork":false,"url":"https://api.github.com/repos/uber/hyperbahn","forks_url":"https://api.github.com/repos/uber/hyperbahn/forks","keys_url":"https://api.github.com/repos/uber/hyperbahn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uber/hyperbahn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uber/hyperbahn/teams","hooks_url":"https://api.github.com/repos/uber/hyperbahn/hooks","issue_events_url":"https://api.github.com/repos/uber/hyperbahn/issues/events{/number}","events_url":"https://api.github.com/repos/uber/hyperbahn/events","assignees_url":"https://api.github.com/repos/uber/hyperbahn/assignees{/user}","branches_url":"https://api.github.com/repos/uber/hyperbahn/branches{/branch}","tags_url":"https://api.github.com/repos/uber/hyperbahn/tags","blobs_url":"https://api.github.com/repos/uber/hyperbahn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uber/hyperbahn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uber/hyperbahn/git/refs{/sha}","trees_url":"https://api.github.com/repos/uber/hyperbahn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uber/hyperbahn/statuses/{sha}","languages_url":"https://api.github.com/repos/uber/hyperbahn/languages","stargazers_url":"https://api.github.com/repos/uber/hyperbahn/stargazers","contributors_url":"https://api.github.com/repos/uber/hyperbahn/contributors","subscribers_url":"https://api.github.com/repos/uber/hyperbahn/subscribers","subscription_url":"https://api.github.com/repos/uber/hyperbahn/subscription","commits_url":"https://api.github.com/repos/uber/hyperbahn/commits{/sha}","git_commits_url":"https://api.github.com/repos/uber/hyperbahn/git/commits{/sha}","comments_url":"https://api.github.com/repos/uber/hyperbahn/comments{/number}","issue_comment_url":"https://api.github.com/repos/uber/hyperbahn/issues/comments{/number}","contents_url":"https://api.github.com/repos/uber/hyperbahn/contents/{+path}","compare_url":"https://api.github.com/repos/uber/hyperbahn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uber/hyperbahn/merges","archive_url":"https://api.github.com/repos/uber/hyperbahn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uber/hyperbahn/downloads","issues_url":"https://api.github.com/repos/uber/hyperbahn/issues{/number}","pulls_url":"https://api.github.com/repos/uber/hyperbahn/pulls{/number}","milestones_url":"https://api.github.com/repos/uber/hyperbahn/milestones{/number}","notifications_url":"https://api.github.com/repos/uber/hyperbahn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uber/hyperbahn/labels{/name}","releases_url":"https://api.github.com/repos/uber/hyperbahn/releases{/id}","created_at":"2015-08-21T17:04:51Z","updated_at":"2015-11-30T01:04:09Z","pushed_at":"2015-12-01T02:26:40Z","git_url":"git://github.com/uber/hyperbahn.git","ssh_url":"git@github.com:uber/hyperbahn.git","clone_url":"https://github.com/uber/hyperbahn.git","svn_url":"https://github.com/uber/hyperbahn","homepage":"","size":883,"stargazers_count":62,"watchers_count":62,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":25,"forks":7,"open_issues":25,"watchers":62,"default_branch":"master"}},"base":{"label":"uber:master","ref":"master","sha":"3754306b6dbaf9413182fe9299d1bf74a632e7ea","user":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"repo":{"id":41167537,"name":"hyperbahn","full_name":"uber/hyperbahn","owner":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uber/hyperbahn","description":"Service discovery and routing for large scale microservice operations","fork":false,"url":"https://api.github.com/repos/uber/hyperbahn","forks_url":"https://api.github.com/repos/uber/hyperbahn/forks","keys_url":"https://api.github.com/repos/uber/hyperbahn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uber/hyperbahn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uber/hyperbahn/teams","hooks_url":"https://api.github.com/repos/uber/hyperbahn/hooks","issue_events_url":"https://api.github.com/repos/uber/hyperbahn/issues/events{/number}","events_url":"https://api.github.com/repos/uber/hyperbahn/events","assignees_url":"https://api.github.com/repos/uber/hyperbahn/assignees{/user}","branches_url":"https://api.github.com/repos/uber/hyperbahn/branches{/branch}","tags_url":"https://api.github.com/repos/uber/hyperbahn/tags","blobs_url":"https://api.github.com/repos/uber/hyperbahn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uber/hyperbahn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uber/hyperbahn/git/refs{/sha}","trees_url":"https://api.github.com/repos/uber/hyperbahn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uber/hyperbahn/statuses/{sha}","languages_url":"https://api.github.com/repos/uber/hyperbahn/languages","stargazers_url":"https://api.github.com/repos/uber/hyperbahn/stargazers","contributors_url":"https://api.github.com/repos/uber/hyperbahn/contributors","subscribers_url":"https://api.github.com/repos/uber/hyperbahn/subscribers","subscription_url":"https://api.github.com/repos/uber/hyperbahn/subscription","commits_url":"https://api.github.com/repos/uber/hyperbahn/commits{/sha}","git_commits_url":"https://api.github.com/repos/uber/hyperbahn/git/commits{/sha}","comments_url":"https://api.github.com/repos/uber/hyperbahn/comments{/number}","issue_comment_url":"https://api.github.com/repos/uber/hyperbahn/issues/comments{/number}","contents_url":"https://api.github.com/repos/uber/hyperbahn/contents/{+path}","compare_url":"https://api.github.com/repos/uber/hyperbahn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uber/hyperbahn/merges","archive_url":"https://api.github.com/repos/uber/hyperbahn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uber/hyperbahn/downloads","issues_url":"https://api.github.com/repos/uber/hyperbahn/issues{/number}","pulls_url":"https://api.github.com/repos/uber/hyperbahn/pulls{/number}","milestones_url":"https://api.github.com/repos/uber/hyperbahn/milestones{/number}","notifications_url":"https://api.github.com/repos/uber/hyperbahn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uber/hyperbahn/labels{/name}","releases_url":"https://api.github.com/repos/uber/hyperbahn/releases{/id}","created_at":"2015-08-21T17:04:51Z","updated_at":"2015-11-30T01:04:09Z","pushed_at":"2015-12-01T02:26:40Z","git_url":"git://github.com/uber/hyperbahn.git","ssh_url":"git@github.com:uber/hyperbahn.git","clone_url":"https://github.com/uber/hyperbahn.git","svn_url":"https://github.com/uber/hyperbahn","homepage":"","size":883,"stargazers_count":62,"watchers_count":62,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":25,"forks":7,"open_issues":25,"watchers":62,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uber/hyperbahn/pulls/177"},"html":{"href":"https://github.com/uber/hyperbahn/pull/177"},"issue":{"href":"https://api.github.com/repos/uber/hyperbahn/issues/177"},"comments":{"href":"https://api.github.com/repos/uber/hyperbahn/issues/177/comments"},"review_comments":{"href":"https://api.github.com/repos/uber/hyperbahn/pulls/177/comments"},"review_comment":{"href":"https://api.github.com/repos/uber/hyperbahn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uber/hyperbahn/pulls/177/commits"},"statuses":{"href":"https://api.github.com/repos/uber/hyperbahn/statuses/f20c948523c417b7fa17953a42727b57f7448d33"}}}}