Not so tight/trusted cluster


(Gergő Törcsvári) #1

Hello!

I just playing with the idea.

If I understands well, in an akka cluster every node gets information from every other nodes state-change, and every node can send messages to every other node in that cluster.
What if I want my “not so clustered” app to be more safer, and instead of bind a new node to all of the existing nodes, I want to restrict its information change capability only to x other nodes. So every node would be in a direct contact with x other nodes instead of all the nodes. Every node would communicate only its neighbors, so if some rouge node would try to broadcast some malicious/compute-heavy message, just the neighbors would suffer/stop, and not the whole cluster.

Why this would be good? If I open-source an app, and everybody could host a public node (for example like how most of the block-chains works), one node would can’t kill the whole cluster.

I read the documentation about the data centers and the untrusted mode, but still curious, if some behavior like the upper-one can be implemented with the akka-clusters now (without reinventing the wheel ofc)?


(Patrik Nordwall) #2

First, let’s see if there is some misunderstanding of what Akka Cluster does. The core of Akka Cluster is “only” cluster membership, to keep track of what nodes are part of the cluster and their health. Then there are various tools built on top of the cluster membership, such as Distributed Data or Cluster Sharding.

What information exchange? The cluster membership? The messages that some of the specific tools are sending, which tool then? Other exchange would be your own messages and then it’s up to you to decide where to send those messages.

I don’t think Akka Cluster is suited for a public peer-to-peer application over the internet. The purpose of Akka Cluster is to have a few (100) nodes tightly connected that together implement a service or application. Communication with other systems should be done with other protocols, such as HTTP, gRPC, message broker.


(Gergő Törcsvári) #3

Exactly that was I tried to find out! Thx!


(Johan Andrén) #4

FYI, since the latest release we have added some text to the cluster and remoting sections that hopefully makes this more clear, see second text block in the intro here for example: https://doc.akka.io/docs/akka/current/common/cluster.html