Skip to content
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

✨feat: Distribute the shards to nodes fairly #82

Merged
merged 2 commits into from
Jul 15, 2021

Conversation

negokaz
Copy link
Contributor

@negokaz negokaz commented Jun 11, 2021

RaftActor should be distributed to nodes fairly to distribute the load.

  • This change allows to construct large size cluster more than 50 nodes per DC
  • We can expect to distribute the load more evenly and reliable by using LeastShardAllocationStrategy
    of akka-cluster-sharding assertively instead of hash value distribution

Currently, RaftActors are distributed with hash value as an entity of cluster-sharding. The entities can be distributed unevenly even if shards of cluster-sharding are distibured evenly by LeastShardAllocationStrategy.
By creating one entity (RaftActor) per one shard on cluster-sharding, LeastShardAllocationStrategy can manage distribution of RaftActor directly.

@negokaz negokaz force-pushed the improve-raft-actor-allocation branch from 01eea21 to e64cab3 Compare June 11, 2021 10:54
@tksugimoto tksugimoto enabled auto-merge (squash) June 14, 2021 02:01
@tksugimoto tksugimoto disabled auto-merge June 15, 2021 05:35
@negokaz negokaz force-pushed the improve-raft-actor-allocation branch from 86219e0 to 7cdd473 Compare July 14, 2021 09:23
@negokaz negokaz force-pushed the improve-raft-actor-allocation branch from 91fc159 to 6bffac3 Compare July 14, 2021 09:51
@tksugimoto tksugimoto enabled auto-merge July 14, 2021 10:23
@tksugimoto tksugimoto merged commit 279b51b into master Jul 15, 2021
@tksugimoto tksugimoto deleted the improve-raft-actor-allocation branch July 15, 2021 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants