{"action":"created","comment":{"url":"https://api.github.com/repos/pingcap/docs/pulls/comments/350521608","pull_request_review_id":322702395,"id":350521608,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM1MDUyMTYwOA==","diff_hunk":"@@ -0,0 +1,222 @@\n+---\n+title: HAProxy Best Practices\n+summary: This document describes best practices for configuration and usage of HAProxy in TiDB.\n+category: reference\n+---\n+\n+# HAProxy Best Practices\n+\n+This document describes best practices for configuration and usage of HAProxy in TiDB. HAProxy is a TCP load balancer. TiDB clients can manipulate data by connecting to the floating virtual IP address provided by HAProxy to achieve load balancing in the TiDB server layer.\n+\n+![HAProxy Best Practices in TiDB](/media/haproxy.jpg)\n+\n+## Introduction to HAProxy\n+\n+[HAProxy](https://github.com/haproxy/haproxy) is free, open source software written in C language that provides a high availability load balancer and proxy server for TCP and HTTP-based applications. Because of its fast and efficient use of CPU and memory, HAProxy is now widely used by many well-known websites such as GitHub, Bitbucket, Stack Overflow, Reddit, Tumblr, Twitter and Tuenti, and Amazon Web Services.\n+\n+HAProxy is written in year 2000 by Willy Tarreau, the core contributor to the Linux kernel, who is still responsible for the maintenance of the project and provides free software updates in the open source community. The latest stable version 2.0.0 was released on August 16, 2019, bringing more [excellent features](https://www.haproxy.com/blog/haproxy-2-0-and-beyond/).\n+\n+## Basic features\n+\n+-[High Availability](http://cbonte.github.io/haproxy-dconv/1.9/intro.html#3.3.4): HAProxy provides high availability with support for a graceful shutdown and a seamless switchover;","path":"dev/reference/best-practices/haproxy.md","position":21,"original_position":21,"commit_id":"660ca1776922207727db7c481fcf792f39203aa5","original_commit_id":"660ca1776922207727db7c481fcf792f39203aa5","user":{"login":"juliezhang1112","id":44054033,"node_id":"MDQ6VXNlcjQ0MDU0MDMz","avatar_url":"https://avatars2.githubusercontent.com/u/44054033?v=4","gravatar_id":"","url":"https://api.github.com/users/juliezhang1112","html_url":"https://github.com/juliezhang1112","followers_url":"https://api.github.com/users/juliezhang1112/followers","following_url":"https://api.github.com/users/juliezhang1112/following{/other_user}","gists_url":"https://api.github.com/users/juliezhang1112/gists{/gist_id}","starred_url":"https://api.github.com/users/juliezhang1112/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliezhang1112/subscriptions","organizations_url":"https://api.github.com/users/juliezhang1112/orgs","repos_url":"https://api.github.com/users/juliezhang1112/repos","events_url":"https://api.github.com/users/juliezhang1112/events{/privacy}","received_events_url":"https://api.github.com/users/juliezhang1112/received_events","type":"User","site_admin":false},"body":"Got it!","created_at":"2019-11-26T02:50:31Z","updated_at":"2019-11-26T02:50:32Z","html_url":"https://github.com/pingcap/docs/pull/1668#discussion_r350521608","pull_request_url":"https://api.github.com/repos/pingcap/docs/pulls/1668","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/pingcap/docs/pulls/comments/350521608"},"html":{"href":"https://github.com/pingcap/docs/pull/1668#discussion_r350521608"},"pull_request":{"href":"https://api.github.com/repos/pingcap/docs/pulls/1668"}},"in_reply_to_id":350517824},"pull_request":{"url":"https://api.github.com/repos/pingcap/docs/pulls/1668","id":345169400,"node_id":"MDExOlB1bGxSZXF1ZXN0MzQ1MTY5NDAw","html_url":"https://github.com/pingcap/docs/pull/1668","diff_url":"https://github.com/pingcap/docs/pull/1668.diff","patch_url":"https://github.com/pingcap/docs/pull/1668.patch","issue_url":"https://api.github.com/repos/pingcap/docs/issues/1668","number":1668,"state":"open","locked":false,"title":"reference/best-practices: add HAProxy Best Practice doc","user":{"login":"juliezhang1112","id":44054033,"node_id":"MDQ6VXNlcjQ0MDU0MDMz","avatar_url":"https://avatars2.githubusercontent.com/u/44054033?v=4","gravatar_id":"","url":"https://api.github.com/users/juliezhang1112","html_url":"https://github.com/juliezhang1112","followers_url":"https://api.github.com/users/juliezhang1112/followers","following_url":"https://api.github.com/users/juliezhang1112/following{/other_user}","gists_url":"https://api.github.com/users/juliezhang1112/gists{/gist_id}","starred_url":"https://api.github.com/users/juliezhang1112/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliezhang1112/subscriptions","organizations_url":"https://api.github.com/users/juliezhang1112/orgs","repos_url":"https://api.github.com/users/juliezhang1112/repos","events_url":"https://api.github.com/users/juliezhang1112/events{/privacy}","received_events_url":"https://api.github.com/users/juliezhang1112/received_events","type":"User","site_admin":false},"body":"<!--Thanks for your contribution to TiDB documentation. See [CONTRIBUTING](https://github.com/pingcap/community/blob/master/CONTRIBUTING.md) before filing this PR.-->\r\n\r\n### What is changed, added or deleted? <!--Required-->\r\n- Add `HAProxy Best Practices` doc\r\n<!--Tell us what you did and why.-->\r\n\r\n### What is the related PR or file link(s)? <!--Write \"N/A\" or remove this item if it is not applicable-->\r\nhttps://github.com/pingcap/docs-cn/pull/1889\r\nhttps://github.com/pingcap/docs-cn/pull/1920\r\n<!--Provide a reference link that is related to your change. For example, a link in the pingcap/docs repository. -->\r\n\r\n### Which version does your change affect? <!--Required; write \"N/A\" if it is not applicable-->\r\ndev, v3.0, v3.1, v2.1\r\n<!--Specify the version or versions that your change affect by adding a label at the right-hand side of this page. \"dev\" indicates the latest development version. \"v3.0\"/\"v3.1\"/\"v2.1\" indicates the documentation of TiDB 3.0/3.1-beta/2.1. If your change affects multiple versions, please update the documents for ALL the necessary versions.-->\r\n","created_at":"2019-11-25T11:39:53Z","updated_at":"2019-11-26T02:50:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b85c85da350bda6f51cd3051964607549e46b0b4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1488526525,"node_id":"MDU6TGFiZWwxNDg4NTI2NTI1","url":"https://api.github.com/repos/pingcap/docs/labels/aligned-with-docs-cn","name":"aligned-with-docs-cn","color":"ffcb66","default":false,"description":"This PR aligns the English docs with updates in the Chinese pingcap/docs-cn."},{"id":1661103340,"node_id":"MDU6TGFiZWwxNjYxMTAzMzQw","url":"https://api.github.com/repos/pingcap/docs/labels/best-practices","name":"best-practices","color":"d315c3","default":false,"description":"TiDB best practices"}],"milestone":null,"commits_url":"https://api.github.com/repos/pingcap/docs/pulls/1668/commits","review_comments_url":"https://api.github.com/repos/pingcap/docs/pulls/1668/comments","review_comment_url":"https://api.github.com/repos/pingcap/docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pingcap/docs/issues/1668/comments","statuses_url":"https://api.github.com/repos/pingcap/docs/statuses/660ca1776922207727db7c481fcf792f39203aa5","head":{"label":"juliezhang1112:add-Haproxy-Best-Practice","ref":"add-Haproxy-Best-Practice","sha":"660ca1776922207727db7c481fcf792f39203aa5","user":{"login":"juliezhang1112","id":44054033,"node_id":"MDQ6VXNlcjQ0MDU0MDMz","avatar_url":"https://avatars2.githubusercontent.com/u/44054033?v=4","gravatar_id":"","url":"https://api.github.com/users/juliezhang1112","html_url":"https://github.com/juliezhang1112","followers_url":"https://api.github.com/users/juliezhang1112/followers","following_url":"https://api.github.com/users/juliezhang1112/following{/other_user}","gists_url":"https://api.github.com/users/juliezhang1112/gists{/gist_id}","starred_url":"https://api.github.com/users/juliezhang1112/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliezhang1112/subscriptions","organizations_url":"https://api.github.com/users/juliezhang1112/orgs","repos_url":"https://api.github.com/users/juliezhang1112/repos","events_url":"https://api.github.com/users/juliezhang1112/events{/privacy}","received_events_url":"https://api.github.com/users/juliezhang1112/received_events","type":"User","site_admin":false},"repo":{"id":199614152,"node_id":"MDEwOlJlcG9zaXRvcnkxOTk2MTQxNTI=","name":"docs","full_name":"juliezhang1112/docs","private":false,"owner":{"login":"juliezhang1112","id":44054033,"node_id":"MDQ6VXNlcjQ0MDU0MDMz","avatar_url":"https://avatars2.githubusercontent.com/u/44054033?v=4","gravatar_id":"","url":"https://api.github.com/users/juliezhang1112","html_url":"https://github.com/juliezhang1112","followers_url":"https://api.github.com/users/juliezhang1112/followers","following_url":"https://api.github.com/users/juliezhang1112/following{/other_user}","gists_url":"https://api.github.com/users/juliezhang1112/gists{/gist_id}","starred_url":"https://api.github.com/users/juliezhang1112/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliezhang1112/subscriptions","organizations_url":"https://api.github.com/users/juliezhang1112/orgs","repos_url":"https://api.github.com/users/juliezhang1112/repos","events_url":"https://api.github.com/users/juliezhang1112/events{/privacy}","received_events_url":"https://api.github.com/users/juliezhang1112/received_events","type":"User","site_admin":false},"html_url":"https://github.com/juliezhang1112/docs","description":"TiDB/TiKV/PD documents.","fork":true,"url":"https://api.github.com/repos/juliezhang1112/docs","forks_url":"https://api.github.com/repos/juliezhang1112/docs/forks","keys_url":"https://api.github.com/repos/juliezhang1112/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juliezhang1112/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juliezhang1112/docs/teams","hooks_url":"https://api.github.com/repos/juliezhang1112/docs/hooks","issue_events_url":"https://api.github.com/repos/juliezhang1112/docs/issues/events{/number}","events_url":"https://api.github.com/repos/juliezhang1112/docs/events","assignees_url":"https://api.github.com/repos/juliezhang1112/docs/assignees{/user}","branches_url":"https://api.github.com/repos/juliezhang1112/docs/branches{/branch}","tags_url":"https://api.github.com/repos/juliezhang1112/docs/tags","blobs_url":"https://api.github.com/repos/juliezhang1112/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juliezhang1112/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juliezhang1112/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/juliezhang1112/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juliezhang1112/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/juliezhang1112/docs/languages","stargazers_url":"https://api.github.com/repos/juliezhang1112/docs/stargazers","contributors_url":"https://api.github.com/repos/juliezhang1112/docs/contributors","subscribers_url":"https://api.github.com/repos/juliezhang1112/docs/subscribers","subscription_url":"https://api.github.com/repos/juliezhang1112/docs/subscription","commits_url":"https://api.github.com/repos/juliezhang1112/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/juliezhang1112/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/juliezhang1112/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/juliezhang1112/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/juliezhang1112/docs/contents/{+path}","compare_url":"https://api.github.com/repos/juliezhang1112/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juliezhang1112/docs/merges","archive_url":"https://api.github.com/repos/juliezhang1112/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juliezhang1112/docs/downloads","issues_url":"https://api.github.com/repos/juliezhang1112/docs/issues{/number}","pulls_url":"https://api.github.com/repos/juliezhang1112/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/juliezhang1112/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/juliezhang1112/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juliezhang1112/docs/labels{/name}","releases_url":"https://api.github.com/repos/juliezhang1112/docs/releases{/id}","deployments_url":"https://api.github.com/repos/juliezhang1112/docs/deployments","created_at":"2019-07-30T08:56:11Z","updated_at":"2019-11-25T12:40:01Z","pushed_at":"2019-11-25T12:39:58Z","git_url":"git://github.com/juliezhang1112/docs.git","ssh_url":"git@github.com:juliezhang1112/docs.git","clone_url":"https://github.com/juliezhang1112/docs.git","svn_url":"https://github.com/juliezhang1112/docs","homepage":"https://pingcap.com/docs/","size":42043,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pingcap:master","ref":"master","sha":"3ece9f233ce09850354f053cd546c4bebcd15e75","user":{"login":"pingcap","id":11855343,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExODU1MzQz","avatar_url":"https://avatars3.githubusercontent.com/u/11855343?v=4","gravatar_id":"","url":"https://api.github.com/users/pingcap","html_url":"https://github.com/pingcap","followers_url":"https://api.github.com/users/pingcap/followers","following_url":"https://api.github.com/users/pingcap/following{/other_user}","gists_url":"https://api.github.com/users/pingcap/gists{/gist_id}","starred_url":"https://api.github.com/users/pingcap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingcap/subscriptions","organizations_url":"https://api.github.com/users/pingcap/orgs","repos_url":"https://api.github.com/users/pingcap/repos","events_url":"https://api.github.com/users/pingcap/events{/privacy}","received_events_url":"https://api.github.com/users/pingcap/received_events","type":"Organization","site_admin":false},"repo":{"id":63995402,"node_id":"MDEwOlJlcG9zaXRvcnk2Mzk5NTQwMg==","name":"docs","full_name":"pingcap/docs","private":false,"owner":{"login":"pingcap","id":11855343,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExODU1MzQz","avatar_url":"https://avatars3.githubusercontent.com/u/11855343?v=4","gravatar_id":"","url":"https://api.github.com/users/pingcap","html_url":"https://github.com/pingcap","followers_url":"https://api.github.com/users/pingcap/followers","following_url":"https://api.github.com/users/pingcap/following{/other_user}","gists_url":"https://api.github.com/users/pingcap/gists{/gist_id}","starred_url":"https://api.github.com/users/pingcap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingcap/subscriptions","organizations_url":"https://api.github.com/users/pingcap/orgs","repos_url":"https://api.github.com/users/pingcap/repos","events_url":"https://api.github.com/users/pingcap/events{/privacy}","received_events_url":"https://api.github.com/users/pingcap/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pingcap/docs","description":"TiDB/TiKV/PD documents.","fork":false,"url":"https://api.github.com/repos/pingcap/docs","forks_url":"https://api.github.com/repos/pingcap/docs/forks","keys_url":"https://api.github.com/repos/pingcap/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pingcap/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pingcap/docs/teams","hooks_url":"https://api.github.com/repos/pingcap/docs/hooks","issue_events_url":"https://api.github.com/repos/pingcap/docs/issues/events{/number}","events_url":"https://api.github.com/repos/pingcap/docs/events","assignees_url":"https://api.github.com/repos/pingcap/docs/assignees{/user}","branches_url":"https://api.github.com/repos/pingcap/docs/branches{/branch}","tags_url":"https://api.github.com/repos/pingcap/docs/tags","blobs_url":"https://api.github.com/repos/pingcap/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pingcap/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pingcap/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/pingcap/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pingcap/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/pingcap/docs/languages","stargazers_url":"https://api.github.com/repos/pingcap/docs/stargazers","contributors_url":"https://api.github.com/repos/pingcap/docs/contributors","subscribers_url":"https://api.github.com/repos/pingcap/docs/subscribers","subscription_url":"https://api.github.com/repos/pingcap/docs/subscription","commits_url":"https://api.github.com/repos/pingcap/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/pingcap/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/pingcap/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/pingcap/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/pingcap/docs/contents/{+path}","compare_url":"https://api.github.com/repos/pingcap/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pingcap/docs/merges","archive_url":"https://api.github.com/repos/pingcap/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pingcap/docs/downloads","issues_url":"https://api.github.com/repos/pingcap/docs/issues{/number}","pulls_url":"https://api.github.com/repos/pingcap/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/pingcap/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/pingcap/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pingcap/docs/labels{/name}","releases_url":"https://api.github.com/repos/pingcap/docs/releases{/id}","deployments_url":"https://api.github.com/repos/pingcap/docs/deployments","created_at":"2016-07-23T02:39:04Z","updated_at":"2019-11-25T11:22:14Z","pushed_at":"2019-11-26T02:01:25Z","git_url":"git://github.com/pingcap/docs.git","ssh_url":"git@github.com:pingcap/docs.git","clone_url":"https://github.com/pingcap/docs.git","svn_url":"https://github.com/pingcap/docs","homepage":"https://pingcap.com/docs/","size":41620,"stargazers_count":318,"watchers_count":318,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":249,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":28,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":249,"open_issues":28,"watchers":318,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pingcap/docs/pulls/1668"},"html":{"href":"https://github.com/pingcap/docs/pull/1668"},"issue":{"href":"https://api.github.com/repos/pingcap/docs/issues/1668"},"comments":{"href":"https://api.github.com/repos/pingcap/docs/issues/1668/comments"},"review_comments":{"href":"https://api.github.com/repos/pingcap/docs/pulls/1668/comments"},"review_comment":{"href":"https://api.github.com/repos/pingcap/docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pingcap/docs/pulls/1668/commits"},"statuses":{"href":"https://api.github.com/repos/pingcap/docs/statuses/660ca1776922207727db7c481fcf792f39203aa5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"juliezhang1112"}}