Akka.Cluster | Sample akka.net cluster project
kandi X-RAY | Akka.Cluster Summary
kandi X-RAY | Akka.Cluster Summary
Sample akka.net cluster project
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Akka.Cluster
Akka.Cluster Key Features
Akka.Cluster Examples and Code Snippets
Community Discussions
Trending Discussions on Akka.Cluster
QUESTION
Given the following appliction.conf :
...ANSWER
Answered 2021-Jun-07 at 11:50If you're going to assign different roles to different nodes, those nodes cannot use the same configuration. The easiest way to accomplish this is through n1 having "testRole1"
in its akka.cluster.roles
list and n2 having "testRole2"
in its akka.cluster.roles
list.
Everything in akka.cluster
config is only configuring that node for participation in the cluster (it's configuring the cluster component on that node). A few of the settings have to be the same across the nodes of a cluster (e.g. the SBR settings), but a setting on n1 doesn't affect a setting on n2.
QUESTION
I am facing java.lang.NullPointerException
, while updating Akka version from 2.6.9 to 2.6.10.
Here's the sample code in which I am facing this error:-
- akka-sharding/src/main/resources/application.conf
ANSWER
Answered 2021-May-05 at 15:42You can use StartableAllocationStrategy
for your custom MyShardAllocationStrategy
. Also, you need to change the type of shardAllocationStrategy
variable to LeastShardAllocationStrategy
.
Full code for reference:
QUESTION
Im using distributed pub/sub in an Akka.net cluster and I've begun seeing this error when pub/sub grows to approx. 1000 subscribers and 3000 publishers.
max allowed size 128000 bytes, actual size of encoded Akka.Cluster.Tools.PublishSubscribe.Internal.Delta was 325691 bytes
I don't know, but I'm guessing distributed pub/sub is trying to pass the pub/sub list to other actor systems on the cluster?
Anyway, I'm a little hesitant about boosting size limits because of this post. So what would be a reasonable approach to correcting this?
...ANSWER
Answered 2021-Mar-12 at 11:47You may want to tackle with distributed pub/sub HOCON settings. Messages in Akka.Cluster.DistributePubSub are grouped together and send as deltas. You may be interested in two settings:
akka.cluster.pub-sub.max-delta-elements = 3000
says how many items can maximally consist on delta message. 3000 is the default value and you may want to lower it in order to reduce the size of the delta message (which seems to be an issue in your case).akka.cluster.pub-sub.gossip-interval = 1s
indirectly affects how often gossips will be sent. The more often they're send, the smaller they may be - assuming continuously highly saturated channel.
If these won't help, you may also think about reducing the size of your custom messages by introducing custom serializers with smaller payload footprint.
QUESTION
I am attempting to make a project using Akka Clustering, and have been using the akka-cluster-sample-scala from Lightbend(https://github.com/akka/akka-samples/tree/2.6/akka-sample-cluster-scala) as a base. As it lacks much direct information on connecting across a network, I modified the application.conf to look more like this:
...ANSWER
Answered 2020-Sep-29 at 15:22My question was answered by JohanAndren on the Discuss Lightbend forums:
https://discuss.lightbend.com/t/akka-cluster-connection-refused-between-machines/7263
The answer was that you cannot use the 127.0.0.1 localhost definition, all nodes must use their public ips/hostnames and ports.
QUESTION
When I try to send a message to the akka.net region proxy with the following code,
...ANSWER
Answered 2020-Aug-29 at 01:48The name was wrong, change the code like this, and everything is FINE!
QUESTION
According to the doc, it is recommended to implement efficient serialization with Protobuf or similar for our custom data type. However, I also find the built-in data types (e.g., GCounter
) extends ReplicatedDataSerialization
(see code), which according to scaladoc,
Marker trait for ReplicatedData serialized by akka.cluster.ddata.protobuf.ReplicatedDataSerializer.
I wonder whether I should implement my own serializer implementation or simply use the one from akka. What's the benefit of implementing my own? Since my custom data type implementation (see code or below) is really similar to a PNCounter
I feel the Akka one would work for my case well.
ANSWER
Answered 2020-Feb-10 at 22:05AFAIU they don't suggest implementing own serialization mechanism but rather using one of existing solutions from the market, that simply aren't part of akka as not being akka-specific. However they can easily be incorporated and for sure you can find 3rd party libs that integrate them into akka.
There is no simple answer for the question which one will be the best as it depends heavily on the specific use case. Here you have a discussion about performance of several of more popular options:
Performance comparison of Thrift, Protocol Buffers, JSON, EJB, other?
You can start by using akka built-in serialization and replace it later with something more suitable.
QUESTION
Following the Ditto Deployment Docker description. E.g. Adding a new password and then executing Docker compose command. Starting with clean Linuxmint 19.3 and new installed Docker and Docker-Compose setup. The localhost:8080 is reachable but fails to load API definition (Fetch error). Additionally I tried Hello World Example - Creating a Thing with adjusted Password set by me and I receive the 502 Gateway. In another Stackoverflow question 502 Bad Gateway nginx/1.13.12 on localhost while creating a new policy in ditto there was mentioned to check docker-compose ps therefore I tried to attach everything in the screenshot. As I said this is clean install Linuxmint 19.3 (Linuxkernel: 5.0.0-37-generic x86_64, + Docker (Docker version 19.03.5) + Docker-Compose (docker-compose version 1.25.0) and then followed the deployment instructions. Anyone has some hints what need to be configured or where I can find more information to that issue? Thank you!
[EDIT]: 27/12/2019 Setup - clean Ubuntu 1910 + Docker + Docker-compose - services are up and running -> Do not get the Fetch error in the browser anymore but still getting 502 Gateway from Nginx when trying to use the REST-API (using Postman - Ditto Profile) -> See Screenshot (e.g. Creating Things ->still using the Hello World Example).
[EDIT: 02.01.2020] NGINX-LOG:
...ANSWER
Answered 2020-Jan-02 at 12:40That sounds like a challenging problem to solve.
Based on the logs of the Ditto gateway
service binding the Akka Artery inbound TCP streams times out:
QUESTION
I am trying to run the Akka Distributed Workers project following the guide here https://developer.lightbend.com/guides/akka-distributed-workers-scala/
On run, it fails with series of error messages. The first one that caught my attention was:
...ANSWER
Answered 2019-Nov-20 at 14:46Ok, so after discussion with someone from Lightbend on the Gitter, It was discovered that the sample was temporary broken, and the upgrade to version 2.6.0 should not have been the case.
I modified the version to 2.5.26 and everything works fine.
An issue was opened to fix this here https://github.com/akka/akka-distributed-workers-scala.g8/issues/17
QUESTION
I have a 3 node cluster with
1 S1 - Seed Node 2 S2 - A node that hosts a shard SRD (which has S1 as seed node in config) 3 S3 - A node that hosts the proxy shard of the shard hosted in S2 (which has S1 as seed node in config)
Here S1 just creates the actorsystem, and does nothing else
When I Start the cluster (S1 first, then S2 and S3) and When S3 tries to send a message to the shard SRD(using the proxyshard actor ref), it complains:
...ANSWER
Answered 2017-Dec-06 at 09:04By default akka-cluster-sharding shards and shard proxies will automatically assume, that corresponding regions are living on all nodes in the cluster. You can however apply constraint on that - both shard region and proxy allows you to specify the cluster role
, i.e.:
QUESTION
I'm building an app with two kind of nodes (front and back) on akka 2.5.1, I'm using akka sharding for load and data distribution across the back nodes. The front node uses a shard proxy to send messages to the back. Shards initialisation is as follow:
...ANSWER
Answered 2017-Jun-06 at 15:13Got it!
I made 2 mistakes, for the first one check the UPDATE section in the main question.
The second is due to, for some reason, it is needed 2 shard regions up within the cluster (For testing purposes I was using only one), no clue if this is stated somewhere in the Akka docs.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Akka.Cluster
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page