The New Year shopping festival is coming. Has your girlfriend placed an order?

Watching live streaming has become one of People’s Daily habits of surfing the Internet, and live streaming shopping, as an important item, has recorded record sales. Recently, the Tmall New Year’s Shopping Festival just opened, and many users rushed to buy things on Taobao live broadcast. After all, you can buy things from all over the country or even the world without leaving home, which is very convenient for consumers who are keen to buy things.

So what technology lies behind the live buying? Why does the platform pay so much attention to CDN when developing the network broadcast system? In the current high concurrent live broadcast, what do CDN technicians need to pay attention to? The third cloud topic of Alibaba Cloud Edge Plus, Edge Sauce will tell you about those things about live buying and CDN.

All you care about is the cloud and let’s get down to business

Cloud topic | 3 about live to snap up those things with the CDN

Invited experts: Luge Ali Cloud senior technical expert, GRTN network chief design and evangelist, currently in charge of Ali Cloud live video products and real-time streaming media acceleration platform development.

I. What are the most critical technical indicators of Internet live broadcasting?

As we all know, “live broadcast” has become a very common form of entertainment. The timeliness and interactivity of live broadcast have become a new medium for information access and interactive communication. With the development of 5G, UHD, VR and other technologies, the interaction between anchors and audiences needs to be more real-time, and “delay” is becoming more and more important. The high delay affects the interactive experience of live broadcasting and hinders the implementation of live broadcasting in some scenes, especially in e-commerce live broadcasting. Comments and questions in live broadcasting rooms are an important means of interaction between audiences and anchors, and real-time interactive feedback of anchors is crucial to the activity of live broadcasting rooms and the conclusion of transactions.

Where are the few seconds of delay in the live broadcast?

We analyze the distribution of live broadcast delay, and the whole link of live broadcast can be divided into seven steps: collection, coding, sending, distributing, receiving, decoding and rendering. Among them, the overall delay of collection + encoding, decoding + rendering is relatively fixed, about 100ms in total, and the part with large changes is distribution and reception, which varies from tens of milliseconds to several seconds, mainly depending on the link delay jitter, the optimization of protocol stack, and the coverage of CDN resources.

Therefore, the “delay” of live broadcasting on the Internet is mainly limited to different regions, complex network conditions, transmission speed and other reasons.

Third, how can technical personnel make a breakthrough in delay?

In order to help the live broadcasting system break the bottleneck, technicians usually need to go deep into the above seven links to optimize. For example, encoders need to consider the congestion of the transmission to adjust the bit rate in real time to reduce the congestion, thus reducing the delay; Such as the traditional streaming media transmission media data again send and at the bottom of the transmission were independent of each other, the underlying TCP transport congestion control algorithm is a general algorithm, not considering the characteristics of the media, such a hierarchical structure is difficult to form the instant feedback system, in order to ensure the fluency, size design will be relatively conservative, the cache to sacrifice the end-to-end delay, If the transport layer and the application layer are integrated, QoS control is designed specifically for the characteristics of the media, and combined with the rate control of the coding side, the delay can be greatly reduced. In the traditional architecture, the seven links are independent of each other. The advantage of this approach is that the team division of labor is clear. However, the problem is that it is difficult to achieve cross-border integration of optimization methods, which leads to the failure to achieve system-level optimization.

At present, the common live broadcast scenarios in China include 1 pair of N broadcast live and N to N interactive live broadcast, among which 1 pair of N broadcast live mostly adopts RTMP, HLS or FLV protocol. Although it has the advantages of convenient integration, good compatibility and support for large-scale concurrency, the minimum delay is 3-6 seconds. While N to N interactive live broadcast generally adopts WebRTC/RTC protocol, and the delay can be controlled within 800 milliseconds, but it cannot support large-scale concurrent live broadcast. Therefore, as a cloud computing manufacturer of open video cloud services, Ali Cloud launched an ultra-low latency real-time Streaming (RTS) solution. This low-delay live broadcast solution is to achieve the end-to-end millisecond level live broadcast capability by embedding the live streaming terminal and the SDK of the playback terminal, or integrating the open self-developed protocol of Aliyun based on WebRTC.

4. Why do live broadcast system developers value CDN so much?

Many people will compare the existence of CDN to the “Courier boy” in the network system. In fact, its working principle is to ensure the coverage of a large number of edge nodes on the complex Internet transmission link, reuse nodes and network resources, and achieve an optimal balance in access cost, resource coverage and carrying capacity. Then, through a series of load balancing, distributed storage, intelligent scheduling, anti-weak network optimization, buffering strategy, network request redirect and content management and other technical optimization means, for the terminal request content to find a fastest and optimal transmission path.

Therefore, for the live broadcast system, CDN as the resource reserve of infrastructure is very important. Especially during large events when traffic bursts, flexible and flexible CDN can play a key role in system stability.

5. Can live broadcast delay be further reduced?

The desire to further reduce live latency is a common goal for streaming developers. The team led by Luge, together with mobile technology and XG Laboratory of Damo Institute, successively expanded from live broadcast and short delay live broadcast to THE field of RTC, and made efforts in QoS and AAA. Finally, the GRTN global real-time transmission network was successfully built. Its positioning is based on the heterogeneous nodes of the central cloud and the edge cloud to build the communication level streaming media transmission network with ultra-low delay and fully distributed sinking.

At present, GRTN integrates Internet live broadcasting and RTC and other business scenarios of audio and video streaming transmission and exchange. The short delay live broadcast RTS based on GRTN can support the standard H5 WebRTC push broadcast, and the delay can be controlled within 1s in the case of tens of millions of concurrent. RTC end-to-end delay can be controlled at about 250ms. During the 2020 Singles’ Day, Taobao launched GRTN global real-time transmission network for the first time. The data shows that with GRTN enabled, the end-to-end latency of live broadcasting is reduced by 83% compared to the traditional HTTPFLV/RTMP mode. In the future, GRTN will continue to invest heavily in node resource coverage and QoS, and the delay will be further compressed by 20% in the super-large-scale live broadcast scenario. Welcome to follow the “Ali Cloud Edge Plus” wechat public account, the background message GRTN into the user group.