{"action":"opened","number":1946,"pull_request":{"url":"https://api.github.com/repos/TykTechnologies/tyk/pulls/1946","id":226057712,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2MDU3NzEy","html_url":"https://github.com/TykTechnologies/tyk/pull/1946","diff_url":"https://github.com/TykTechnologies/tyk/pull/1946.diff","patch_url":"https://github.com/TykTechnologies/tyk/pull/1946.patch","issue_url":"https://api.github.com/repos/TykTechnologies/tyk/issues/1946","number":1946,"state":"open","locked":false,"title":"Reuse a global client for heartbeat.","user":{"login":"joshblakeley","id":31618778,"node_id":"MDQ6VXNlcjMxNjE4Nzc4","avatar_url":"https://avatars2.githubusercontent.com/u/31618778?v=4","gravatar_id":"","url":"https://api.github.com/users/joshblakeley","html_url":"https://github.com/joshblakeley","followers_url":"https://api.github.com/users/joshblakeley/followers","following_url":"https://api.github.com/users/joshblakeley/following{/other_user}","gists_url":"https://api.github.com/users/joshblakeley/gists{/gist_id}","starred_url":"https://api.github.com/users/joshblakeley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshblakeley/subscriptions","organizations_url":"https://api.github.com/users/joshblakeley/orgs","repos_url":"https://api.github.com/users/joshblakeley/repos","events_url":"https://api.github.com/users/joshblakeley/events{/privacy}","received_events_url":"https://api.github.com/users/joshblakeley/received_events","type":"User","site_admin":false},"body":"This prevents the issue with spawning a new open socket for each gateway to dashboard heartbeat.\r\n\r\nFrom Go client.go:\r\n\r\n```\r\n// The Client's Transport typically has internal state (cached TCP\r\n// connections), so Clients should be reused instead of created as\r\n// needed. Clients are safe for concurrent use by multiple goroutines.\r\n```\r\n\r\nSince we are doing the same operation constantly it makes more sense to create a single client and reuse the connection for the dashboard heartbeat.","created_at":"2018-10-26T10:58:29Z","updated_at":"2018-10-26T10:58:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/TykTechnologies/tyk/pulls/1946/commits","review_comments_url":"https://api.github.com/repos/TykTechnologies/tyk/pulls/1946/comments","review_comment_url":"https://api.github.com/repos/TykTechnologies/tyk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TykTechnologies/tyk/issues/1946/comments","statuses_url":"https://api.github.com/repos/TykTechnologies/tyk/statuses/c61bbba94c9f3cc6dd8db6743b38bb6c57c27917","head":{"label":"TykTechnologies:client-closing","ref":"client-closing","sha":"c61bbba94c9f3cc6dd8db6743b38bb6c57c27917","user":{"login":"TykTechnologies","id":16121529,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MTIxNTI5","avatar_url":"https://avatars3.githubusercontent.com/u/16121529?v=4","gravatar_id":"","url":"https://api.github.com/users/TykTechnologies","html_url":"https://github.com/TykTechnologies","followers_url":"https://api.github.com/users/TykTechnologies/followers","following_url":"https://api.github.com/users/TykTechnologies/following{/other_user}","gists_url":"https://api.github.com/users/TykTechnologies/gists{/gist_id}","starred_url":"https://api.github.com/users/TykTechnologies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TykTechnologies/subscriptions","organizations_url":"https://api.github.com/users/TykTechnologies/orgs","repos_url":"https://api.github.com/users/TykTechnologies/repos","events_url":"https://api.github.com/users/TykTechnologies/events{/privacy}","received_events_url":"https://api.github.com/users/TykTechnologies/received_events","type":"Organization","site_admin":false},"repo":{"id":19537979,"node_id":"MDEwOlJlcG9zaXRvcnkxOTUzNzk3OQ==","name":"tyk","full_name":"TykTechnologies/tyk","private":false,"owner":{"login":"TykTechnologies","id":16121529,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MTIxNTI5","avatar_url":"https://avatars3.githubusercontent.com/u/16121529?v=4","gravatar_id":"","url":"https://api.github.com/users/TykTechnologies","html_url":"https://github.com/TykTechnologies","followers_url":"https://api.github.com/users/TykTechnologies/followers","following_url":"https://api.github.com/users/TykTechnologies/following{/other_user}","gists_url":"https://api.github.com/users/TykTechnologies/gists{/gist_id}","starred_url":"https://api.github.com/users/TykTechnologies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TykTechnologies/subscriptions","organizations_url":"https://api.github.com/users/TykTechnologies/orgs","repos_url":"https://api.github.com/users/TykTechnologies/repos","events_url":"https://api.github.com/users/TykTechnologies/events{/privacy}","received_events_url":"https://api.github.com/users/TykTechnologies/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/TykTechnologies/tyk","description":"Tyk Open Source API Gateway written in Go","fork":false,"url":"https://api.github.com/repos/TykTechnologies/tyk","forks_url":"https://api.github.com/repos/TykTechnologies/tyk/forks","keys_url":"https://api.github.com/repos/TykTechnologies/tyk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TykTechnologies/tyk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TykTechnologies/tyk/teams","hooks_url":"https://api.github.com/repos/TykTechnologies/tyk/hooks","issue_events_url":"https://api.github.com/repos/TykTechnologies/tyk/issues/events{/number}","events_url":"https://api.github.com/repos/TykTechnologies/tyk/events","assignees_url":"https://api.github.com/repos/TykTechnologies/tyk/assignees{/user}","branches_url":"https://api.github.com/repos/TykTechnologies/tyk/branches{/branch}","tags_url":"https://api.github.com/repos/TykTechnologies/tyk/tags","blobs_url":"https://api.github.com/repos/TykTechnologies/tyk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TykTechnologies/tyk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TykTechnologies/tyk/git/refs{/sha}","trees_url":"https://api.github.com/repos/TykTechnologies/tyk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TykTechnologies/tyk/statuses/{sha}","languages_url":"https://api.github.com/repos/TykTechnologies/tyk/languages","stargazers_url":"https://api.github.com/repos/TykTechnologies/tyk/stargazers","contributors_url":"https://api.github.com/repos/TykTechnologies/tyk/contributors","subscribers_url":"https://api.github.com/repos/TykTechnologies/tyk/subscribers","subscription_url":"https://api.github.com/repos/TykTechnologies/tyk/subscription","commits_url":"https://api.github.com/repos/TykTechnologies/tyk/commits{/sha}","git_commits_url":"https://api.github.com/repos/TykTechnologies/tyk/git/commits{/sha}","comments_url":"https://api.github.com/repos/TykTechnologies/tyk/comments{/number}","issue_comment_url":"https://api.github.com/repos/TykTechnologies/tyk/issues/comments{/number}","contents_url":"https://api.github.com/repos/TykTechnologies/tyk/contents/{+path}","compare_url":"https://api.github.com/repos/TykTechnologies/tyk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TykTechnologies/tyk/merges","archive_url":"https://api.github.com/repos/TykTechnologies/tyk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TykTechnologies/tyk/downloads","issues_url":"https://api.github.com/repos/TykTechnologies/tyk/issues{/number}","pulls_url":"https://api.github.com/repos/TykTechnologies/tyk/pulls{/number}","milestones_url":"https://api.github.com/repos/TykTechnologies/tyk/milestones{/number}","notifications_url":"https://api.github.com/repos/TykTechnologies/tyk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TykTechnologies/tyk/labels{/name}","releases_url":"https://api.github.com/repos/TykTechnologies/tyk/releases{/id}","deployments_url":"https://api.github.com/repos/TykTechnologies/tyk/deployments","created_at":"2014-05-07T14:38:24Z","updated_at":"2018-10-26T07:31:34Z","pushed_at":"2018-10-26T10:55:38Z","git_url":"git://github.com/TykTechnologies/tyk.git","ssh_url":"git@github.com:TykTechnologies/tyk.git","clone_url":"https://github.com/TykTechnologies/tyk.git","svn_url":"https://github.com/TykTechnologies/tyk","homepage":"","size":123618,"stargazers_count":3894,"watchers_count":3894,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":526,"mirror_url":null,"archived":false,"open_issues_count":360,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":526,"open_issues":360,"watchers":3894,"default_branch":"master"}},"base":{"label":"TykTechnologies:master","ref":"master","sha":"395829d68bb75d3862adefad2df6368ebb4e7538","user":{"login":"TykTechnologies","id":16121529,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MTIxNTI5","avatar_url":"https://avatars3.githubusercontent.com/u/16121529?v=4","gravatar_id":"","url":"https://api.github.com/users/TykTechnologies","html_url":"https://github.com/TykTechnologies","followers_url":"https://api.github.com/users/TykTechnologies/followers","following_url":"https://api.github.com/users/TykTechnologies/following{/other_user}","gists_url":"https://api.github.com/users/TykTechnologies/gists{/gist_id}","starred_url":"https://api.github.com/users/TykTechnologies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TykTechnologies/subscriptions","organizations_url":"https://api.github.com/users/TykTechnologies/orgs","repos_url":"https://api.github.com/users/TykTechnologies/repos","events_url":"https://api.github.com/users/TykTechnologies/events{/privacy}","received_events_url":"https://api.github.com/users/TykTechnologies/received_events","type":"Organization","site_admin":false},"repo":{"id":19537979,"node_id":"MDEwOlJlcG9zaXRvcnkxOTUzNzk3OQ==","name":"tyk","full_name":"TykTechnologies/tyk","private":false,"owner":{"login":"TykTechnologies","id":16121529,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MTIxNTI5","avatar_url":"https://avatars3.githubusercontent.com/u/16121529?v=4","gravatar_id":"","url":"https://api.github.com/users/TykTechnologies","html_url":"https://github.com/TykTechnologies","followers_url":"https://api.github.com/users/TykTechnologies/followers","following_url":"https://api.github.com/users/TykTechnologies/following{/other_user}","gists_url":"https://api.github.com/users/TykTechnologies/gists{/gist_id}","starred_url":"https://api.github.com/users/TykTechnologies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TykTechnologies/subscriptions","organizations_url":"https://api.github.com/users/TykTechnologies/orgs","repos_url":"https://api.github.com/users/TykTechnologies/repos","events_url":"https://api.github.com/users/TykTechnologies/events{/privacy}","received_events_url":"https://api.github.com/users/TykTechnologies/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/TykTechnologies/tyk","description":"Tyk Open Source API Gateway written in Go","fork":false,"url":"https://api.github.com/repos/TykTechnologies/tyk","forks_url":"https://api.github.com/repos/TykTechnologies/tyk/forks","keys_url":"https://api.github.com/repos/TykTechnologies/tyk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TykTechnologies/tyk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TykTechnologies/tyk/teams","hooks_url":"https://api.github.com/repos/TykTechnologies/tyk/hooks","issue_events_url":"https://api.github.com/repos/TykTechnologies/tyk/issues/events{/number}","events_url":"https://api.github.com/repos/TykTechnologies/tyk/events","assignees_url":"https://api.github.com/repos/TykTechnologies/tyk/assignees{/user}","branches_url":"https://api.github.com/repos/TykTechnologies/tyk/branches{/branch}","tags_url":"https://api.github.com/repos/TykTechnologies/tyk/tags","blobs_url":"https://api.github.com/repos/TykTechnologies/tyk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TykTechnologies/tyk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TykTechnologies/tyk/git/refs{/sha}","trees_url":"https://api.github.com/repos/TykTechnologies/tyk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TykTechnologies/tyk/statuses/{sha}","languages_url":"https://api.github.com/repos/TykTechnologies/tyk/languages","stargazers_url":"https://api.github.com/repos/TykTechnologies/tyk/stargazers","contributors_url":"https://api.github.com/repos/TykTechnologies/tyk/contributors","subscribers_url":"https://api.github.com/repos/TykTechnologies/tyk/subscribers","subscription_url":"https://api.github.com/repos/TykTechnologies/tyk/subscription","commits_url":"https://api.github.com/repos/TykTechnologies/tyk/commits{/sha}","git_commits_url":"https://api.github.com/repos/TykTechnologies/tyk/git/commits{/sha}","comments_url":"https://api.github.com/repos/TykTechnologies/tyk/comments{/number}","issue_comment_url":"https://api.github.com/repos/TykTechnologies/tyk/issues/comments{/number}","contents_url":"https://api.github.com/repos/TykTechnologies/tyk/contents/{+path}","compare_url":"https://api.github.com/repos/TykTechnologies/tyk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TykTechnologies/tyk/merges","archive_url":"https://api.github.com/repos/TykTechnologies/tyk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TykTechnologies/tyk/downloads","issues_url":"https://api.github.com/repos/TykTechnologies/tyk/issues{/number}","pulls_url":"https://api.github.com/repos/TykTechnologies/tyk/pulls{/number}","milestones_url":"https://api.github.com/repos/TykTechnologies/tyk/milestones{/number}","notifications_url":"https://api.github.com/repos/TykTechnologies/tyk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TykTechnologies/tyk/labels{/name}","releases_url":"https://api.github.com/repos/TykTechnologies/tyk/releases{/id}","deployments_url":"https://api.github.com/repos/TykTechnologies/tyk/deployments","created_at":"2014-05-07T14:38:24Z","updated_at":"2018-10-26T07:31:34Z","pushed_at":"2018-10-26T10:55:38Z","git_url":"git://github.com/TykTechnologies/tyk.git","ssh_url":"git@github.com:TykTechnologies/tyk.git","clone_url":"https://github.com/TykTechnologies/tyk.git","svn_url":"https://github.com/TykTechnologies/tyk","homepage":"","size":123618,"stargazers_count":3894,"watchers_count":3894,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":526,"mirror_url":null,"archived":false,"open_issues_count":360,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":526,"open_issues":360,"watchers":3894,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TykTechnologies/tyk/pulls/1946"},"html":{"href":"https://github.com/TykTechnologies/tyk/pull/1946"},"issue":{"href":"https://api.github.com/repos/TykTechnologies/tyk/issues/1946"},"comments":{"href":"https://api.github.com/repos/TykTechnologies/tyk/issues/1946/comments"},"review_comments":{"href":"https://api.github.com/repos/TykTechnologies/tyk/pulls/1946/comments"},"review_comment":{"href":"https://api.github.com/repos/TykTechnologies/tyk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TykTechnologies/tyk/pulls/1946/commits"},"statuses":{"href":"https://api.github.com/repos/TykTechnologies/tyk/statuses/c61bbba94c9f3cc6dd8db6743b38bb6c57c27917"}},"author_association":"MEMBER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":6,"deletions":3,"changed_files":1}}
{"actor":{"display_login":"joshblakeley"}}