Akka Cluster Aware Router

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

Cluster Aware Router

    Cluster aware Router compared to traditional Router what's the difference? The traditional Router is compared to a Akka System[to further confirm whether they can be remotely deployed?], Cluster Aware Router refers to the ability to identify clusters of routing. Cluster necessarily involves multiple Akka System, so Cluster Aware Router combination is Remoting and Routing. Cluster Aware Router can find the existing routing as their own routees, can also create remote deployment to multiple Node. The nodes in the cluster changes will automatically mount and uninstall ROUTEe.

Two usage scenarios

    1.Router that lookup existing actors and use them as routees

    2.Router that create new routees and deploy them on remote nodes     

Talk about the usage scenario, in the chart below the client through the websocket connected to the Front-End module, the Front-End is the system's window, command parsing is responsible for front transmission and forwarded down. The M1, M2, M3 is a business processing module of the system, the receiving Front-End sent instructions. If the deployment of the system is Front-End, M1, M2, M3 are in the cluster Node. Front-End routing is to use the Look-up method is the first approach, because the module defines the service interface of the whole system, but the specific business to a lower module to do; M1, M2, M3 module deployment can use second kinds of remote deployment, deployment can make such Routees dispersed in all Node nodes (note not to do so, weigh the pros and cons, see if necessary. Lee: controllability of unified regulation actor number; distributed; make full use of the computing resources. Disadvantages: network problem in distributed bring).

Lookup existing actors

akka.actor.deployment {

  /statsService/workerRouter {

    router = consistent-hashing

    nr-of-instances = 100

    cluster {

      enabled = on

      routees-path = "/user/statsWorker"

      allow-local-routees = on

      use-role = compute

    }

  }

}

routees-path: From that path Actor as their Routee

allow-local-routees: Whether to allow local search, or only allow remote lookup

use-role: Only looking from the particular node

Create and deploy

akka.actor.deployment {

  /singleton/statsService/workerRouter {

    router = consistent-hashing

    nr-of-instances = 100

    cluster {

      enabled = on

      max-nr-of-instances-per-node = 3

      allow-local-routees = off

      use-role = compute

    }

  }

}

Create-deploy will not make routees-path, max-nr-of-instances-per-node: Specifies the number of routees deployment of a single node.


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Caspar at February 24, 2014 - 11:18 AM