スケーラビリティのために、Map アクター インスタンス (以下に名前を付けmapActor
ます) を複数のリモート ノード (たとえばhost1
、 、 、host2
および) に分散させたいと考えていhost3
ます。application.conf
Akkaでこれを行う方法がわかりません。
MapReduceSystem {
include "common"
akka {
actor {
deployment {
/mapActor {
router = round-robin
nr-of-instances = 48
remote = "akka.tcp://MapReduceSystem@host1:2552,akka.tcp://MapReduceSystem@host2:2552,akka.tcp://MapReduceSystem@host3:2552"
}
/reduceActor {
remote = "akka.tcp://MapReduceSystem@host1:2552"
router = round-robin
nr-of-instances = 1
}
/masterActor {
remote = "akka.tcp://MapReduceSystem@host1:2552"
nr-of-instances = 1
}
}
}
remote.enabled-transports = ["akka.remote.netty.tcp"]
remote.netty.tcp.hostname = "host1"
}
}
完全を期すために、ここに私のものがありますcommon.conf
:
akka {
actor {
provider = "akka.remote.RemoteActorRefProvider"
}
remote.netty.tcp.port = 0
remote.log-remote-lifecycle-events = off
loggers = ["akka.event.slf4j.Slf4jLogger"]
loglevel = "DEBUG"
}
mapActor
このアクターのインスタンスを作成するために 3 つのホストを提供したいという定義に注意してくださいremote
。これどうやってするの?
私の理解では、この構成はシステム起動マシンに対応しますが、構成はおよびhost1
でどのように見えるでしょうか?host2
host3