These are chat archives for akkadotnet/akka.net

13th
Mar 2018
Bartosz Sypytkowski
@Horusiath
Mar 13 2018 07:13
@feitzi on VS Code there's a plugin, which supports HOCON syntax (it works, but you may need to specify formatting manually). Our goal for the future is to abstract the actual configuration format, so you could use any one you like.
also for the files like reference.conf I can see some degree of syntax highlighting, but no intellisense etc.
there was an idea to create a VS plugin which for a given reference.conf file in the project would be able to generate intellisense support for it, but it's way over our scope of work. Good for independent contribution thou
@ondrejpialek why do you think that system-wide crash would break cluster sharding?
travelbourne123
@travelbourne123
Mar 13 2018 08:07

https://travelbourne.com/index.php/london/

Cheap flights tickets from London to Paris Last minute hotels and car rentals in east London Uk
Start your adventure with cheap flight tickets from London to Paris and do not get the tired book last minute hotels in the UK , for ride book cheap car rentals in east London. Take advantage of the huge range of budget carriers including EasyJet, Ryanair, Jet2 and BMI Baby to luxury airlines like Emirates and lesser known operators cheap flight tickets from London to Paris.
cheap flight tickets from london to paris, last minute hotels in uk, cheap car rentals in east London

Havret
@Havret
Mar 13 2018 15:21

@Horusiath I have used cluster sharding and it seems it is just what I was looking for. But I have a problem with it. When I start a few nodes (lets say 3) Akka distributes state among shards perfectly. But when I kill some node everything crashes and I am receiving these logs from on all other nodes:

16:15:26.219 [Debug] [ShardRegion [[akka.tcp://Q@localhost:58877/system/sharding/PersistentChatActor#1039458924]] was not registered since the coordinator currently does not know about a node of that region] |

How to make my cluster to rebalance and move the state from the dead node and distribute it among alive nodes?

Havret
@Havret
Mar 13 2018 17:47
Shouldn't it be done transparently?
Ondrej Pialek
@ondrejpialek
Mar 13 2018 18:13

@Horusiath @Havret

@ondrejpialek why do you think that system-wide crash would break cluster sharding?

Ah sorry, poor wording on my part. I meant to say that the auto-start feature does not kick in on system start following a system crash, it only recreates them on shard migration (I actually don't know if this is true, my understanding is based on the docs). I was specifically replying to:

When my system crashes, I would like to restore it to the previous state which includes recreating all the ongoing chat conversations.

For that some external state handling is needed to keep track of active conversations, either by the means of Persistent manager or a projection.

@Havret sanity check - did you configure your persistence journal on all nodes and what mode are you using for sharding?
Also - what are you using for your shard id (in the message extractor?)
Havret
@Havret
Mar 13 2018 18:38
@ondrejpialek
  1. With Cluster Sharding I don't need my persistent ChatManager. With sharding.remember-entities = true Akka provides children restoration out of the box.
  2. I configured persistence journal only on nodes where I persist stuff.
  3. I do not set ShardId explicitly because I decided to use HashCodeMessageExtractor.
It's strange but when I kill my node with CTRL+C it dies smoothly and system rebalances itself moving all the entities which previously resided there to other nodes. But when I kill the process it tries to kill ME with aforementioned logs that 'ShardRegion (...) was not registered'. :(
Mathias Feitzinger
@feitzi
Mar 13 2018 19:32
@Horusiath thanks ;)
i like the way you can configure something with HOCON. But actual HOCON isn't very popular in the .net world, therefore support for a other configuration format would be a really good idea :)
Bartosz Sypytkowski
@Horusiath
Mar 13 2018 20:17
@Havret what downing provider are you using for your cluster? By default if node is unreachable but not downed, all shards living on it won't be rebalanced (because unreachability may be result of temporary network partition, and we don't want to create two instances of the same entity in the cluster).
Havret
@Havret
Mar 13 2018 20:38
@Horusiath I don't specify any, so it should be default.
Bartosz Sypytkowski
@Horusiath
Mar 13 2018 20:38
default is none ;)
Havret
@Havret
Mar 13 2018 20:39
Can you direct me some further reading, then? :D
Bartosz Sypytkowski
@Horusiath
Mar 13 2018 20:40
you can specify auto downing by setting i.e. akka.cluster.auto-down-unreachable-after = 10s - it will mean that any node, that was unreachable for more than 10 seconds, will be automatically marked as dead
Havret
@Havret
Mar 13 2018 20:40
sweet, thank you very much!
Bartosz Sypytkowski
@Horusiath
Mar 13 2018 20:41
however it doesn't solve network partitions - so if a network partition occured for longer than 10s, you can have both sides downing each other - which means that your cluster will split in two
to read about more advanced downing providers, you can go here: https://getakka.net/articles/clustering/split-brain-resolver.html
Havret
@Havret
Mar 13 2018 20:48
@Horusiath I have one more question. Can I specify special Persistence Journal for all the stuff connected with managing cluster sharding? I have noticed that these events pollute my Event Journal quite heavily. What is the best practice? Keeping infrastructural events alongside with my domain events or splitting them somehow?
Bartosz Sypytkowski
@Horusiath
Mar 13 2018 20:49
@Havret I've wrote more about cluster sharding here - in the article you can also find an example configuration for separating journal used for cluster sharding.
and if you are more interested about in-depth technical details, you can read this one
Havret
@Havret
Mar 13 2018 20:51
:) I read the first one. Don't know how I missed it.
You are doing a really great job here. Seriously!
Bartosz Sypytkowski
@Horusiath
Mar 13 2018 21:04
thanks :)