We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is your feature request related to a problem? Please describe. 现在的所有进程(Server, Client)都放在同一个 Docker 容器内运行,不利于内存限制、或者分开查看内存、CPU占用。
Describe the solution you'd like 可以通过在不同 Docker 容器内运行各个进程来解决。详情见下面的解决方案: https://www.runoob.com/docker/docker-container-connection.html 即每一场比赛都创建一个 Network,各个 Client 连接到 Server。
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
每一场比赛的 Network 怎么互不干扰,也是需要解决的
Sorry, something went wrong.
只需要给每个比赛的 Network 起不同的名字即可。由于每场比赛有个唯一的 ID,所以可以用这个 ID 来起 Network 的名字,比如 thuai-game-network-<id> 等等。游戏开始的时候先创建 Network,然后基于这个 Network 创建各个容器(Server 一个,每个选手的代码各一个,如果是每队四人一共两队就有 9 个;今年非对称竞技是 6 个),然后游戏结束之后除了删容器,再多删一个 Network 就行。Player 容器在连 Server 时不再使用 127.0.0.1 或者 localhost,而是直接用 Server 容器的名字(在同一个 Network 下的各个 Docker 容器可以直接通过容器名连接到该容器的网络,这时容器名相当于域名,使用起来就如同域名通过 DNS 解析到 IP 地址一样)。
thuai-game-network-<id>
(当然如果以后有钱能租 K8S 的话就更简单了;如果队式全面改用 Serverless 架构的话就更更简单了 x)
DragonAura
TCL606
xiangmy21
No branches or pull requests
Is your feature request related to a problem? Please describe.
现在的所有进程(Server, Client)都放在同一个 Docker 容器内运行,不利于内存限制、或者分开查看内存、CPU占用。
Describe the solution you'd like
可以通过在不同 Docker 容器内运行各个进程来解决。详情见下面的解决方案:
https://www.runoob.com/docker/docker-container-connection.html
即每一场比赛都创建一个 Network,各个 Client 连接到 Server。
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: