-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Member Roles
doc
#5742
Merged
Merged
Add Member Roles
doc
#5742
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
a81c258
Add `Node Roles` doc
eaba 4563c2c
Merge branch 'dev' into cluster_roles
eaba 5de627d
Update documentation
eaba 210ae39
Fixed lint errors
eaba d7de54a
Merge branch 'dev' into cluster_roles
eaba 8529d77
Added diagram image
eaba 876a5b4
replaced cluster roles diagram with a simpler version
eaba 76ff75a
Added cluster config example for other cluster modules
eaba a2374d4
Add more detail on what the roles do
eaba 400bec0
Added more detail
eaba 66a4b6f
Merge branch 'dev' into cluster_roles
eaba 82a4380
Fix tabbing
eaba 6fee097
Attempt formating fix
eaba dbd5dd5
Moved `cluster-roles.png` to `cluster` folder under images
eaba aad9f44
* Fix heading with H2
eaba 854d723
Fix hard tabs
eaba a300b06
* created new image
eaba 3bc1939
Updated documentation
eaba ae9a01f
Merge branch 'dev' into cluster_roles
eaba fca18c5
Fix linting issues
eaba d16ea43
Fix linting issue
eaba c8ab363
Update cluster-overview.md
Aaronontheweb 43d8791
Update member-roles.md
Aaronontheweb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
uid: node-roles | ||
title: Node Roles | ||
--- | ||
|
||
# Node Roles | ||
|
||
Not all nodes of a cluster need to perform the same function. For example, there might be one sub-set which runs the web front-end, one which runs the data access layer and one for the number-crunching. Choosing which actors to start on each node, for example cluster-aware routers, can take node roles into account to achieve this distribution of responsibilities. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to expand this:
|
||
|
||
The node roles are defined in the configuration property named `akka.cluster.roles` and typically defined in the start script as a system property or environment variable. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Show an example |
||
|
||
The roles are part of the membership information in `MemberEvent` that you can subscribe to. The roles of the own node are available from the `SelfMember` and that can be used for conditionally starting certain actors: | ||
|
||
```csharp | ||
var selfMember = Cluster.Get(_actorSystem).SelfMember; | ||
if (selfMember.HasRole("backend")) | ||
{ | ||
context.ActorOf(Backend.Prop(), "back"); | ||
} | ||
else if (selfMember.HasRole("front")) | ||
{ | ||
context.ActorOf(Frontend.Prop(), "front"); | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be called "Member Roles"