Editor’s note: This article was posted by Wuming Yang at Gopher Beijing on February 27Based on the speech. Please quote from the HA Architecture public account “ArchNotes”.
Yang Wuming, chief architect of Panda TV, used to be in charge of technical architecture of Qihoo 360 PC online game, and was a senior backend development and technical expert of Sina Weibo platform. He has rich practical experience in large-scale Internet architecture, and is good at developing back-end basic services and components, especially high performance, high concurrency and big data business scenarios.
Panda TV is a live video broadcasting platform. Let’s first introduce the operating environment of our system. The following 6 services are only a part of our dozens of services.
Breaking down large services and deploying them independently makes it easier to simplify deployment and optimize and upgrade in a single point of detail. The capabilities of most services are common, such as smooth restart and multi-room deployment.
In terms of online services, if 10 million users are online, even if HTTP is sent online every 30 seconds, that’s 300,000 + QPS per second.
The performance of Golang’s HTTP server is so good that an average engineer only needs 10-20 backend servers if a single virtual machine can support 1W-2W requests per second.
With other, less high-performance languages, the machines needed can be many times as large; C++ performance is adequate, but engineers are demanding.
Room service is the main service, which needs core guarantee, so the section of room service is divided into fine granularity.
Independent storage is also used for the contents of frequently changed room information, such as the number of people count and other fields. This disadvantage is that each visit to the room information will bring an additional number of visitors service cost. This is one of the tradeoffs of architectural design.
Gift system is the standard of most video broadcast platforms. There are a lot of local tycoons who have the habit of gift consumption in China, and the concurrency of gift sending is very large in the peak period, especially when many local tycoons brush.
The gift system is a bit more consistent, so storing one copy of data for multiple indexes is an option to reduce transaction dependence.
Bullet screen interaction is a very good experience, more young, a large number of users like to interact with anchors in this way.
The network situation in China is complicated, so it is better to choose the single line machine room of the nearest operator according to the user’s location to access the bullet-screen message service, so as to make the bullet-screen more timely. BGP room can also be used, but the network bandwidth is much more expensive than a single line.
For large rooms, the number of bullet screen messages is particularly large, which is difficult for anchors and users to read. Some experience optimization can be made in terms of product strategy.
Video live broadcast experience is the most critical point of the overall platform. Video CDN is a technology that allows users to get the streaming media they need nearby, and solves problems such as delay and lag. From a technical point of view, do not only rely on a certain CDN provider or line. Many video live streaming platforms in the industry have made mutual backup of pull stream lines, and the video (transcoding and forwarding) cluster after push stream is also an optimized point. The mutual push redundant part of push stream resources, but the experience and high availability of optimized live stream are obvious.
The interface proxy service, which contains free business logic, is a common service of many companies. It can provide Intranet services to the Internet at a low cost. However, you need to consider Internet security policies, including authentication, service relationship mapping, frequency limiting, and service resource isolation.
We are looking for Golang engineers who are interested in our technology and business. All of them are equipped with high-powered computers and DELL dual-screen large-screen monitors, and provide a challenging technical environment. Interested friends please scan code to enter (there are also a large number of PHP, front-end, operation and maintenance, DBA and other technical positions).
The above is the main content of this share. Click to read the original text to download the PPT.
Learn more about Yang Wuming: From coder to chief architect with a monthly salary of 3000 yuan
Please indicate that this article is from the high availability architecture “ArchNotes” wechat official account and contains the following QR code.