{"action":"created","comment":{"url":"https://api.github.com/repos/grpc/grpc/pulls/comments/36790328","id":36790328,"diff_hunk":"@@ -0,0 +1,70 @@\n+GRPC Health Checking Protocol\n+================================\n+\n+Health checks are used to probe whether the server is able to handle rpcs. The\n+client-to-server health checking can happen from point to point or via some\n+control system. A server may choose to reply “unhealthy” because it\n+is not ready to take requests, it is shutting down or some other reason.\n+The client can act accordingly if the response is not received within some time\n+window or the response says unhealthy in it.\n+\n+\n+A GRPC service is used as the health checking mechanism for both simple\n+client-to-server scenario and other control systems such as load-balancing.\n+Being a high\n+level service provides some benefits. Firstly, since it is a GRPC service\n+itself, doing a health check is in the same format as a normal rpc. Secondly,\n+it has rich semantics such as per-service health status. Thirdly, as a GRPC\n+service, it is able reuse all the existing billing, quota infrastructure, etc,\n+and thus the server has full control over the access of the health checking\n+service.\n+\n+## Service Definition\n+\n+The server should export a service defined in the following proto:\n+\n+```\n+syntax = \"proto3\";\n+\n+package grpc.health.v1alpha;\n+\n+message HealthCheckRequest {\n+  string service = 1;\n+}\n+\n+message HealthCheckResponse {\n+  enum ServingStatus {\n+    UNKNOWN = 0;\n+    SERVING = 1;\n+    NOT_SERVING = 2;","path":"doc/health-checking.md","position":39,"original_position":39,"commit_id":"bc435e7ee99c37d8ffcad15c957dc75c947c9e7b","original_commit_id":"bc435e7ee99c37d8ffcad15c957dc75c947c9e7b","user":{"login":"yang-g","id":10122250,"avatar_url":"https://avatars.githubusercontent.com/u/10122250?v=3","gravatar_id":"","url":"https://api.github.com/users/yang-g","html_url":"https://github.com/yang-g","followers_url":"https://api.github.com/users/yang-g/followers","following_url":"https://api.github.com/users/yang-g/following{/other_user}","gists_url":"https://api.github.com/users/yang-g/gists{/gist_id}","starred_url":"https://api.github.com/users/yang-g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yang-g/subscriptions","organizations_url":"https://api.github.com/users/yang-g/orgs","repos_url":"https://api.github.com/users/yang-g/repos","events_url":"https://api.github.com/users/yang-g/events{/privacy}","received_events_url":"https://api.github.com/users/yang-g/received_events","type":"User","site_admin":false},"body":"We considered something like lameduck but it was not clear that state is needed in the first version.","created_at":"2015-08-11T19:52:43Z","updated_at":"2015-08-11T19:52:43Z","html_url":"https://github.com/grpc/grpc/pull/2806#discussion_r36790328","pull_request_url":"https://api.github.com/repos/grpc/grpc/pulls/2806","_links":{"self":{"href":"https://api.github.com/repos/grpc/grpc/pulls/comments/36790328"},"html":{"href":"https://github.com/grpc/grpc/pull/2806#discussion_r36790328"},"pull_request":{"href":"https://api.github.com/repos/grpc/grpc/pulls/2806"}}},"pull_request":{"url":"https://api.github.com/repos/grpc/grpc/pulls/2806","id":41703806,"html_url":"https://github.com/grpc/grpc/pull/2806","diff_url":"https://github.com/grpc/grpc/pull/2806.diff","patch_url":"https://github.com/grpc/grpc/pull/2806.patch","issue_url":"https://api.github.com/repos/grpc/grpc/issues/2806","number":2806,"state":"closed","locked":false,"title":"health checking protocol doc","user":{"login":"yang-g","id":10122250,"avatar_url":"https://avatars.githubusercontent.com/u/10122250?v=3","gravatar_id":"","url":"https://api.github.com/users/yang-g","html_url":"https://github.com/yang-g","followers_url":"https://api.github.com/users/yang-g/followers","following_url":"https://api.github.com/users/yang-g/following{/other_user}","gists_url":"https://api.github.com/users/yang-g/gists{/gist_id}","starred_url":"https://api.github.com/users/yang-g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yang-g/subscriptions","organizations_url":"https://api.github.com/users/yang-g/orgs","repos_url":"https://api.github.com/users/yang-g/repos","events_url":"https://api.github.com/users/yang-g/events{/privacy}","received_events_url":"https://api.github.com/users/yang-g/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-05T17:23:13Z","updated_at":"2015-08-11T19:52:44Z","closed_at":"2015-08-11T17:27:23Z","merged_at":"2015-08-11T17:27:23Z","merge_commit_sha":"8063f53c114af2c4f630e4e2f7df448048d0d225","assignee":{"login":"ejona86","id":2811396,"avatar_url":"https://avatars.githubusercontent.com/u/2811396?v=3","gravatar_id":"","url":"https://api.github.com/users/ejona86","html_url":"https://github.com/ejona86","followers_url":"https://api.github.com/users/ejona86/followers","following_url":"https://api.github.com/users/ejona86/following{/other_user}","gists_url":"https://api.github.com/users/ejona86/gists{/gist_id}","starred_url":"https://api.github.com/users/ejona86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ejona86/subscriptions","organizations_url":"https://api.github.com/users/ejona86/orgs","repos_url":"https://api.github.com/users/ejona86/repos","events_url":"https://api.github.com/users/ejona86/events{/privacy}","received_events_url":"https://api.github.com/users/ejona86/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/grpc/grpc/milestones/25","html_url":"https://github.com/grpc/grpc/milestones/Beta","labels_url":"https://api.github.com/repos/grpc/grpc/milestones/25/labels","id":1134869,"number":25,"title":"Beta","description":"","creator":{"login":"ctiller","id":10120821,"avatar_url":"https://avatars.githubusercontent.com/u/10120821?v=3","gravatar_id":"","url":"https://api.github.com/users/ctiller","html_url":"https://github.com/ctiller","followers_url":"https://api.github.com/users/ctiller/followers","following_url":"https://api.github.com/users/ctiller/following{/other_user}","gists_url":"https://api.github.com/users/ctiller/gists{/gist_id}","starred_url":"https://api.github.com/users/ctiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctiller/subscriptions","organizations_url":"https://api.github.com/users/ctiller/orgs","repos_url":"https://api.github.com/users/ctiller/repos","events_url":"https://api.github.com/users/ctiller/events{/privacy}","received_events_url":"https://api.github.com/users/ctiller/received_events","type":"User","site_admin":false},"open_issues":156,"closed_issues":307,"state":"open","created_at":"2015-05-26T22:29:20Z","updated_at":"2015-08-11T18:39:53Z","due_on":"2015-08-29T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/grpc/grpc/pulls/2806/commits","review_comments_url":"https://api.github.com/repos/grpc/grpc/pulls/2806/comments","review_comment_url":"https://api.github.com/repos/grpc/grpc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/grpc/grpc/issues/2806/comments","statuses_url":"https://api.github.com/repos/grpc/grpc/statuses/bc435e7ee99c37d8ffcad15c957dc75c947c9e7b","head":{"label":"yang-g:health_check_spec","ref":"health_check_spec","sha":"bc435e7ee99c37d8ffcad15c957dc75c947c9e7b","user":{"login":"yang-g","id":10122250,"avatar_url":"https://avatars.githubusercontent.com/u/10122250?v=3","gravatar_id":"","url":"https://api.github.com/users/yang-g","html_url":"https://github.com/yang-g","followers_url":"https://api.github.com/users/yang-g/followers","following_url":"https://api.github.com/users/yang-g/following{/other_user}","gists_url":"https://api.github.com/users/yang-g/gists{/gist_id}","starred_url":"https://api.github.com/users/yang-g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yang-g/subscriptions","organizations_url":"https://api.github.com/users/yang-g/orgs","repos_url":"https://api.github.com/users/yang-g/repos","events_url":"https://api.github.com/users/yang-g/events{/privacy}","received_events_url":"https://api.github.com/users/yang-g/received_events","type":"User","site_admin":false},"repo":{"id":31379035,"name":"grpc","full_name":"yang-g/grpc","owner":{"login":"yang-g","id":10122250,"avatar_url":"https://avatars.githubusercontent.com/u/10122250?v=3","gravatar_id":"","url":"https://api.github.com/users/yang-g","html_url":"https://github.com/yang-g","followers_url":"https://api.github.com/users/yang-g/followers","following_url":"https://api.github.com/users/yang-g/following{/other_user}","gists_url":"https://api.github.com/users/yang-g/gists{/gist_id}","starred_url":"https://api.github.com/users/yang-g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yang-g/subscriptions","organizations_url":"https://api.github.com/users/yang-g/orgs","repos_url":"https://api.github.com/users/yang-g/repos","events_url":"https://api.github.com/users/yang-g/events{/privacy}","received_events_url":"https://api.github.com/users/yang-g/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yang-g/grpc","description":"The C based gRPC (C++, Node.js, Python, Ruby, Objective-C, PHP, C#)","fork":true,"url":"https://api.github.com/repos/yang-g/grpc","forks_url":"https://api.github.com/repos/yang-g/grpc/forks","keys_url":"https://api.github.com/repos/yang-g/grpc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yang-g/grpc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yang-g/grpc/teams","hooks_url":"https://api.github.com/repos/yang-g/grpc/hooks","issue_events_url":"https://api.github.com/repos/yang-g/grpc/issues/events{/number}","events_url":"https://api.github.com/repos/yang-g/grpc/events","assignees_url":"https://api.github.com/repos/yang-g/grpc/assignees{/user}","branches_url":"https://api.github.com/repos/yang-g/grpc/branches{/branch}","tags_url":"https://api.github.com/repos/yang-g/grpc/tags","blobs_url":"https://api.github.com/repos/yang-g/grpc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yang-g/grpc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yang-g/grpc/git/refs{/sha}","trees_url":"https://api.github.com/repos/yang-g/grpc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yang-g/grpc/statuses/{sha}","languages_url":"https://api.github.com/repos/yang-g/grpc/languages","stargazers_url":"https://api.github.com/repos/yang-g/grpc/stargazers","contributors_url":"https://api.github.com/repos/yang-g/grpc/contributors","subscribers_url":"https://api.github.com/repos/yang-g/grpc/subscribers","subscription_url":"https://api.github.com/repos/yang-g/grpc/subscription","commits_url":"https://api.github.com/repos/yang-g/grpc/commits{/sha}","git_commits_url":"https://api.github.com/repos/yang-g/grpc/git/commits{/sha}","comments_url":"https://api.github.com/repos/yang-g/grpc/comments{/number}","issue_comment_url":"https://api.github.com/repos/yang-g/grpc/issues/comments{/number}","contents_url":"https://api.github.com/repos/yang-g/grpc/contents/{+path}","compare_url":"https://api.github.com/repos/yang-g/grpc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yang-g/grpc/merges","archive_url":"https://api.github.com/repos/yang-g/grpc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yang-g/grpc/downloads","issues_url":"https://api.github.com/repos/yang-g/grpc/issues{/number}","pulls_url":"https://api.github.com/repos/yang-g/grpc/pulls{/number}","milestones_url":"https://api.github.com/repos/yang-g/grpc/milestones{/number}","notifications_url":"https://api.github.com/repos/yang-g/grpc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yang-g/grpc/labels{/name}","releases_url":"https://api.github.com/repos/yang-g/grpc/releases{/id}","created_at":"2015-02-26T17:23:56Z","updated_at":"2015-05-07T17:43:42Z","pushed_at":"2015-08-11T19:37:52Z","git_url":"git://github.com/yang-g/grpc.git","ssh_url":"git@github.com:yang-g/grpc.git","clone_url":"https://github.com/yang-g/grpc.git","svn_url":"https://github.com/yang-g/grpc","homepage":"","size":42927,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"grpc:master","ref":"master","sha":"832a8c1a9c69eefd84a2fae5f6870a65977bd24d","user":{"login":"grpc","id":7802525,"avatar_url":"https://avatars.githubusercontent.com/u/7802525?v=3","gravatar_id":"","url":"https://api.github.com/users/grpc","html_url":"https://github.com/grpc","followers_url":"https://api.github.com/users/grpc/followers","following_url":"https://api.github.com/users/grpc/following{/other_user}","gists_url":"https://api.github.com/users/grpc/gists{/gist_id}","starred_url":"https://api.github.com/users/grpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grpc/subscriptions","organizations_url":"https://api.github.com/users/grpc/orgs","repos_url":"https://api.github.com/users/grpc/repos","events_url":"https://api.github.com/users/grpc/events{/privacy}","received_events_url":"https://api.github.com/users/grpc/received_events","type":"Organization","site_admin":false},"repo":{"id":27729880,"name":"grpc","full_name":"grpc/grpc","owner":{"login":"grpc","id":7802525,"avatar_url":"https://avatars.githubusercontent.com/u/7802525?v=3","gravatar_id":"","url":"https://api.github.com/users/grpc","html_url":"https://github.com/grpc","followers_url":"https://api.github.com/users/grpc/followers","following_url":"https://api.github.com/users/grpc/following{/other_user}","gists_url":"https://api.github.com/users/grpc/gists{/gist_id}","starred_url":"https://api.github.com/users/grpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grpc/subscriptions","organizations_url":"https://api.github.com/users/grpc/orgs","repos_url":"https://api.github.com/users/grpc/repos","events_url":"https://api.github.com/users/grpc/events{/privacy}","received_events_url":"https://api.github.com/users/grpc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/grpc/grpc","description":"The C based gRPC (C++, Node.js, Python, Ruby, Objective-C, PHP, C#)","fork":false,"url":"https://api.github.com/repos/grpc/grpc","forks_url":"https://api.github.com/repos/grpc/grpc/forks","keys_url":"https://api.github.com/repos/grpc/grpc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grpc/grpc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grpc/grpc/teams","hooks_url":"https://api.github.com/repos/grpc/grpc/hooks","issue_events_url":"https://api.github.com/repos/grpc/grpc/issues/events{/number}","events_url":"https://api.github.com/repos/grpc/grpc/events","assignees_url":"https://api.github.com/repos/grpc/grpc/assignees{/user}","branches_url":"https://api.github.com/repos/grpc/grpc/branches{/branch}","tags_url":"https://api.github.com/repos/grpc/grpc/tags","blobs_url":"https://api.github.com/repos/grpc/grpc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grpc/grpc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grpc/grpc/git/refs{/sha}","trees_url":"https://api.github.com/repos/grpc/grpc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grpc/grpc/statuses/{sha}","languages_url":"https://api.github.com/repos/grpc/grpc/languages","stargazers_url":"https://api.github.com/repos/grpc/grpc/stargazers","contributors_url":"https://api.github.com/repos/grpc/grpc/contributors","subscribers_url":"https://api.github.com/repos/grpc/grpc/subscribers","subscription_url":"https://api.github.com/repos/grpc/grpc/subscription","commits_url":"https://api.github.com/repos/grpc/grpc/commits{/sha}","git_commits_url":"https://api.github.com/repos/grpc/grpc/git/commits{/sha}","comments_url":"https://api.github.com/repos/grpc/grpc/comments{/number}","issue_comment_url":"https://api.github.com/repos/grpc/grpc/issues/comments{/number}","contents_url":"https://api.github.com/repos/grpc/grpc/contents/{+path}","compare_url":"https://api.github.com/repos/grpc/grpc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grpc/grpc/merges","archive_url":"https://api.github.com/repos/grpc/grpc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grpc/grpc/downloads","issues_url":"https://api.github.com/repos/grpc/grpc/issues{/number}","pulls_url":"https://api.github.com/repos/grpc/grpc/pulls{/number}","milestones_url":"https://api.github.com/repos/grpc/grpc/milestones{/number}","notifications_url":"https://api.github.com/repos/grpc/grpc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grpc/grpc/labels{/name}","releases_url":"https://api.github.com/repos/grpc/grpc/releases{/id}","created_at":"2014-12-08T18:58:53Z","updated_at":"2015-08-11T16:33:15Z","pushed_at":"2015-08-11T19:38:16Z","git_url":"git://github.com/grpc/grpc.git","ssh_url":"git@github.com:grpc/grpc.git","clone_url":"https://github.com/grpc/grpc.git","svn_url":"https://github.com/grpc/grpc","homepage":"","size":156667,"stargazers_count":3012,"watchers_count":3012,"language":"C","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":444,"mirror_url":null,"open_issues_count":402,"forks":444,"open_issues":402,"watchers":3012,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/grpc/grpc/pulls/2806"},"html":{"href":"https://github.com/grpc/grpc/pull/2806"},"issue":{"href":"https://api.github.com/repos/grpc/grpc/issues/2806"},"comments":{"href":"https://api.github.com/repos/grpc/grpc/issues/2806/comments"},"review_comments":{"href":"https://api.github.com/repos/grpc/grpc/pulls/2806/comments"},"review_comment":{"href":"https://api.github.com/repos/grpc/grpc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/grpc/grpc/pulls/2806/commits"},"statuses":{"href":"https://api.github.com/repos/grpc/grpc/statuses/bc435e7ee99c37d8ffcad15c957dc75c947c9e7b"}}}}