This repository has been archived by the owner on Apr 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 441
Rolling update steps for Classic -> Typed Sharding #110
Open
patriknw
wants to merge
9
commits into
2.6
Choose a base branch
from
wip-rolling-update-typed-patriknw
base: 2.6
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Another thing I will try is to have response messages that originally were sent to |
patriknw
force-pushed
the
wip-rolling-update-typed-patriknw
branch
from
June 20, 2019 10:45
5294705
to
483f612
Compare
I have also tried messages with replies, and also |
This was referenced Jun 20, 2019
patriknw
force-pushed
the
wip-rolling-update-typed-patriknw
branch
from
July 12, 2019 08:26
483f612
to
5d847f7
Compare
patriknw
changed the title
Rolling update steps for Untyped -> Typed Sharding
Rolling update steps for Classic -> Typed Sharding
Jul 12, 2019
helena
reviewed
Jul 17, 2019
akka-sample-sharding-typed-scala/src/main/scala/sample/sharding/Message.scala
Show resolved
Hide resolved
This was referenced Jul 18, 2019
* use ask for deviceId >= 40
* update to Akka 2.6.x first * and add dependeny `akka-cluster-sharding-typed` although the actors remain untyped in first rollout * define akka.cluster.sharding.number-of-shards config * same value as you have used previously for number of shards * same value as you will use for Typed * otherwise Typed node will not be able to join in roll 2 * add akka.cluster.sharding.typed.ShardingEnvelope to message extractor * sender and ask * add replyTo ActorRef to the messages that are using sender for the reply * change from `akka.pattern.ask` to `akka.pattern.extended.ask` to populate the replyTo field in the messages * use the replyTo field instead of sender() unless it is null
* convert actors to Typed * use custom ShardingMessageExtractor in ClusterSharding.init * use same akka.cluster.sharding.number-of-shards config as was in roll 1
* custom ShardingMessageExtractor can be removed
* update to Akka 2.6.x first * and add dependeny `akka-cluster-sharding-typed` although the actors remain untyped in first rollout * define akka.cluster.sharding.number-of-shards config * same value as you have used previously for number of shards * same value as you will use for Typed * otherwise Typed node will not be able to join in roll 2 * add akka.cluster.sharding.typed.ShardingEnvelope to message extractor * sender and ask * add replyTo ActorRef to the messages that are using sender for the reply * change from `akka.pattern.Patterns.ask` to `akka.pattern.Patterns.askWithReply` to populate the replyTo field in the messages * use the replyTo field instead of getSender() unless it is null
* convert actors to Typed * use custom ShardingMessageExtractor in ClusterSharding.init * use same akka.cluster.sharding.number-of-shards config as was in roll 1
* custom ShardingMessageExtractor can be removed
patriknw
force-pushed
the
wip-rolling-update-typed-patriknw
branch
from
November 6, 2019 13:04
5d847f7
to
dc25a53
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
DO NOT MERGE
This example illustrates how a rolling update from Classic to Typed Sharding can be performed.
Full cluster shutdown is of course easier but if zero downtime is needed it is possible with these steps.
See the commit diffs to see what needs to be done in this 3 phase rolling update.
roll 1 - Scala: 359e08d, Java: 47bf16a
akka-cluster-sharding-typed
although the actors remain untyped in first rolloutakka.pattern.ask
toakka.pattern.extended.ask
to populatethe replyTo field in the messages
roll 2 - Scala: 0ceac95, Java: b415647
roll 3 - Scala: b27976b, Java: dc25a53
Refs akka/akka#26718