横向扩展套接字服务器
假设实时聊天客户端(Skype、Windows Live Messenger)使用套接字来保持与其相关服务的连接,那么开发人员会实施哪些策略来扩展其服务器?即使是像 Xbox LIVE 这样的系统,用户也可以聊天并向在线朋友发送游戏邀请。
主要问题是每个连接都必须共享状态;其中一些状态需要由其他客户端查询(这些客户端可以连接到世界另一端负载均衡器后面的不同服务器)。最明显的是在线状态。
这些服务是否使用基于巨型 RAM 的缓存(可能类似于 memcached)或 NoSQL 数据库(例如 Cassandra),世界各地的所有服务器都连接到这些数据库并更新和检索所需的状态信息。
我想知道这种解决方案对于像我上面描述的那样的实时服务是否足够快(或合理)。
我的主要问题是记忆力。通过负载均衡器和循环 DNS 平衡的组合,分配负载相当简单(我希望如此)。
Assuming live chat clients (Skype, Windows Live Messenger) use sockets to stay connected to their relative services, what are some strategies that the developers implement to scale out their servers? Even a system like Xbox LIVE where users are able to chat and send out game invites to their online friends.
The main problem is that each of these connections have to share state; some of this state needs to be queried by other clients (who could be connected to a different server behind a load balancer on the other side of the world). The most obvious one is online status.
Do these services use giant RAM based caches (maybe something like memcached) or NoSQL databases (like Cassandra) which all servers around the world connect to and update and retrieve the required state information.
I was wondering if this sort of solution would be fast (or reasonable) enough for real time services like the ones I described above.
My main problem is with memory. Distributing load is fairly straight forward (i hope) with a combination of load balancers and round-robin DNS balancing.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一种方法。虽然不一定涉及基于内存的缓存
Here is one way. Though not necessarily concerned with memory based caching