{"action":"created","comment":{"url":"https://api.github.com/repos/akka/akka/pulls/comments/192974076","pull_request_review_id":125850852,"id":192974076,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5Mjk3NDA3Ng==","diff_hunk":"@@ -12,6 +12,54 @@ To use Akka Cluster, you must add the following dependency in your project:\n   version=\"$akka.version$\"\n }\n \n+## When and where to use Akka Cluster\n+\n+An architectural choice you have to make is if you are going to use a microservices architecture or\n+a traditional distributed application, also known as a distributed monolith. This choice will influence how\n+you should use Akka Cluster\n+\n+### Microservices\n+\n+Microservices has many attractive properties, such as the independent nature of microservices allows for\n+multiple smaller and more focused teams that can deliver new functionality more frequently and can\n+respond quicker to business opportunities. Reactive Microservices should be isolated, autonomous, and have\n+a single responsibility as identified by Jonas Bonér in the book\n+[Reactive Microservices Architecture: Design Principles for Distributed Systems](https://info.lightbend.com/COLL-20XX-Reactive-Microservices-Architecture-RES-LP.html).\n+\n+In a microservices architecture, you should consider communication within a service and between services.\n+\n+In general we recommend against using Akka Cluster and actor messaging between _different_ services because that\n+would result in a too tight code coupling between the services and difficulties deploying these independent of\n+each other, which is one of the main reasons for using a microservices architecture.\n+See the discussion on\n+@scala[[Internal and External Communication](https://www.lagomframework.com/documentation/current/scala/InternalAndExternalCommunication.html)]\n+@java[[Internal and External Communication](https://www.lagomframework.com/documentation/current/java/InternalAndExternalCommunication.html)]\n+in the docs of the [Lagom Framework](https://www.lagomframework.com) (where each microservice is an Akka Cluster)\n+for some background on this.\n+\n+Nodes of a single service (collectively called a cluster) require less decoupling. They share the same code and\n+are managed together, as a set, by a single team or individual. For this reason, intra-service communication\n+can take advantage of Akka Cluster, failure management and actor messaging, which is convenient to use and has great\n+performance.\n+\n+Between different services [Akka HTTP](https://doc.akka.io/docs/akka-http/current) or\n+[Akka gRPC](https://developer.lightbend.com/docs/akka-grpc/current/) can be used for synchronous (yet non-blocking)\n+communication and [Akka Streams Kafka](https://developer.lightbend.com/docs/alpakka/current/) for asynchronous communication.","path":"akka-docs/src/main/paradox/cluster-usage.md","position":null,"original_position":36,"commit_id":"8b151247683bc5240c17baa098b4ade7f1bf4def","original_commit_id":"759b3e271405c175b0fe644bf193ad707635c82e","user":{"login":"TimMoore","id":44385,"node_id":"MDQ6VXNlcjQ0Mzg1","avatar_url":"https://avatars0.githubusercontent.com/u/44385?v=4","gravatar_id":"","url":"https://api.github.com/users/TimMoore","html_url":"https://github.com/TimMoore","followers_url":"https://api.github.com/users/TimMoore/followers","following_url":"https://api.github.com/users/TimMoore/following{/other_user}","gists_url":"https://api.github.com/users/TimMoore/gists{/gist_id}","starred_url":"https://api.github.com/users/TimMoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TimMoore/subscriptions","organizations_url":"https://api.github.com/users/TimMoore/orgs","repos_url":"https://api.github.com/users/TimMoore/repos","events_url":"https://api.github.com/users/TimMoore/events{/privacy}","received_events_url":"https://api.github.com/users/TimMoore/received_events","type":"User","site_admin":false},"body":"> \"stream refs\" would be for internal communcation, but I don't want to blur the picture with too many options here.\r\n\r\nAgree, but this is something else that I've seen confusion about, with some people on Gitter or Discourse or support (forget which) trying to use it between services. Maybe it's also worth clarifying this on the [stream refs page](https://doc.akka.io/docs/akka/current/stream/stream-refs.html) with a similar \"when and where to use it\" section (perhaps as a separate pull request).","created_at":"2018-06-05T07:38:20Z","updated_at":"2018-06-05T07:38:20Z","html_url":"https://github.com/akka/akka/pull/25182#discussion_r192974076","pull_request_url":"https://api.github.com/repos/akka/akka/pulls/25182","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/akka/akka/pulls/comments/192974076"},"html":{"href":"https://github.com/akka/akka/pull/25182#discussion_r192974076"},"pull_request":{"href":"https://api.github.com/repos/akka/akka/pulls/25182"}},"in_reply_to_id":192941562},"pull_request":{"url":"https://api.github.com/repos/akka/akka/pulls/25182","id":191968634,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxOTY4NjM0","html_url":"https://github.com/akka/akka/pull/25182","diff_url":"https://github.com/akka/akka/pull/25182.diff","patch_url":"https://github.com/akka/akka/pull/25182.patch","issue_url":"https://api.github.com/repos/akka/akka/issues/25182","number":25182,"state":"open","locked":false,"title":"When and where to use Akka Cluster","user":{"login":"patriknw","id":336161,"node_id":"MDQ6VXNlcjMzNjE2MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/336161?v=4","gravatar_id":"","url":"https://api.github.com/users/patriknw","html_url":"https://github.com/patriknw","followers_url":"https://api.github.com/users/patriknw/followers","following_url":"https://api.github.com/users/patriknw/following{/other_user}","gists_url":"https://api.github.com/users/patriknw/gists{/gist_id}","starred_url":"https://api.github.com/users/patriknw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patriknw/subscriptions","organizations_url":"https://api.github.com/users/patriknw/orgs","repos_url":"https://api.github.com/users/patriknw/repos","events_url":"https://api.github.com/users/patriknw/events{/privacy}","received_events_url":"https://api.github.com/users/patriknw/received_events","type":"User","site_admin":false},"body":"Please review: @jboner @rstento @TimMoore ","created_at":"2018-06-01T08:38:03Z","updated_at":"2018-06-05T07:38:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a44a0eb998134554889219879d86fcabb27fa030","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":101450254,"node_id":"MDU6TGFiZWwxMDE0NTAyNTQ=","url":"https://api.github.com/repos/akka/akka/labels/validating","name":"validating","color":"bfd4f2","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/akka/akka/pulls/25182/commits","review_comments_url":"https://api.github.com/repos/akka/akka/pulls/25182/comments","review_comment_url":"https://api.github.com/repos/akka/akka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/akka/akka/issues/25182/comments","statuses_url":"https://api.github.com/repos/akka/akka/statuses/8b151247683bc5240c17baa098b4ade7f1bf4def","head":{"label":"akka:wip-when-cluster-patriknw","ref":"wip-when-cluster-patriknw","sha":"8b151247683bc5240c17baa098b4ade7f1bf4def","user":{"login":"akka","id":1496237,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0OTYyMzc=","avatar_url":"https://avatars2.githubusercontent.com/u/1496237?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnkxMzAwMTM=","name":"akka","full_name":"akka/akka","owner":{"login":"akka","id":1496237,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0OTYyMzc=","avatar_url":"https://avatars2.githubusercontent.com/u/1496237?v=4","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":"Build highly concurrent, distributed, and resilient message-driven applications on the JVM","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":"2018-06-05T05:58:28Z","pushed_at":"2018-06-05T07:29:58Z","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":211555,"stargazers_count":8615,"watchers_count":8615,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2738,"mirror_url":null,"archived":false,"open_issues_count":705,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2738,"open_issues":705,"watchers":8615,"default_branch":"master"}},"base":{"label":"akka:master","ref":"master","sha":"17872837574630f29d04cdb67839b716a4a7ec4f","user":{"login":"akka","id":1496237,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0OTYyMzc=","avatar_url":"https://avatars2.githubusercontent.com/u/1496237?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnkxMzAwMTM=","name":"akka","full_name":"akka/akka","owner":{"login":"akka","id":1496237,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0OTYyMzc=","avatar_url":"https://avatars2.githubusercontent.com/u/1496237?v=4","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":"Build highly concurrent, distributed, and resilient message-driven applications on the JVM","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":"2018-06-05T05:58:28Z","pushed_at":"2018-06-05T07:29:58Z","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":211555,"stargazers_count":8615,"watchers_count":8615,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2738,"mirror_url":null,"archived":false,"open_issues_count":705,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2738,"open_issues":705,"watchers":8615,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/akka/akka/pulls/25182"},"html":{"href":"https://github.com/akka/akka/pull/25182"},"issue":{"href":"https://api.github.com/repos/akka/akka/issues/25182"},"comments":{"href":"https://api.github.com/repos/akka/akka/issues/25182/comments"},"review_comments":{"href":"https://api.github.com/repos/akka/akka/pulls/25182/comments"},"review_comment":{"href":"https://api.github.com/repos/akka/akka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/akka/akka/pulls/25182/commits"},"statuses":{"href":"https://api.github.com/repos/akka/akka/statuses/8b151247683bc5240c17baa098b4ade7f1bf4def"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"TimMoore"}}