# //#cluster
akka {
  actor {
    provider = "akka.cluster.ClusterActorRefProvider"
  }
  remote {
    log-remote-lifecycle-events = off
    netty.tcp {
      hostname = "127.0.0.1"
      port = 0
    }
  }

  cluster {
    seed-nodes = [
      "akka.tcp://ClusterSystem@127.0.0.1:2551",
      "akka.tcp://ClusterSystem@127.0.0.1:2552"]

    auto-down = on
  }
}
# //#cluster

# //#config-router-lookup
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
    }
  }
}
# //#config-router-lookup

# //#config-router-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
    }
  }
}
# //#config-router-deploy

# //#adaptive-router
akka.actor.deployment {
  /factorialFrontend/factorialBackendRouter = {
    router = adaptive
    # metrics-selector = heap
    # metrics-selector = load
    # metrics-selector = cpu
    metrics-selector = mix
    nr-of-instances = 100
    cluster {
      enabled = on
      routees-path = "/user/factorialBackend"
      use-role = backend
      allow-local-routees = off
    }
  }
}
# //#adaptive-router