Double Eleven has just passed, have you received all your express delivery? It seems that due to the surge in traffic, the transfer and receiving points in various places have been bursting, the express delivery has been delayed, and the news of delays even as long as half a month has almost disappeared. When the transportation speed is constant, the number of transfer stations, the strength of the sorting ability, and whether the packet is lost and retransmitted, determine whether your express will arrive on schedule. 【Rongyun Global Internet Communication Cloud】
Then, if IM messages are things, and audio and video content are things, then the global communication network is the logistics system responsible for transmission. Under the premise of a constant physical distance, the design and optimization of routing hops, network bandwidth, network quality, and cache queues determine whether the system can achieve high-quality, low-latency transmission.
This is an introduction to the topic shared by Li Miao, the chief architect of Rongyun, in the WICC Guangzhou "Going to the Sea Sub-forum". As a result, Li Miao's topic sharing on "The Design and Optimization of Global Low-Latency Communication Networks" has become more concrete.
The design of the RTC and IM global network is the same and different
Rongyun global communication network is divided into two parts: RTC global network and IM global communication network, which is determined by the different acceleration characteristics of RTC and IM in transmission.
(RTC network and IM network)
The same point is that the two can be multiplexed on multiple physical facilities such as data centers and nodes, and both must ensure high-quality, low-latency transmission, so as to provide users with an excellent scene experience.
The difference is that: RTC runs based on the UTP protocol. For user experience, a certain packet loss rate is allowed, but the delay is demanding; while IM is based on the TCP protocol for business bearer, it requires messages not to be lost. The centralized storage can not only store offline messages for users when they are not online, but also store historical messages according to the type of business.
Therefore, Rongyun's design for RTC is a completely decentralized distributed communication network. The advantage is that in the subsequent network optimization, the deployment of media nodes can be added at will without affecting any user experience.
The network design of Rongyun IM adopts the method of importing data traffic to the data center. It has successively established data centers in China, North America and Singapore, and it has been iterated to an integrated acceleration network based on Anycast. It is characterized by multi-protocol support, multi-data center support, and the acceleration principle based on SmartDNS & Anycast can guarantee the accuracy of node allocation on a global scale with higher quality. In addition, many of IM's global link optimization work can be reused on RTC.
After understanding the above architecture, the key point is: How does Rongyun optimize the delay? This needs to be parsed from two directions, RTC and IM.
How to reduce the network delay of RTC
(RTC communication process)
For RTC, the best way to reduce the delay is to increase the coverage of the RTC node. The purpose is to shorten the physical distance between the user and the edge node, which means that the connection is completed with fewer hops.
For the selection of nodes, Rongyun must first ensure the full coverage of the continents, and then focus on the coverage of popular areas. The selected nodes are built based on the public cloud services of first-line IaaS vendors, and each node can be interconnected through a dedicated line. Not only can the stability of link transmission be improved, but the number of hops of the RTC node can be reduced, and even 0 hop or 1 hop can be achieved.
The difficulty of optimization lies in: how to let users choose the best quality node. Usually the most intuitive way is through intelligent DNS resolution, but Rongyun has verified that the accuracy rate is only around 80%. For this reason, Rongyun later added IP Anycast, which is completely different from DNS in principle. It can be distributed directly through IP. This distribution is carrier-grade.
In terms of link detection, the IDC with the closest physical distance may not be the node with the best quality. Even with smart DNS+IP Anycast, the accuracy still cannot reach 100%. For this reason, Rongyun has increased the detection capabilities of the client, and will issue N addresses when the user connects. The client performs detection according to the issued address, and selects the best link to connect. According to log analysis, the accuracy is over 99.5%.
The same cloud connection can be ensured by link optimization, so what should we do about cross-cloud?
The practice of Rongyun is to import and export the traffic between data centers through the purchased SD-WAN through the secondary cascade. Among them, cascade optimization is very important.
For example, if a North American user communicates with a domestic user, Rongyun will first establish a dedicated line interconnection between North America and Hong Kong, and then Hong Kong will establish a dedicated line interconnection with domestic nodes. This scheme of forwarding through the Hong Kong node can achieve a low-latency network optimization effect under the premise of ensuring quality.
But the difficulty lies in: failure degradation. During the transmission process, the private line and SD-WAN of the same cloud may fail. Although the probability of failure is extremely low, once a failure occurs, there must be trade-offs. In order to ensure that users can receive and communicate normally, the entire communication link can only be degraded. For example, when there is a problem with the dedicated line, the node will be jumped through the two-level cascade, or the data will be forwarded directly through the Internet public network.
In addition, to reduce delay, a complete network delay monitoring system is required. Rongyun has built various standard QoS monitoring systems on the client side, including real-time data reporting and background analysis.
How to reduce the network delay of IM
The IM network delay optimization approach mainly focuses on two aspects: data forwarding between nodes and certificate calculation pre-processing.
In terms of node data forwarding: IM data is transmitted based on the TCP protocol, but TCP's congestion control and packet loss retransmission strategies are not friendly. Therefore, Rongyun replaced part of the TCP protocol with the QUIC protocol, that is, from the physical distance Data transmission from remote edge nodes to routing nodes is optimized through QUIC.
(The history of IM global network)
Through QUIC optimization, firstly, it can avoid the TCP three-way handshake between the edge point and the routing node, and directly reduce the TLS RTT to 0; secondly, when the network is jittery, QUIC has a more friendly packet loss retransmission strategy, which can be done. The packet that is lost is compensated for, instead of TCP, once a packet is lost, all subsequent packets must be retransmitted. Internal testing shows that this optimization has reduced the overall network delay by about 15%.
In terms of certificate calculation front: Rongyun adopts the method of directly exchanging TLS certificate and SSL certificate on the edge node. In this way, the first is to reduce the overall RTT between the user data and the data center, and the RTT can be directly reduced to zero. Secondly, there are many small packet communication scenarios in IM. For example, a signaling packet has only 10-20 bytes. By decrypting the data packet at the edge point, the plaintext is transmitted to the routing node of Rongyun, and then encrypted and transmitted to the data center. , Which greatly reduces the amount of data transmission between the two furthest physical distance endpoints.
It should be noted that users do not need to worry about data security at all. Because Rongyun's edge nodes and routing nodes are all controlled by Rongyun, they are all trusted networks. But if it is necessary to complete data transmission on the public network, Rongyun will still encrypt the data link through the traditional TLS method.
Of course, Rongyun's IM optimization strategy is much more than that, and is more manifested in multiple aspects such as client and server log collection, zero copy, multiplexing, IP direct connection, and QoS guarantee.
For example, for log collection, every time Rongyun releases an SDK version, new log burial points will be added for business analysis, network analysis, etc., in order to optimize some directional or fixed-point areas.
When talking about future plans, Li Miao pointed out that Rongyun will continue to increase network construction regardless of cost and provide developers with better services. In terms of research and development, it will continue to improve the processing capabilities of the software itself, continue to enrich the means of data collection, and at the same time improve the accuracy of data estimation.
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。