{"action":"created","comment":{"url":"https://api.github.com/repos/akka/akka/pulls/comments/65867398","id":65867398,"diff_hunk":"@@ -77,14 +77,20 @@ private object PoolFlow {\n       import GraphDSL.Implicits._\n \n       val conductor = b.add(PoolConductor(maxConnections, pipeliningLimit, log))\n-      val slots = Vector\n-        .tabulate(maxConnections)(PoolSlot(_, connectionFlow, settings))\n-        .map(b.add)\n+      //The difference between hot and cold slots:\n+      // - hot: should be kept alive, the number is based on \"minConnections\" from settings\n+      // - cold: hold ordinary connection that might be killed, the number is \"maxConnections\" - \"minConnections\"\n+      val hotSlots = Vector\n+        .tabulate(minConnections)(PoolSlot(_, connectionFlow, settings, isHotConnection = true))\n+      val coldSlots = Vector\n+        .tabulate(maxConnections - minConnections)(PoolSlot(_, connectionFlow, settings, isHotConnection = false))\n+      val allSlots = (hotSlots ++ coldSlots).map(b.add)","path":"akka-http-core/src/main/scala/akka/http/impl/engine/client/PoolFlow.scala","position":14,"original_position":14,"commit_id":"521daaf72daabdd5ddb1c9111d4ad97d6f035d1d","original_commit_id":"521daaf72daabdd5ddb1c9111d4ad97d6f035d1d","user":{"login":"pjazdzewski1990","id":1136843,"avatar_url":"https://avatars.githubusercontent.com/u/1136843?v=3","gravatar_id":"","url":"https://api.github.com/users/pjazdzewski1990","html_url":"https://github.com/pjazdzewski1990","followers_url":"https://api.github.com/users/pjazdzewski1990/followers","following_url":"https://api.github.com/users/pjazdzewski1990/following{/other_user}","gists_url":"https://api.github.com/users/pjazdzewski1990/gists{/gist_id}","starred_url":"https://api.github.com/users/pjazdzewski1990/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjazdzewski1990/subscriptions","organizations_url":"https://api.github.com/users/pjazdzewski1990/orgs","repos_url":"https://api.github.com/users/pjazdzewski1990/repos","events_url":"https://api.github.com/users/pjazdzewski1990/events{/privacy}","received_events_url":"https://api.github.com/users/pjazdzewski1990/received_events","type":"User","site_admin":false},"body":"Good question @ktoso Here's a link on a (bigger) discussion https://issues.scala-lang.org/browse/SI-7725\r\nI think we could make it faster by simply changing the order - 'hotSlots' will (usually) be either smaller or empty, which would allow JVM to short-circuit during the addition. \r\nWould this be enough to answer the concern? ","created_at":"2016-06-06T10:18:02Z","updated_at":"2016-06-06T10:18:02Z","html_url":"https://github.com/akka/akka/pull/20723#discussion_r65867398","pull_request_url":"https://api.github.com/repos/akka/akka/pulls/20723","_links":{"self":{"href":"https://api.github.com/repos/akka/akka/pulls/comments/65867398"},"html":{"href":"https://github.com/akka/akka/pull/20723#discussion_r65867398"},"pull_request":{"href":"https://api.github.com/repos/akka/akka/pulls/20723"}}},"pull_request":{"url":"https://api.github.com/repos/akka/akka/pulls/20723","id":72676344,"html_url":"https://github.com/akka/akka/pull/20723","diff_url":"https://github.com/akka/akka/pull/20723.diff","patch_url":"https://github.com/akka/akka/pull/20723.patch","issue_url":"https://api.github.com/repos/akka/akka/issues/20723","number":20723,"state":"open","locked":false,"title":"[WORK IN PROGRESS] add hot connection pool via the minConnections setting","user":{"login":"pjazdzewski1990","id":1136843,"avatar_url":"https://avatars.githubusercontent.com/u/1136843?v=3","gravatar_id":"","url":"https://api.github.com/users/pjazdzewski1990","html_url":"https://github.com/pjazdzewski1990","followers_url":"https://api.github.com/users/pjazdzewski1990/followers","following_url":"https://api.github.com/users/pjazdzewski1990/following{/other_user}","gists_url":"https://api.github.com/users/pjazdzewski1990/gists{/gist_id}","starred_url":"https://api.github.com/users/pjazdzewski1990/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjazdzewski1990/subscriptions","organizations_url":"https://api.github.com/users/pjazdzewski1990/orgs","repos_url":"https://api.github.com/users/pjazdzewski1990/repos","events_url":"https://api.github.com/users/pjazdzewski1990/events{/privacy}","received_events_url":"https://api.github.com/users/pjazdzewski1990/received_events","type":"User","site_admin":false},"body":"Should NOT be merged. Opened to ask code related questions\r\n\r\n#20456: add hot connection pool via the minConnections setting\r\n\r\n* added the akka.http.host-connection-pool.min-connections setting to reference.conf\r\n* modified config implementation s o it's being read, with 0 as default\r\n* based on the setting two types of pools will be created - hot and cold\r\n* hot ones will start ASAP and not close when the number of active connections fall to 0\r\n\r\nMy first PR, so I would appreciate help and assume it's mostly wrong :)","created_at":"2016-06-06T09:01:54Z","updated_at":"2016-06-06T10:18:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b8b1d25d87165bd09aad327f27ae178106491b01","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/akka/akka/pulls/20723/commits","review_comments_url":"https://api.github.com/repos/akka/akka/pulls/20723/comments","review_comment_url":"https://api.github.com/repos/akka/akka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/akka/akka/issues/20723/comments","statuses_url":"https://api.github.com/repos/akka/akka/statuses/521daaf72daabdd5ddb1c9111d4ad97d6f035d1d","head":{"label":"pjazdzewski1990:feature/hot_connection_pool","ref":"feature/hot_connection_pool","sha":"521daaf72daabdd5ddb1c9111d4ad97d6f035d1d","user":{"login":"pjazdzewski1990","id":1136843,"avatar_url":"https://avatars.githubusercontent.com/u/1136843?v=3","gravatar_id":"","url":"https://api.github.com/users/pjazdzewski1990","html_url":"https://github.com/pjazdzewski1990","followers_url":"https://api.github.com/users/pjazdzewski1990/followers","following_url":"https://api.github.com/users/pjazdzewski1990/following{/other_user}","gists_url":"https://api.github.com/users/pjazdzewski1990/gists{/gist_id}","starred_url":"https://api.github.com/users/pjazdzewski1990/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjazdzewski1990/subscriptions","organizations_url":"https://api.github.com/users/pjazdzewski1990/orgs","repos_url":"https://api.github.com/users/pjazdzewski1990/repos","events_url":"https://api.github.com/users/pjazdzewski1990/events{/privacy}","received_events_url":"https://api.github.com/users/pjazdzewski1990/received_events","type":"User","site_admin":false},"repo":{"id":60169819,"name":"akka","full_name":"pjazdzewski1990/akka","owner":{"login":"pjazdzewski1990","id":1136843,"avatar_url":"https://avatars.githubusercontent.com/u/1136843?v=3","gravatar_id":"","url":"https://api.github.com/users/pjazdzewski1990","html_url":"https://github.com/pjazdzewski1990","followers_url":"https://api.github.com/users/pjazdzewski1990/followers","following_url":"https://api.github.com/users/pjazdzewski1990/following{/other_user}","gists_url":"https://api.github.com/users/pjazdzewski1990/gists{/gist_id}","starred_url":"https://api.github.com/users/pjazdzewski1990/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjazdzewski1990/subscriptions","organizations_url":"https://api.github.com/users/pjazdzewski1990/orgs","repos_url":"https://api.github.com/users/pjazdzewski1990/repos","events_url":"https://api.github.com/users/pjazdzewski1990/events{/privacy}","received_events_url":"https://api.github.com/users/pjazdzewski1990/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pjazdzewski1990/akka","description":"Akka Project","fork":true,"url":"https://api.github.com/repos/pjazdzewski1990/akka","forks_url":"https://api.github.com/repos/pjazdzewski1990/akka/forks","keys_url":"https://api.github.com/repos/pjazdzewski1990/akka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pjazdzewski1990/akka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pjazdzewski1990/akka/teams","hooks_url":"https://api.github.com/repos/pjazdzewski1990/akka/hooks","issue_events_url":"https://api.github.com/repos/pjazdzewski1990/akka/issues/events{/number}","events_url":"https://api.github.com/repos/pjazdzewski1990/akka/events","assignees_url":"https://api.github.com/repos/pjazdzewski1990/akka/assignees{/user}","branches_url":"https://api.github.com/repos/pjazdzewski1990/akka/branches{/branch}","tags_url":"https://api.github.com/repos/pjazdzewski1990/akka/tags","blobs_url":"https://api.github.com/repos/pjazdzewski1990/akka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pjazdzewski1990/akka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pjazdzewski1990/akka/git/refs{/sha}","trees_url":"https://api.github.com/repos/pjazdzewski1990/akka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pjazdzewski1990/akka/statuses/{sha}","languages_url":"https://api.github.com/repos/pjazdzewski1990/akka/languages","stargazers_url":"https://api.github.com/repos/pjazdzewski1990/akka/stargazers","contributors_url":"https://api.github.com/repos/pjazdzewski1990/akka/contributors","subscribers_url":"https://api.github.com/repos/pjazdzewski1990/akka/subscribers","subscription_url":"https://api.github.com/repos/pjazdzewski1990/akka/subscription","commits_url":"https://api.github.com/repos/pjazdzewski1990/akka/commits{/sha}","git_commits_url":"https://api.github.com/repos/pjazdzewski1990/akka/git/commits{/sha}","comments_url":"https://api.github.com/repos/pjazdzewski1990/akka/comments{/number}","issue_comment_url":"https://api.github.com/repos/pjazdzewski1990/akka/issues/comments{/number}","contents_url":"https://api.github.com/repos/pjazdzewski1990/akka/contents/{+path}","compare_url":"https://api.github.com/repos/pjazdzewski1990/akka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pjazdzewski1990/akka/merges","archive_url":"https://api.github.com/repos/pjazdzewski1990/akka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pjazdzewski1990/akka/downloads","issues_url":"https://api.github.com/repos/pjazdzewski1990/akka/issues{/number}","pulls_url":"https://api.github.com/repos/pjazdzewski1990/akka/pulls{/number}","milestones_url":"https://api.github.com/repos/pjazdzewski1990/akka/milestones{/number}","notifications_url":"https://api.github.com/repos/pjazdzewski1990/akka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pjazdzewski1990/akka/labels{/name}","releases_url":"https://api.github.com/repos/pjazdzewski1990/akka/releases{/id}","deployments_url":"https://api.github.com/repos/pjazdzewski1990/akka/deployments","created_at":"2016-06-01T11:04:57Z","updated_at":"2016-06-01T11:05:10Z","pushed_at":"2016-06-06T08:57:17Z","git_url":"git://github.com/pjazdzewski1990/akka.git","ssh_url":"git@github.com:pjazdzewski1990/akka.git","clone_url":"https://github.com/pjazdzewski1990/akka.git","svn_url":"https://github.com/pjazdzewski1990/akka","homepage":"http://akka.io","size":193981,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"akka:master","ref":"master","sha":"0263774f8281c0a1b7277b3c3204624565a43d65","user":{"login":"akka","id":1496237,"avatar_url":"https://avatars.githubusercontent.com/u/1496237?v=3","gravatar_id":"","url":"https://api.github.com/users/akka","html_url":"https://github.com/akka","followers_url":"https://api.github.com/users/akka/followers","following_url":"https://api.github.com/users/akka/following{/other_user}","gists_url":"https://api.github.com/users/akka/gists{/gist_id}","starred_url":"https://api.github.com/users/akka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akka/subscriptions","organizations_url":"https://api.github.com/users/akka/orgs","repos_url":"https://api.github.com/users/akka/repos","events_url":"https://api.github.com/users/akka/events{/privacy}","received_events_url":"https://api.github.com/users/akka/received_events","type":"Organization","site_admin":false},"repo":{"id":130013,"name":"akka","full_name":"akka/akka","owner":{"login":"akka","id":1496237,"avatar_url":"https://avatars.githubusercontent.com/u/1496237?v=3","gravatar_id":"","url":"https://api.github.com/users/akka","html_url":"https://github.com/akka","followers_url":"https://api.github.com/users/akka/followers","following_url":"https://api.github.com/users/akka/following{/other_user}","gists_url":"https://api.github.com/users/akka/gists{/gist_id}","starred_url":"https://api.github.com/users/akka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akka/subscriptions","organizations_url":"https://api.github.com/users/akka/orgs","repos_url":"https://api.github.com/users/akka/repos","events_url":"https://api.github.com/users/akka/events{/privacy}","received_events_url":"https://api.github.com/users/akka/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akka/akka","description":"Akka Project","fork":false,"url":"https://api.github.com/repos/akka/akka","forks_url":"https://api.github.com/repos/akka/akka/forks","keys_url":"https://api.github.com/repos/akka/akka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akka/akka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akka/akka/teams","hooks_url":"https://api.github.com/repos/akka/akka/hooks","issue_events_url":"https://api.github.com/repos/akka/akka/issues/events{/number}","events_url":"https://api.github.com/repos/akka/akka/events","assignees_url":"https://api.github.com/repos/akka/akka/assignees{/user}","branches_url":"https://api.github.com/repos/akka/akka/branches{/branch}","tags_url":"https://api.github.com/repos/akka/akka/tags","blobs_url":"https://api.github.com/repos/akka/akka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akka/akka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akka/akka/git/refs{/sha}","trees_url":"https://api.github.com/repos/akka/akka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akka/akka/statuses/{sha}","languages_url":"https://api.github.com/repos/akka/akka/languages","stargazers_url":"https://api.github.com/repos/akka/akka/stargazers","contributors_url":"https://api.github.com/repos/akka/akka/contributors","subscribers_url":"https://api.github.com/repos/akka/akka/subscribers","subscription_url":"https://api.github.com/repos/akka/akka/subscription","commits_url":"https://api.github.com/repos/akka/akka/commits{/sha}","git_commits_url":"https://api.github.com/repos/akka/akka/git/commits{/sha}","comments_url":"https://api.github.com/repos/akka/akka/comments{/number}","issue_comment_url":"https://api.github.com/repos/akka/akka/issues/comments{/number}","contents_url":"https://api.github.com/repos/akka/akka/contents/{+path}","compare_url":"https://api.github.com/repos/akka/akka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akka/akka/merges","archive_url":"https://api.github.com/repos/akka/akka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akka/akka/downloads","issues_url":"https://api.github.com/repos/akka/akka/issues{/number}","pulls_url":"https://api.github.com/repos/akka/akka/pulls{/number}","milestones_url":"https://api.github.com/repos/akka/akka/milestones{/number}","notifications_url":"https://api.github.com/repos/akka/akka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akka/akka/labels{/name}","releases_url":"https://api.github.com/repos/akka/akka/releases{/id}","deployments_url":"https://api.github.com/repos/akka/akka/deployments","created_at":"2009-02-16T12:51:54Z","updated_at":"2016-06-06T09:42:25Z","pushed_at":"2016-06-06T09:28:04Z","git_url":"git://github.com/akka/akka.git","ssh_url":"git@github.com:akka/akka.git","clone_url":"https://github.com/akka/akka.git","svn_url":"https://github.com/akka/akka","homepage":"http://akka.io","size":233447,"stargazers_count":5598,"watchers_count":5598,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1754,"mirror_url":null,"open_issues_count":673,"forks":1754,"open_issues":673,"watchers":5598,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/akka/akka/pulls/20723"},"html":{"href":"https://github.com/akka/akka/pull/20723"},"issue":{"href":"https://api.github.com/repos/akka/akka/issues/20723"},"comments":{"href":"https://api.github.com/repos/akka/akka/issues/20723/comments"},"review_comments":{"href":"https://api.github.com/repos/akka/akka/pulls/20723/comments"},"review_comment":{"href":"https://api.github.com/repos/akka/akka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/akka/akka/pulls/20723/commits"},"statuses":{"href":"https://api.github.com/repos/akka/akka/statuses/521daaf72daabdd5ddb1c9111d4ad97d6f035d1d"}}}}
{"actor":{"display_login":"pjazdzewski1990"}}