

Baidu handles the traffic of the Spring Festival Gala, but programmers are more interested in another point!
Baidu has been able to handle the traffic of the Spring Festival Gala, which is amazing. Some people compare Baidu’s 2019 New Year’s Eve activities to Alipay’s Five Blessings and WeChat red envelopes. Obviously BAT is worthy of its name. You can leave headlines and short videos, but you can never leave search, social networking and e-commerce.
Luo Zhenyu said in his New Year’s Eve speech on New Year’s Day that the traffic of the Spring Festival Gala is very strong. To advertise in the Spring Festival Gala, it is not only necessary to have enough money, but your server cannot crash. So Alibaba advertised in the Spring Festival Gala, but what people didn't expect was that Alibaba's servers were not good enough. However, while some Internet people are discussing that Baidu has not collapsed, programmers are more interested in another point, and that is architecture!
Some people say they want to ask a mentally retarded question, that is, what is the structure of Baidu’s red envelope grabbing activity? Is it based on C or JAVA? Some PHP masters guessed: the main venue, the yaf framework of PHP鸟哥, the php hhvm business layer, the underlying c, and the data are all in memory. Large front-end traffic scheduling golang, video and picture storage BOS system uses CDN, and there are many jobs in different places across the country. The success of the Spring Festival event is the result of Baidu’s tens of thousands of R&D efforts and the joint efforts of all business lines.
There is another programmer who likes to play King of Glory and wants to guess. He guesses that it is swim lane redis asynchronously to mysql and then asynchronously to redis. One set can support 3-5wqps, and multiple sets can be deployed using user lanes. According to Baidu's system, the probability of accessing bfe is relatively high, but the possibility of directly using nginx lua as the gateway and using php for the business layer cannot be ruled out.
A Meituan employee was a little disdainful: Are we still focusing on the data center level? Just edge computing. CDN functional calculations in various places, and then exchanging data with the data center, can block most of the traffic. The data center is nothing more than a traffic gateway entrance, followed by a business gateway diversion, and it can be layered and horizontally stacked with machines.
Although some netizens feel confused, some Alibaba employees feel that MySQL is not necessary for things like red envelopes, and Redis is the best. Some Baidu employees said: The most basic implementation is nothing more than queue memory. In fact, this is not very advanced, everyone can do it. But the architecture is different. In addition to bfe access, the backend is layered with lua, go, c, and php.
The last Baidu employee suspected of participating in this red envelope structure gave the answer, saying that the traffic distribution is golang and the business is php. After New Year's Day, the company notified us to do this. The PM developer was confused and then forced himself to do it. He worked overtime for three weeks at least 12 o'clock every day, and finally got it done. The requirements kept changing, the development kept rewriting, and the tests kept retesting... It was really only three weeks, and I admire how I survived. The code was changed to 15 versions!!!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SublimeText3 English version
Recommended: Win version, supports code prompts!

SublimeText3 Chinese version
Chinese version, very easy to use

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software