Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

LinkedIn如何在一台机器上支持几十万条长连接? #77

Open
jwenjian opened this issue Aug 5, 2019 · 0 comments
Open

LinkedIn如何在一台机器上支持几十万条长连接? #77

jwenjian opened this issue Aug 5, 2019 · 0 comments
Labels
Instapaper Articles synced from Instapaper via IFTTT will be labeled [Instapaper] 架构 Architecture related issues

Comments

@jwenjian
Copy link
Owner

jwenjian commented Aug 5, 2019

LinkedIn 的即时消息:在一台机器上支持几十万条长连接

最近我们介绍了 LinkedIn 的即时通信,最后提到了分型指标和读回复。为了实现这些功能,我们需要有办法通过长连接来把数据从服务器端推送到手机或网页客户端,而不是许多当代应用所采取的标准的请求 - 响应模式。在这篇文章中会描述在我们收到了消息、分型指标和读回复之后,如何立刻把它们发往客户端。内容会包含我们是如何使用 Play 框架和 Akka Actor Model 来管理长连接、由服务器主动发送事件的。我们也会分享一些在生产环境中我们是如何在服务器上做负载测试,来管理数十万条并发长连接的,还有一些心得。最后,我们会分享在整个过程中我们用到的各种优化方法。


LinkedIn使用PLay框架以及SSE技术来实现即时消息功能,本文讲述了LinkedIn是如何优化即时消息功能来实现在一台机器上支持几十万条长连接的。

主要讲述了以下几个限制点及对应的解决方案:

  • 一个 Socket 上的处于待定状态的连接的最大数量
  • JVM 线程数量
  • 临时端口耗尽
  • 文件描述符
  • JVM 堆

对于设计即时消息,服务器推送等系统有很好的参考价值。

InfoQ 原文链接: https://www.infoq.cn/article/linkedin-instant-message

@jwenjian jwenjian added Instapaper Articles synced from Instapaper via IFTTT will be labeled [Instapaper] 架构 Architecture related issues labels Aug 6, 2019
@jwenjian jwenjian changed the title [From Instapaper] : LinkedIn的即时消息在一台机器上支持几十万条长连接 - InfoQ LinkedIn如何在一台机器上支持几十万条长连接? Aug 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Instapaper Articles synced from Instapaper via IFTTT will be labeled [Instapaper] 架构 Architecture related issues
Projects
None yet
Development

No branches or pull requests

1 participant