{"action":"created","comment":{"url":"https://api.github.com/repos/amalgam8/amalgam8/pulls/comments/80700341","pull_request_review_id":1738824,"id":80700341,"diff_hunk":"@@ -82,12 +83,14 @@ func (agent *RegistrationAgent) Stop() {\n \n func (agent *RegistrationAgent) register() {\n \tfor {\n-\t\tregisteredInstance, err := agent.config.Client.Register(agent.config.ServiceInstance)\n-\t\tif err == nil {\n-\t\t\tgo agent.renew(registeredInstance)\n-\t\t\treturn\n+\t\tif agent.checkAppHealth(DefaultReregistrationDelay) {","path":"sidecar/register/registration.go","position":16,"original_position":16,"commit_id":"8686e6387e9430f08bb17601081c4a0e9b6ed591","original_commit_id":"99c3812bc9133a8c5b47d9753afa65dccc81082c","user":{"login":"ijsnellf","id":19473346,"avatar_url":"https://avatars.githubusercontent.com/u/19473346?v=3","gravatar_id":"","url":"https://api.github.com/users/ijsnellf","html_url":"https://github.com/ijsnellf","followers_url":"https://api.github.com/users/ijsnellf/followers","following_url":"https://api.github.com/users/ijsnellf/following{/other_user}","gists_url":"https://api.github.com/users/ijsnellf/gists{/gist_id}","starred_url":"https://api.github.com/users/ijsnellf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ijsnellf/subscriptions","organizations_url":"https://api.github.com/users/ijsnellf/orgs","repos_url":"https://api.github.com/users/ijsnellf/repos","events_url":"https://api.github.com/users/ijsnellf/events{/privacy}","received_events_url":"https://api.github.com/users/ijsnellf/received_events","type":"User","site_admin":false},"body":"I was also considering that design. My concern was that health checks could be as stale the health check interval, somewhere between [0, 20s) in the case where the health check interval is the same as the default heartbeat interval. However, as you point out, it would decouple the health check and heartbeat intervals, which is probably of greater value than ensuring the health check is as fresh as possible.","created_at":"2016-09-27T14:07:31Z","updated_at":"2016-09-27T14:07:31Z","html_url":"https://github.com/amalgam8/amalgam8/pull/294#discussion_r80700341","pull_request_url":"https://api.github.com/repos/amalgam8/amalgam8/pulls/294","_links":{"self":{"href":"https://api.github.com/repos/amalgam8/amalgam8/pulls/comments/80700341"},"html":{"href":"https://github.com/amalgam8/amalgam8/pull/294#discussion_r80700341"},"pull_request":{"href":"https://api.github.com/repos/amalgam8/amalgam8/pulls/294"}}},"pull_request":{"url":"https://api.github.com/repos/amalgam8/amalgam8/pulls/294","id":86420066,"html_url":"https://github.com/amalgam8/amalgam8/pull/294","diff_url":"https://github.com/amalgam8/amalgam8/pull/294.diff","patch_url":"https://github.com/amalgam8/amalgam8/pull/294.patch","issue_url":"https://api.github.com/repos/amalgam8/amalgam8/issues/294","number":294,"state":"open","locked":false,"title":"HTTP health checks in sidecar","user":{"login":"ijsnellf","id":19473346,"avatar_url":"https://avatars.githubusercontent.com/u/19473346?v=3","gravatar_id":"","url":"https://api.github.com/users/ijsnellf","html_url":"https://github.com/ijsnellf","followers_url":"https://api.github.com/users/ijsnellf/followers","following_url":"https://api.github.com/users/ijsnellf/following{/other_user}","gists_url":"https://api.github.com/users/ijsnellf/gists{/gist_id}","starred_url":"https://api.github.com/users/ijsnellf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ijsnellf/subscriptions","organizations_url":"https://api.github.com/users/ijsnellf/orgs","repos_url":"https://api.github.com/users/ijsnellf/repos","events_url":"https://api.github.com/users/ijsnellf/events{/privacy}","received_events_url":"https://api.github.com/users/ijsnellf/received_events","type":"User","site_admin":false},"body":"Adds simple HTTP health checks to the sidecar registration logic as described in https://github.com/amalgam8/amalgam8/issues/51. No TCP or shell script health check implementations are provided.\r\n\r\nHealth checks are performed asynchronously before registration and renewal. The failure of any health check will result in the sidecar de-registering the instance. Health checks are bounded by the interval between heartbeats --if a health check does not return within that time, the health check is considered to have timed out and the app is considered unhealthy. This is a very basic design that will need to be improved upon.","created_at":"2016-09-22T21:43:12Z","updated_at":"2016-09-27T14:07:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3ce5ea66880879c32a511b2a0243706a7c3166f1","assignee":{"login":"rshriram","id":8202871,"avatar_url":"https://avatars.githubusercontent.com/u/8202871?v=3","gravatar_id":"","url":"https://api.github.com/users/rshriram","html_url":"https://github.com/rshriram","followers_url":"https://api.github.com/users/rshriram/followers","following_url":"https://api.github.com/users/rshriram/following{/other_user}","gists_url":"https://api.github.com/users/rshriram/gists{/gist_id}","starred_url":"https://api.github.com/users/rshriram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rshriram/subscriptions","organizations_url":"https://api.github.com/users/rshriram/orgs","repos_url":"https://api.github.com/users/rshriram/repos","events_url":"https://api.github.com/users/rshriram/events{/privacy}","received_events_url":"https://api.github.com/users/rshriram/received_events","type":"User","site_admin":false},"assignees":[{"login":"rshriram","id":8202871,"avatar_url":"https://avatars.githubusercontent.com/u/8202871?v=3","gravatar_id":"","url":"https://api.github.com/users/rshriram","html_url":"https://github.com/rshriram","followers_url":"https://api.github.com/users/rshriram/followers","following_url":"https://api.github.com/users/rshriram/following{/other_user}","gists_url":"https://api.github.com/users/rshriram/gists{/gist_id}","starred_url":"https://api.github.com/users/rshriram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rshriram/subscriptions","organizations_url":"https://api.github.com/users/rshriram/orgs","repos_url":"https://api.github.com/users/rshriram/repos","events_url":"https://api.github.com/users/rshriram/events{/privacy}","received_events_url":"https://api.github.com/users/rshriram/received_events","type":"User","site_admin":false},{"login":"zcahana","id":17428696,"avatar_url":"https://avatars.githubusercontent.com/u/17428696?v=3","gravatar_id":"","url":"https://api.github.com/users/zcahana","html_url":"https://github.com/zcahana","followers_url":"https://api.github.com/users/zcahana/followers","following_url":"https://api.github.com/users/zcahana/following{/other_user}","gists_url":"https://api.github.com/users/zcahana/gists{/gist_id}","starred_url":"https://api.github.com/users/zcahana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zcahana/subscriptions","organizations_url":"https://api.github.com/users/zcahana/orgs","repos_url":"https://api.github.com/users/zcahana/repos","events_url":"https://api.github.com/users/zcahana/events{/privacy}","received_events_url":"https://api.github.com/users/zcahana/received_events","type":"User","site_admin":false},{"login":"GregHanson","id":19473391,"avatar_url":"https://avatars.githubusercontent.com/u/19473391?v=3","gravatar_id":"","url":"https://api.github.com/users/GregHanson","html_url":"https://github.com/GregHanson","followers_url":"https://api.github.com/users/GregHanson/followers","following_url":"https://api.github.com/users/GregHanson/following{/other_user}","gists_url":"https://api.github.com/users/GregHanson/gists{/gist_id}","starred_url":"https://api.github.com/users/GregHanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GregHanson/subscriptions","organizations_url":"https://api.github.com/users/GregHanson/orgs","repos_url":"https://api.github.com/users/GregHanson/repos","events_url":"https://api.github.com/users/GregHanson/events{/privacy}","received_events_url":"https://api.github.com/users/GregHanson/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/amalgam8/amalgam8/pulls/294/commits","review_comments_url":"https://api.github.com/repos/amalgam8/amalgam8/pulls/294/comments","review_comment_url":"https://api.github.com/repos/amalgam8/amalgam8/pulls/comments{/number}","comments_url":"https://api.github.com/repos/amalgam8/amalgam8/issues/294/comments","statuses_url":"https://api.github.com/repos/amalgam8/amalgam8/statuses/8686e6387e9430f08bb17601081c4a0e9b6ed591","head":{"label":"amalgam8:http_health_checks","ref":"http_health_checks","sha":"8686e6387e9430f08bb17601081c4a0e9b6ed591","user":{"login":"amalgam8","id":19418902,"avatar_url":"https://avatars.githubusercontent.com/u/19418902?v=3","gravatar_id":"","url":"https://api.github.com/users/amalgam8","html_url":"https://github.com/amalgam8","followers_url":"https://api.github.com/users/amalgam8/followers","following_url":"https://api.github.com/users/amalgam8/following{/other_user}","gists_url":"https://api.github.com/users/amalgam8/gists{/gist_id}","starred_url":"https://api.github.com/users/amalgam8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amalgam8/subscriptions","organizations_url":"https://api.github.com/users/amalgam8/orgs","repos_url":"https://api.github.com/users/amalgam8/repos","events_url":"https://api.github.com/users/amalgam8/events{/privacy}","received_events_url":"https://api.github.com/users/amalgam8/received_events","type":"Organization","site_admin":false},"repo":{"id":67527666,"name":"amalgam8","full_name":"amalgam8/amalgam8","owner":{"login":"amalgam8","id":19418902,"avatar_url":"https://avatars.githubusercontent.com/u/19418902?v=3","gravatar_id":"","url":"https://api.github.com/users/amalgam8","html_url":"https://github.com/amalgam8","followers_url":"https://api.github.com/users/amalgam8/followers","following_url":"https://api.github.com/users/amalgam8/following{/other_user}","gists_url":"https://api.github.com/users/amalgam8/gists{/gist_id}","starred_url":"https://api.github.com/users/amalgam8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amalgam8/subscriptions","organizations_url":"https://api.github.com/users/amalgam8/orgs","repos_url":"https://api.github.com/users/amalgam8/repos","events_url":"https://api.github.com/users/amalgam8/events{/privacy}","received_events_url":"https://api.github.com/users/amalgam8/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/amalgam8/amalgam8","description":"Content and Version-based Routing Fabric for Polyglot Microservices","fork":false,"url":"https://api.github.com/repos/amalgam8/amalgam8","forks_url":"https://api.github.com/repos/amalgam8/amalgam8/forks","keys_url":"https://api.github.com/repos/amalgam8/amalgam8/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amalgam8/amalgam8/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amalgam8/amalgam8/teams","hooks_url":"https://api.github.com/repos/amalgam8/amalgam8/hooks","issue_events_url":"https://api.github.com/repos/amalgam8/amalgam8/issues/events{/number}","events_url":"https://api.github.com/repos/amalgam8/amalgam8/events","assignees_url":"https://api.github.com/repos/amalgam8/amalgam8/assignees{/user}","branches_url":"https://api.github.com/repos/amalgam8/amalgam8/branches{/branch}","tags_url":"https://api.github.com/repos/amalgam8/amalgam8/tags","blobs_url":"https://api.github.com/repos/amalgam8/amalgam8/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amalgam8/amalgam8/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amalgam8/amalgam8/git/refs{/sha}","trees_url":"https://api.github.com/repos/amalgam8/amalgam8/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amalgam8/amalgam8/statuses/{sha}","languages_url":"https://api.github.com/repos/amalgam8/amalgam8/languages","stargazers_url":"https://api.github.com/repos/amalgam8/amalgam8/stargazers","contributors_url":"https://api.github.com/repos/amalgam8/amalgam8/contributors","subscribers_url":"https://api.github.com/repos/amalgam8/amalgam8/subscribers","subscription_url":"https://api.github.com/repos/amalgam8/amalgam8/subscription","commits_url":"https://api.github.com/repos/amalgam8/amalgam8/commits{/sha}","git_commits_url":"https://api.github.com/repos/amalgam8/amalgam8/git/commits{/sha}","comments_url":"https://api.github.com/repos/amalgam8/amalgam8/comments{/number}","issue_comment_url":"https://api.github.com/repos/amalgam8/amalgam8/issues/comments{/number}","contents_url":"https://api.github.com/repos/amalgam8/amalgam8/contents/{+path}","compare_url":"https://api.github.com/repos/amalgam8/amalgam8/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amalgam8/amalgam8/merges","archive_url":"https://api.github.com/repos/amalgam8/amalgam8/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amalgam8/amalgam8/downloads","issues_url":"https://api.github.com/repos/amalgam8/amalgam8/issues{/number}","pulls_url":"https://api.github.com/repos/amalgam8/amalgam8/pulls{/number}","milestones_url":"https://api.github.com/repos/amalgam8/amalgam8/milestones{/number}","notifications_url":"https://api.github.com/repos/amalgam8/amalgam8/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amalgam8/amalgam8/labels{/name}","releases_url":"https://api.github.com/repos/amalgam8/amalgam8/releases{/id}","deployments_url":"https://api.github.com/repos/amalgam8/amalgam8/deployments","created_at":"2016-09-06T16:43:20Z","updated_at":"2016-09-26T19:37:53Z","pushed_at":"2016-09-27T12:31:47Z","git_url":"git://github.com/amalgam8/amalgam8.git","ssh_url":"git@github.com:amalgam8/amalgam8.git","clone_url":"https://github.com/amalgam8/amalgam8.git","svn_url":"https://github.com/amalgam8/amalgam8","homepage":null,"size":23898,"stargazers_count":25,"watchers_count":25,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":27,"forks":14,"open_issues":27,"watchers":25,"default_branch":"master"}},"base":{"label":"amalgam8:master","ref":"master","sha":"ded32deb2f9040eb4b0147aabc836b040c6e0df3","user":{"login":"amalgam8","id":19418902,"avatar_url":"https://avatars.githubusercontent.com/u/19418902?v=3","gravatar_id":"","url":"https://api.github.com/users/amalgam8","html_url":"https://github.com/amalgam8","followers_url":"https://api.github.com/users/amalgam8/followers","following_url":"https://api.github.com/users/amalgam8/following{/other_user}","gists_url":"https://api.github.com/users/amalgam8/gists{/gist_id}","starred_url":"https://api.github.com/users/amalgam8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amalgam8/subscriptions","organizations_url":"https://api.github.com/users/amalgam8/orgs","repos_url":"https://api.github.com/users/amalgam8/repos","events_url":"https://api.github.com/users/amalgam8/events{/privacy}","received_events_url":"https://api.github.com/users/amalgam8/received_events","type":"Organization","site_admin":false},"repo":{"id":67527666,"name":"amalgam8","full_name":"amalgam8/amalgam8","owner":{"login":"amalgam8","id":19418902,"avatar_url":"https://avatars.githubusercontent.com/u/19418902?v=3","gravatar_id":"","url":"https://api.github.com/users/amalgam8","html_url":"https://github.com/amalgam8","followers_url":"https://api.github.com/users/amalgam8/followers","following_url":"https://api.github.com/users/amalgam8/following{/other_user}","gists_url":"https://api.github.com/users/amalgam8/gists{/gist_id}","starred_url":"https://api.github.com/users/amalgam8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amalgam8/subscriptions","organizations_url":"https://api.github.com/users/amalgam8/orgs","repos_url":"https://api.github.com/users/amalgam8/repos","events_url":"https://api.github.com/users/amalgam8/events{/privacy}","received_events_url":"https://api.github.com/users/amalgam8/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/amalgam8/amalgam8","description":"Content and Version-based Routing Fabric for Polyglot Microservices","fork":false,"url":"https://api.github.com/repos/amalgam8/amalgam8","forks_url":"https://api.github.com/repos/amalgam8/amalgam8/forks","keys_url":"https://api.github.com/repos/amalgam8/amalgam8/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amalgam8/amalgam8/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amalgam8/amalgam8/teams","hooks_url":"https://api.github.com/repos/amalgam8/amalgam8/hooks","issue_events_url":"https://api.github.com/repos/amalgam8/amalgam8/issues/events{/number}","events_url":"https://api.github.com/repos/amalgam8/amalgam8/events","assignees_url":"https://api.github.com/repos/amalgam8/amalgam8/assignees{/user}","branches_url":"https://api.github.com/repos/amalgam8/amalgam8/branches{/branch}","tags_url":"https://api.github.com/repos/amalgam8/amalgam8/tags","blobs_url":"https://api.github.com/repos/amalgam8/amalgam8/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amalgam8/amalgam8/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amalgam8/amalgam8/git/refs{/sha}","trees_url":"https://api.github.com/repos/amalgam8/amalgam8/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amalgam8/amalgam8/statuses/{sha}","languages_url":"https://api.github.com/repos/amalgam8/amalgam8/languages","stargazers_url":"https://api.github.com/repos/amalgam8/amalgam8/stargazers","contributors_url":"https://api.github.com/repos/amalgam8/amalgam8/contributors","subscribers_url":"https://api.github.com/repos/amalgam8/amalgam8/subscribers","subscription_url":"https://api.github.com/repos/amalgam8/amalgam8/subscription","commits_url":"https://api.github.com/repos/amalgam8/amalgam8/commits{/sha}","git_commits_url":"https://api.github.com/repos/amalgam8/amalgam8/git/commits{/sha}","comments_url":"https://api.github.com/repos/amalgam8/amalgam8/comments{/number}","issue_comment_url":"https://api.github.com/repos/amalgam8/amalgam8/issues/comments{/number}","contents_url":"https://api.github.com/repos/amalgam8/amalgam8/contents/{+path}","compare_url":"https://api.github.com/repos/amalgam8/amalgam8/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amalgam8/amalgam8/merges","archive_url":"https://api.github.com/repos/amalgam8/amalgam8/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amalgam8/amalgam8/downloads","issues_url":"https://api.github.com/repos/amalgam8/amalgam8/issues{/number}","pulls_url":"https://api.github.com/repos/amalgam8/amalgam8/pulls{/number}","milestones_url":"https://api.github.com/repos/amalgam8/amalgam8/milestones{/number}","notifications_url":"https://api.github.com/repos/amalgam8/amalgam8/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amalgam8/amalgam8/labels{/name}","releases_url":"https://api.github.com/repos/amalgam8/amalgam8/releases{/id}","deployments_url":"https://api.github.com/repos/amalgam8/amalgam8/deployments","created_at":"2016-09-06T16:43:20Z","updated_at":"2016-09-26T19:37:53Z","pushed_at":"2016-09-27T12:31:47Z","git_url":"git://github.com/amalgam8/amalgam8.git","ssh_url":"git@github.com:amalgam8/amalgam8.git","clone_url":"https://github.com/amalgam8/amalgam8.git","svn_url":"https://github.com/amalgam8/amalgam8","homepage":null,"size":23898,"stargazers_count":25,"watchers_count":25,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":27,"forks":14,"open_issues":27,"watchers":25,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/amalgam8/amalgam8/pulls/294"},"html":{"href":"https://github.com/amalgam8/amalgam8/pull/294"},"issue":{"href":"https://api.github.com/repos/amalgam8/amalgam8/issues/294"},"comments":{"href":"https://api.github.com/repos/amalgam8/amalgam8/issues/294/comments"},"review_comments":{"href":"https://api.github.com/repos/amalgam8/amalgam8/pulls/294/comments"},"review_comment":{"href":"https://api.github.com/repos/amalgam8/amalgam8/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/amalgam8/amalgam8/pulls/294/commits"},"statuses":{"href":"https://api.github.com/repos/amalgam8/amalgam8/statuses/8686e6387e9430f08bb17601081c4a0e9b6ed591"}}}}
{"actor":{"display_login":"ijsnellf"}}