简体   繁体   English

Enet:enet可以处理多少个连续连接?

[英]Enet: How many consecutive connections can enet handle?

I'm using Godot game engine to create a multiplayer game, it supports UDP, TCP and websockets. 我正在使用Godot游戏引擎来创建多人游戏,它支持UDP,TCP和websocket。 According to my research UDP is the only one reliable, they use Enet. 根据我的研究,UDP是唯一可靠的协议,它们使用Enet。

I didn't get a decisive answer from godot community on how many consecutive connections Enet can handle, many create a new server instance using docker per room, I don't like that 我没有从godot社区得到关于Enet可以处理多少个连续连接的决定性答案,很多人每个房间都使用docker创建一个新服务器实例,我不喜欢这样

I want to have 8 players per room, how many consecutive connections can Enet handle before that I have to create a new docker instance? 我想每个房间有8个玩家,在我必须创建一个新的docker实例之前,Enet可以处理多少个连续连接? If there's no good answer, I'd like to know the safest bet before creating an instance. 如果没有好的答案,我想在创建实例之前知道最安全的选择。

I just asked Enet creator on github, a super nice guy, he replied very fast, Enet can handle 4k connections on a single host. 我只是在github上问Enet创建者,他是个超级好人,他回答得很快,Enet可以在一台主机上处理4k连接。

I quote: 我引用:

"Trying to do more than 4K connections on a single host would not really be that efficient, because you are stressing one single OS process trying to deal with all the load of them. So you might want to reconsider your networking architecture so that those connections get split over to multiple hosts/servers and so they you can take advantage of parallelism." “在单个主机上尝试进行4K以上的连接实际上并没有那么有效,因为您强调单个OS进程试图处理它们的所有负载。因此,您可能需要重新考虑您的网络体系结构,以便这些连接被拆分到多个主机/服务器,因此您可以利用并行性。”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM