Uncovering the mystery of CDN optimization—Tech Neo’s 15th Technical Salon

Uncovering the mystery of CDN optimization—Tech Neo’s 15th Technical Salon

[51CTO.com original article] Network problems such as slow loading of websites, DDOS attacks, CPU load, cross-operator, regional server load, etc. have always been a problem for large, medium and small enterprises. CDN has become the mainstream solution for enterprises to optimize their networks due to its flexibility, convenience and low cost. However, CDN is not easy. Whether it is self-built or commercial, it always faces challenges such as technology, funding and decision-making.

"The cold and the hot are in balance, the day and night are equal, and the yin and yang are equal at the autumnal equinox." In this meaningful solar term, the 15th 51CTO Technology Salon with the theme of "Tech Neo" was held in Beijing. This salon invited three teachers from Gome Internet Application Operation and Maintenance Technology Director Zhang Gaoming, Meituan Cloud Technology Expert Wang Wei and Yixia Technology Architect Jia Chaoteng, to work with nearly 100 developers to uncover the mystery of CDN and share CDN optimization practices in different fields.

[[204676]]

"How CDN Makes the Network Smarter" event site

Gome Internet CDN Practice

The event started with a sharing by teacher Zhang Gaoming, who mainly elaborated on some of Gome Internet’s implementations and pain points in the CDN direction .

[[204677]]

Zhang Gaoming, Head of Internet Application Operation and Maintenance Technology at Gome

This Internet veteran has helped developers gain a deeper understanding of smart CDN , as shown below:

As shown in the figure, smart CDN consists of six parts: people, AI, big data, smart DNS, link optimization, and smart debugger, forming a closed loop that is closely linked.

Teacher Zhang mainly introduced Gome Internet's CDN optimization practices in APP, IMG and video:

  • APP side: Static file optimization, using methods such as thumbnails, two types of cache, short cache, etc.
  • IMG. Using WebP format, two types of images, CDN using UA judgment, 60%-70% resource usage
  • Video. Push and pull mode selection, CDN scheduler, adaptive player

Of course, there are also some pain points in the CDN optimization process:

  • Such as ISP (hijacking, IP mobile terminal, GFW)
  • Such as CDN (quality of service, billing method, personalized needs, friends are not enemies)
  • Such as user (external, internal)

Meituan's four-layer load balancing-MGW

The second speaker was Mr. Wang Wei, who has experience in developing and deploying Meituan’s four-layer load balancing cluster. From his sharing, developers can learn what load balancing is, the difference between four-layer and seven-layer load balancing, and the deployment techniques to achieve high performance and high reliability .

[[204678]]

Wang Wei, Meituan Cloud Technology Expert

There are two types of load balancing: hardware and software. Hardware load balancing has high costs such as hardware, manpower, and time. Software load balancing is more widely used. The following figure shows the early load balancing structure of Meituan.

Early load balancing structures had problems such as interruptions, long protocol stack paths, locks, and context switching. Solving the above problems required PMD drivers, kernel bypass, lock-free design, and CPU binding and isolation.

In terms of high reliability, Meituan’s self-developed MGW replaced the early LVS, mainly to solve the problems caused by machine offline and the impact caused during the upgrade process, realize fault detection and switching, fault recovery and capacity expansion, and improve the reliability of MGW stand-alone machines, application services, etc.

In the future, we hope to further automate upgrades and deployments to reduce operation and maintenance costs.

Miaopai playback link optimization practice

The last speaker was Mr. Jia Chaoteng from Yixia Technology, who focused on the " Miaopai playback link optimization practice ", covering details such as product and technical architecture, resource uploading before playback, playback & scheduling historical evolution, transcoding and subsequent optimization directions .

[[204680]]

Jia Chaoteng, Architect of Yixia Technology (Miaopai, Xiaokaxiu, Yizhibo)

Miaopai, which was launched in August 2013, has hundreds of millions of video views per day and thousands of celebrities. Currently, the peak daily views of Miaopai and Xiaokaxiu exceed 3 billion times, and the peak daily uploads reach 2 million. The technical architecture is divided into four layers from top to bottom: WEB, APP, business logic API, user and video services, and some class services such as relationship, counting, search, PUSH, and recommendation.

As shown below, this is the resource upload process before playback

Playback & Scheduling has gone through two versions. The first one is the direct return of business logic; the second one is based on the detection point, CDN log offline calculation of CDN quality, scheduling and cutting. Iterations have been carried out in the areas of self-owned IP library and IP library data update and maintenance, anti-hijacking, data reporting & log analysis. Of course, there will be unpredictable black swans in the process, such as Sina S3 service anomalies, intranet interruptions, Qiniu Ningbo optical fiber being dug up, etc.

In terms of playback scheduling, multiple CDNs are used for quality scheduling and fast access, achieving fast return, weak business logic, light weight, high efficiency, flexibility and controllability.

Transcoding service is an indispensable part. The following figure shows the entire transcoding process.

As the event was coming to an end, the developers were still enthusiastic and had in-depth exchanges with the teachers on specific issues such as CDN testing, architecture design, security, and backup.

[[204681]]

[[204682]]

51CTO Tech Neo Technology Salon is an offline communication activity for IT technicians that 51CTO has been organizing regularly since 2016. It is currently limited to the Beijing area and is held once a month. Each issue focuses on a topic covering multiple technology fields such as big data, cloud computing, machine learning, and the Internet of Things.

[51CTO original article, please indicate the original author and source as 51CTO.com when reprinting on partner sites]

<<:  What happens from URL input to page display?

>>:  Replacing global fonts in a rough way in Android

Recommend

Not "ugly" or "rough", Meizu Blue Note real machine experience

On December 23, Meizu and its new sub-brand Meila...

The experience of APP promotion gained after spending a lot of promotion fees

I believe that many students who are responsible ...

8000 words to deconstruct the 618 brand marketing gameplay

618 marketing is becoming more and more intense a...

How to formulate a promotion plan?

Many times, the process of formulating a promotio...

Guide to building marketing pages for the cosmetics and jewelry industries!

Do you often feel at a loss because you are not f...

Online marketing activity planning

The APP online promotion activity planning progra...

NetEase Cloud Music AARRR model growth analysis!

A while ago, NetEase Cloud Music ’s annual report...