多个服务器上的多个进程之间的 IPC
假设您有 2 台服务器,每台服务器都有 8 个 CPU 核心。
每个服务器都运行 8 个网络服务,每个服务托管任意数量的长期 TCP/IP 客户端连接。
客户端向服务发送消息。
服务根据消息执行某些操作,并可能通知 N>1 个客户端状态更改。
当然,这听起来像僵尸网络,但事实并非如此。考虑 IRC 如何与 c2s 和 s2s 连接以及 s2s 消息中继一起工作。
- 服务器位于同一个数据中心。
- 服务器可以通过专用 VLAN @1GigE 进行通信。
- 消息是<大小为 1KB。
您将如何协调哪个主机上的哪些服务应接收消息并将消息转发到连接的客户端以获取状态更改消息?
有无数种方法可以有效地解决此问题。
- AMQP(RabbitMQ、ZeroMQ 等)
- Spread Toolkit
- 所有服务之间的 N^2 连接(糟糕)
- 哎呀,甚至运行 IRC!
- ...
我正在寻找一种解决方案:
- 也许利用了这样一个事实:只有一个小型封闭集群易于
- 管理,可
- 扩展性良好
- ,是“愚蠢的”(没有奇怪的边缘情况)
您的经验是什么?
你有什么建议吗?
谢谢!
Let's say you have 2 servers each with 8 CPU cores each.
The servers each run 8 network services that each host an arbitrary number of long-lived TCP/IP client connections.
Clients send messages to the services.
The services do something based on the messages, and potentially notify N>1 of the clients of state changes.
Sure, it sounds like a botnet but it isn't. Consider how IRC works with c2s and s2s connections and s2s message relaying.
- The servers are in the same data center.
- The servers can communicate over a private VLAN @1GigE.
- Messages are < 1KB in size.
How would you coordinate which services on which host should receive and relay messages to connected clients for state change messages?
There's an infinite number of ways to solve this problem efficiently.
- AMQP (RabbitMQ, ZeroMQ, etc.)
- Spread Toolkit
- N^2 connections between allservices (bad)
- Heck, even run IRC!
- ...
I'm looking for a solution that:
- perhaps exploits the fact that there's only a small closed cluster
- is easy to admin
- scales well
- is "dumb" (no weird edge cases)
What are your experiences?
What do you recommend?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
客户端的原始以太网广播和过滤怎么样?
What about raw ethernet broadcasting and filtering on client side?