gpt4 book ai didi

java - akka 中每个主机的最大 Actor 数

转载 作者:搜寻专家 更新时间:2023-10-31 19:33:43 25 4
gpt4 key购买 nike

在 akka 中,一个盒子最多可以容纳多少个 actor?

public void MyActor extends AkkaActor{

receive(Objet obj){
// so something
}

}

1)Is there some limit on max number of actors instances?I am planning to created around 10K actors on one box. I will have 50 such boxes so that i can scale horizontally
2)IS there some performance problems with this?

最佳答案

这只是拥有足够内存的问题:一个 actor 的开销大约为 400 字节(加上您在其中保存的任何状态)。这意味着在典型的系统上,您可以拥有数百万个参与者。性能不取决于您创建的 Actor 数量,而取决于您在他们之间发送的消息数量。如果这个数字高达每秒几百万,您也不用担心,除此之外,您将必须针对您选择的硬件对您的程序进行基准测试,看看它是否可行。

关于java - akka 中每个主机的最大 Actor 数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18989669/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com