TcaplusDB 10th Anniversary Ups and Downs

Tencent cloud database TcaplusDB has gone through wind and rain for a full 10 years, from being almost suspended without finding a demand, to supporting the benchmark of the database industry with billions of DAUs. The sun and the moon broke through the wind and waves, and one sword broke through nine days in ten years. Millions of lines of code are like a gurgling stream of data, finally converging into an insurmountable moat ten years later.

set off

Around 2010, the QQ space was very popular, which drove the popularity of SNS-based interactive page games (WebSNS), and Tencent began to consider how to do page games internally. It has also begun to build a basic technology system for web games. The most important output is the development of its own distributed database TcaplusDB. Different from MMOG games, WebSNS games are generally served in the whole region and the data is stored centrally; while the game logic server is peer-to-peer, and the web client communicates with the server through a short connection, that is to say, the player’s game process and back-end interaction The logical server is subject to change at any time; these characteristics make it inconvenient to cache user data at the logical layer.
In addition, WebSNS games have a lot of interactive scenes based on social relationships between players. An interactive operation of a player requires reading and modifying the data of multiple other players associated with it; this means that the frequency of data read and write access in web games is high. In terms of the number of simultaneous online, the access frequency is actually N times the number of online; if a 1 million online web game, each player has an average of 50 friends, if 1% of the players trigger a friend action at the same time, it may be Will trigger 500,000 data accesses. In other words, based on such a scenario, the database layer of web games needs to support a much larger access frequency than traditional MMOG games. If traditional database management systems (such as MySQL) are still used, the cost of supporting such a large access frequency is very large.
Therefore, setting up a high-speed cache system between the game logic layer and the traditional database management system is very important for web games.
At that time, there were already many NoSQL products that provide high-speed data access in the industry. It is undeniable that these NoSQL products are excellent for use in certain scenarios, but there are some scenarios or requirements that are not supported or not good enough-such as full Cost problems caused by memory or insufficient support for asynchronous data reading and writing, etc.
Since 2011, Tencent has started to develop its own distributed game database system-TcaplusDB. This is a very beautiful vision. But how easy is it to develop a database from scratch? Beginning in 2009, a large number of new NoSQL databases emerged, setting off a NoSQL revolution throughout the industry. Now the famous Redis and MongoDB were born that year. The development of TcaplusDB is a matter of high-rise building. While investigating external products, we have grasped the specific scenarios and needs of the game industry and performed minimal product verification. After continuous verification, the first version was finally released in early 2012.

opportunity

In April 2012, TcaplusDB officially provided services for the first time, supporting Tencent's self-developed web game "The King of Nightclubs". "King of Nightclubs" is a simulated business social game developed independently by Tencent with fashion nightclub as the theme, nightclub operation as the core, and vampire elements.
Insert picture description here

At that time, most of the games were in the form of "division server", and players in each area played by themselves. But WebSNS based on social scenarios requires all friends to play together. "The King of Nightclubs" is such a typical scene. The high performance and low cost of TcaplusDB won the favor of the project team. Thanks to the use of new technologies including the TcaplusDB database, "King of Nightclubs" through the "full service in the whole district", allows players to "fight" in a pool and invite friends through real-time parties to experience. "The King of Nightclub" has achieved quite good results through many channels such as QQgame game lobby, space, game life, friends and so on.
In the development process, setbacks are not without. In September 2013, Tencent's mobile game "Daily Cool Run" was in hot public beta, and the QQ and WeChat dual-platform login was opened, and you can play with your QQ and WeChat friends at any time. After going online, it quickly reached the top of the Apple App Store bestseller list in less than a day.
Insert picture description here

At the time of the public beta, the new game "Daily Cool Run" was equipped with 100 servers internally. For a new game, this is obviously a very abundant configuration. However, no one thought that "Daily Cool Running" would be so popular, and the 100 servers prepared would soon be high-capacity. Finally, under the coordination of multiple departments, the expanded 50 servers will soon be put on the shelves. The hardware is on the shelves, the network is connected, the operating system is properly installed, and the system software of TcaplusDB is quickly deployed.
But the next step is to realize the expansion of the database carrying capacity through the relocation of part of the data. According to the normal logic, even if the server is stopped for maintenance, the usual expansion has a process of preparation in advance. This time it came too fast. Seeing that the old database is approaching the storage limit, the influx of players over there are constantly creating new ones. Data, the speed of relocation must be fast enough to avoid database explosion. At that time, Daniel, who had been in the industry for many years, said with a wry smile: "According to the current situation, the database will collapse after 24 hours, and the game can only be temporarily suspended."
No one dares to face such an ending.
24 hours is very short, and you can do a lot of things, one word, do it!
As a result, we stepped forward with the cool running business team at the time and fought against each other. We debugged the relocation tools overnight, and launched them in the early morning, just to withstand the impact of wave after wave of user visits. With this experience, we are determined to do better. In the next few months, we all repeated one thing-line by line code, the most viewed is the starry night, the most drunk is coffee, and finally the automatic expansion system of this database is polished to be stable and efficient.

growing up

In February 2014, TcaplusDB has deeply optimized its storage engine and launched a fully managed distributed storage service.
But not enough, far from enough.
Remember the "King of Nightclubs" mentioned above? After more than 2 years of development, "King of Nightclubs" is now the number one business social game. However, "The King of Nightclubs" uses the old version of TcaplusDB. The fully managed version of TcaplusDB has greatly improved its performance and brought greater convenience to the project team in terms of services. Therefore, the switch to the fully managed version of "The King of Nightclubs" TcaplusDB was promoted.
Insert picture description here

Since "King of Nightclubs" is an online business, and TcaplusDB cannot be suspended this time, it has to solve the problems of different new and old protocols, different landing data formats, and different data distribution. For any team, it is a big challenge.
In the end, with the joint efforts of the "King of the Nightclub" team, we worked through data double writing, adding protocol conversion layers, and data consistency verification tools. Finally, the service migration was perfectly implemented. The data migration plan accumulated during this period also laid a solid foundation for the subsequent productization of TcaplusDB's non-destructive level expansion and lossless data migration capabilities.

At the end of 2015, "Glory of the King" was officially tested. The popularity of this game has once again broken through everyone's imagination. This game is like a behemoth that can never be satisfied, and it is overwhelmingly devouring various background resources. While breaking various game records, this guarding game is creating new records in the database every second. The craziest wave of games generally occurs on weekends. Looking back at that time, as soon as the weekend came, we would stare at the computer at home, watching various numbers soaring wildly. The accumulation of technology in the early stage finally came in handy, and the technical people who were waiting in the battle finally witnessed the history. Thousands of servers are automatically expanded without stopping under the pre-set unified scheduling mechanism, which perfectly handles the peak traffic. In the same year, TcaplusDB successively introduced automatic failure recovery, non-stop server upgrade, non-stop server expansion and contraction functions, and successfully supported "Everyday Love Elimination", "National Aircraft War", "National Assault", "CF Mobile Games" and " Naruto Mobile Games" and other games. In 2016, TcaplusDB successively introduced core capabilities such as fine-grained backup and recovery, software and hardware upgrades, computer room abolition and relocation, and software and hardware failures that will not damage the business. At the same time, it optimizes the ability to access massive data in a single business and provides robust and high-performance data storage services.
In the 2017 Lantern Festival Gala, in the Spring Festival Gala sketch "Going Home", the host mentioned "King of Glory", which made the team nervous and excited. Then, the continuously soaring QPS accompany us through a sleepless night, but fortunately, there is no danger in the end.
In the same year, TcaplusDB supported protobuf data format definition and access, and the protocol was more open and compatible with industry usage habits.
In 2018, TcaplusDB will achieve the ultimate in high availability, lossless expansion and shrinkage, deeply optimize performance to reduce costs, and enhance the ability of Api to multi-language, multi-platform, multi-mode, and easy-to-use, successively becoming "QQ Speed", "Law of Infinity", etc. The game provides high-quality data storage services.

open

In 2019, with years of accumulation and adaptability in game distributed system scenarios, TcaplusDB, as Tencent's completely self-developed NoSQL database, officially became Tencent Cloud Tcaplus, providing external services through Tencent Cloud. After combining the advantages of Tencent Cloud, Tencent Cloud Tcaplus has greatly improved in terms of multi-tenancy, security, open API and multi-language SDK.
In 2020, game manufacturers such as NEXON and Shanghai Shengqu began to choose Tencent Cloud TcaplusDB as the core database support business for games. According to customer testing and usage feedback, TcaplusDB's millisecond-level latency, tens of millions of QPS, unlimited horizontal expansion without sub-database sub-table, fine-grained retracement, service integration and non-destructive flexible configuration and other capabilities can really help. Game business.
While the core capabilities of Tencent Cloud TcaplusDB have been recognized by customers, we have to mention our powerful migration service. At that time, Shanghai Shengqu used DynamoDB, and the technical team of Shanghai Shengqu needed to solve the problem that developers were not familiar with the usage of Tencent Cloud TcaplusDB and the existing code migration. Through communication, the ease of use of the Tencent Cloud TcaplusDB interface has been fully recognized by customers, and the focus has shifted to how to migrate existing code to the Tencent Cloud TcaplusDB interface. After communication between the technical teams of both parties, there is a data access adaptation layer in the architecture of Shanghai Shengqu. All database access passes through this adaptation layer. The problem becomes clear and simple. Tencent Cloud sent technical experts to the site, and it took only two weeks to complete the code migration with Shanghai Shengqu's R&D team. At this point, TcaplusDB began to provide comprehensive services to public cloud customers.
Insert picture description here

On December 14, 2020, the China Academy of Information and Communications Technology officially announced the eleventh batch of big data product capability evaluation results. Tencent Cloud TcaplusDB became the first distributed NoSQL database product that passed the key-value memory database function evaluation.
In January 2021, the TcaplusDB community will be launched, which indicates that TcaplusDB will continue to promote the prosperity of the domestic distributed NoSQL database ecosystem through communication and co-construction with a large number of users and industry partners.

The next decade: to provide more assistance to the industry

Since its inception, Tencent Cloud TcaplusDB has been aiming to serve more developers, sharing storage R&D experience, tools and industry resources that have been internally tested by Tencent for R&D personnel who use high-performance databases. In the future, Tencent Cloud TcaplusDB will go further along this road as the leader of domestic databases and introduce more diversified functions to the platform according to industry trends. At the same time, Tencent Cloud TcaplusDB will work with industry partners to continue to share experience in Tencent's distributed database, and will actively invest in the research and development of one-stop low-cost data processing capabilities based on multi-mode and multi-load capabilities; to meet the requirements of global distribution Ability to help enterprises solve key business needs such as going global, global same service/multi-active, and cross-domain data migration.
In the next decade, TcaplusDB, which was born in games, will continue to optimize data service capabilities for more industries and contribute its own strength.

Guess you like

Origin blog.csdn.net/weixin_44545651/article/details/112800896