“If people had seen what OceanBase was like 10 years later, maybe OceanBase would have had much better support 10 years ago. But if that doesn’t exist, a lot of times you have to prove yourself first.”

According to the data of the Ministry of Industry and Information Technology, in 1998, there were 5000 software enterprises in China, with a market size of 32.5 billion yuan. By the end of 2018, there were 37,800 software companies in China, with revenue exceeding 6.3 trillion yuan and revenue increasing 193.8 times. But in the core three pieces of infrastructure — chips, operating systems and databases — we haven’t had significant breakthroughs in the commercial sense.

However, compared with chips and operating systems, the situation in the domestic database sector is slightly more optimistic. In addition to the traditional database manufacturers, data service providers, Internet giants, cloud computing manufacturers, hardware manufacturers, emerging start-up companies are also more and more invested in database research and development. When it comes to domestic and self-developed databases, OceanBase has to be mentioned. OceanBase is the world’s first distributed relational database applied to the core business of finance, completely independently developed by Alibaba and Ant Financial. OceanBase’s research and development started in June 2010. Because it chose to start from scratch, the road of research and development was difficult from the beginning, and the team was on the verge of dissolving because it could not find any business willing to use it.

In the end, OceanBase overcame the valley of death and completely replaced Oracle in Ant Financial, successfully supporting the pressure of all the core businesses of Ant Financial on the “Double 11” in the past five years, and creating a new record of 256,000 payments per second and 42 million requests per second processing peak in the industry. Since 2017, OceanBase has started to be commercialized externally, and has been established in dozens of commercial banks, including Bank of Nanjing, Zheshang Bank, Bank of Suzhou, PICC Health Insurance, etc. OceanBase helped Bank of Nanjing jointly build the open platform of “Xinyun +” mutual finance, realizing a 10-fold increase in loan transaction processing capacity, and significantly reducing the cost of the asset-light mode from the original 30-50 yuan/account to 4 yuan/account after the launch. Millions of loans were processed every day, and the average processing time was less than one second, making it more convenient for ordinary people to borrow money and truly realizing inclusive finance.

Looking back at the past and present, Yang Zhenkun, a senior researcher of Ant Financial and founder of OceanBase, believes that the success of OceanBase is due to the inevitability of the industry and the era.

It was the worst of times, it was the best of times

Since 2009, a large number of new non-relational databases have mushroomed out, causing an unprecedented NoSQL revolution in the entire database industry. At this time, relational databases had already passed the age of 30, and although there had been some so-called end of relational database revolution during this period, it did not shake the dominant position of relational databases.

But this time seems to be different. The rapid development of cloud computing has brought about the need for larger databases, and the disadvantages of relational databases are increasingly being criticized: cannot scale, small capacity, insufficient processing power, and very high cost. For many people at the time, the end of relational databases was truly nigh.

At that time, Yang zhenkun had been doing self-developed distributed systems for more than two years, and he was very optimistic about the development opportunities of cloud computing systems. In the same year, Yang zhenkun joined Alibaba and started the development of OceanBase, a distributed relational database.

It has been several decades since the birth of database, but basically its market pattern has not changed much, and the earliest manufacturers still dominate today. Because the database is very difficult to replace, it is at the bottom of the whole product or industry chain, the risk of replacement is high, but the benefit is much smaller. That’s why latecomers like IBM and Microsoft couldn’t replace Oracle. As a result, the database has become a very high threshold of entry, the strong continue to be strong field, difficult for newcomers to catch up. With Oracle in the way and NoSQL catching up, most people would think it would be a bad time to develop a relational database, but Yang zhenkun doesn’t think so.

After joining Ali, Yang Zhenkun found that regardless of taobao or Alipay, relational database plays a very key role, in the use of the impossible to get rid of. However, existing databases, whether commercial or open source, have many limitations and are far from meeting the demands of Internet and financial services such as Taobao and Alipay for high expansion, high concurrency, high availability and low cost. Standalone database has come to an end, the next step can only go to distributed, and distributed is exactly Yang Zhenkun is good at. If the distributed technology can be kneaded into the database to solve all kinds of problems existing in the stand-alone database, it will be a huge help and progress for the entire Internet infrastructure at that time. Yang zhenkun thinks they caught a good opportunity “in the right place at the right time.”

“Sky time” refers to the explosive growth of the Internet has put forward a great demand for the high concurrency and large amount of data in the database, and it will be much easier to promote with the demand; “Geographical location” means that Alibaba has a large number of scenarios requiring the use of databases, from Taobao to Ant Financial. OceanBase can try to make the database into a key system step by step from the application scenarios that are not particularly important. “Renhe” means that standalone database has come to an end at that time, and the next step must be distributed. At that time, most of the team members are from the background of distributed research, and they are doing their best work. In Yang zhenkun’s own words: “This is a once-in-a-lifetime opportunity, we must do it, and we can do it.”

A person who constantly breaks the rules

“A person who constantly breaks the rules”, this is the evaluation of Yang Zhenkun in an interview earlier. In 1984, Yang zhenkun was admitted to the Department of Mathematics of Peking University. He received his master’s degree from Academician Zhang Gongqing of the department. Later, he switched to the field of computer science and received his doctor’s degree from Academician Wang Xuan of the Department of Computer Science. It should be emphasized that it only took him three years to complete his university courses and more than one year to complete his master’s degree. He was only 24 years old when he became a doctoral student of Wang Xuan academician. In 1995, the research results of his team won the first prize of national Science and Technology Progress (ranked fourth). In 1997, at the age of 32, he was promoted to professor.

He chose to leave school when others might be content with their status quo. The reason is not complicated. His job is more engineering, and he has more opportunities in industry and can play a bigger role. When Yang left Peking University/Founder in 2002, he knew he had to do something different. He first joined Lenovo Research Institute as the chief researcher, responsible for wireless communication field research; Later, I came into contact with distributed system and was optimistic about its prospects. My work in Microsoft Research Asia and Baidu both belonged to the category of distributed system. The former focused on research, while the latter focused on engineering practice.

Looking back on those years in Peking University, Yang Zhenkun felt particularly grateful that learning mathematics provided him with a good mathematical foundation. Later, when he transferred to the Department of Computer Science, he met Professor Wang Xuan and laid a solid computer foundation, which led to his development today. As had the greatest influence on YangZhenKun, benefit he has teacher Wang Xuanyou two: one is how to determine whether a thing worth, the second is the technical concept of “indomitable spirit” and “sky” is to continuously pursue new technology breakthrough, “site” is to make technology a universal product, make the whole society can be widely used.

In fact, Yang zhenkun had no idea what he would do when he went to Taobao in 2010. After joining Taobao, he had two choices in front of him. One is to join the rapidly developing Taobao business team and take charge of technology, which is a relatively easy path with great development opportunities already visible. The other one was chosen by Yang Zhenkun himself. He set up a team from scratch to build a technology platform, which is the OceanBase database we see today. From joining Taobao to choosing to do their own research database, it only took two weeks.

It wasn’t an easy choice, but Yang trusted his judgment: “When I chose this project in 2010, I thought it needed to be done. At that time, the rapid development of the Internet brought the demand for large amount of data, high concurrency, we have a lot of complaints about the traditional stand-alone database, that it does not have the ability to expand, and does not have the ability to high concurrency, the cost is very high, but the Internet is inseparable from the relational database. This is something that should be done and needs to be done.” What Mr. Yang doesn’t say is just how hard it is.

At that time, Alibaba started to “go to IOE”, and almost no one thought of building a database from scratch. Traditional relational databases rely on external hardware to ensure availability. After high-end servers are replaced with cheap PCS, hardware is more prone to failure. How to ensure high availability of databases? How to ensure high availability and data consistency at the same time? How can distributed systems simultaneously fulfill CAP requirements? For decades so many database manufacturers, domestic and foreign basic no one has succeeded. And from the perspective of the company’s business development, it is not possible to wait for a few years to build the database and then develop the business. It is more feasible to build something based on open source and let the business move forward. Therefore, at the beginning of OceanBase’s project establishment, except For Yang Zhenkun and his immediate leadership at that time, other people either did not care about the project or did not approve of it. How many people at the time believed it was possible to build a distributed relational database from scratch and completely replace Oracle? At that time, there were only two or three thousand people on Taobao, while Oracle had more than one hundred thousand people. Even if all the people on Taobao worked on database, it was only a very small proportion compared with Oracle.

In Yang zhenkun’s view, if almost everyone agrees that something is important and needs to be done, it is not innovation. When everyone thinks this thing to do, in fact, the time to do this thing has passed more than half. As the lowest level of infrastructure software facilities, the database needs a long time to accumulate, can not be done this year, next year can be really large-scale use. Although there wasn’t much support for the database in 2010, it was probably a good thing for the team. No one paid attention, but gave the team years to accumulate and develop.

Yang not only developed it himself, but also positioned OceanBase as a technology product that his mentor, Wang Xuan, calls “indomitational” — a standardized product that serves as a general relational database, rather than a product for internal use. In fact, each company uses only a small part of the functions of any product, if only to meet the needs of the company’s own database, it may only need to invest 1/10, 1/5 of the manpower and material time. Making a universal product means having to implement everything, which is much more difficult and requires many times more team commitment, effort and time. But it was Yang’s initial insistence that allowed OceanBase to move beyond Ant Financial and into many banking systems today. But that’s another story.

Being a database is like walking in the dark. It takes a paranoid personality to cross the valley of death and reach the final destination. A new employee of Yang zhenkun’s team once expressed his confusion to him. At that time, the new employee had too much to learn and didn’t produce anything, while the new employee who joined Tmall at the same time had only been here for a month, and the system was already being used online. “If you look at it three years later, no one will remember what the student did on Tmall three years ago. But three years later, what you do today will still be used in the production system,” Yang told the newcomers.

Ten years of hibernation, skyrocketing

OceanBase’s first customer came from taobao favorites. At that time, Taobao favorites was in a period of rapid business development, with rapid growth of database visits, and faced with the situation that the number of servers needed to double or even several times in the next year. When the business side was busy looking for a solution, Yang Zhenkun took the initiative to come to the door and proposed that OceanBase could help them solve the problem and reduce the number of servers by an order of magnitude. Demo was launched in four months and trial version was launched in eight months. A year later, the system was officially launched. Taobao Favorites became the first business to eat OceanBase, and the new database achieved very good results. It was 2011, and the favorites project was OceanBase’s first small milestone.

But over the next year or so, the OceanBase team kept looking for more business, and did use some, but never again found anything as effective as taobao favorites. The database is difficult and the cycle is long. The input in the past few years may produce a little output, but in fact it is almost insignificant compared with the input. The pressure the team faces can be imagined. The database requires human input. The OceanBase team grew from only Yang Zhenkun at the beginning to more than 30 people in 2012. That’s a lot of heads, but there aren’t enough businesses in the company that are important enough to generate a lot of value and benefit. The team fell into a difficult period and was on the verge of breaking up several times.

When asked, “Did you ever think about what if it didn’t work out?” “Not everything can be done. It’s too hard. If you begin everything by wondering whether it will be possible, you will almost always get very little done.”

In the most difficult and dangerous times, the team ushered in a little change. In late 2012, the company moved the entire OceanBase team to Alipay. Alipay is in the financial sector and faces more database challenges than other businesses, giving the OceanBase team a chance to start from scratch.

In the summer of 2013, Alipay also started to “go IOE” and hoped to replace Oracle database. Again, Mr. Yang took the initiative, pitching OceanBase’s solution to Li Cheng, then his supervisor and now Ant’s CTO.

Financial industry database, the most afraid of sudden failure is the loss of data, involving money, more or less is unacceptable. In order to solve the contradiction between high availability and data consistency of primary and secondary databases, OceanBase implemented availability within the database system, replacing one primary and two standby databases with one primary and multiple standby databases. Master to standby synchronization is not required to synchronize to every standby, but to most libraries including the master (more than half), meaning that if two out of three libraries succeed, the transaction succeeds. If any machine goes wrong, the system’s availability and data consistency are guaranteed.

Cheng Li accepted Yang zhenkun’s proposal, and OceanBase team began to immerse themselves in development. The first target to be overcome was alipay transaction database. On November 11, 2014, OceanBase had its first big test.

In the wee hours of the morning before the big push, the teams were in their war rooms feverishly preparing. Ms Peng, then chairman of Ant Financial, went to the OceanBase team’s war room and asked: “Are you confident?” Yang joked with Peng: “Look, our Windows are already open. If something goes wrong later, we are ready to jump from here.”

In the original plan, 1% of the transaction flow of Singles Day would be cut to OceanBase. However, because the Oracle database system at that time could not support the huge influx of traffic, OceanBase finally succeeded in supporting 10% of the transaction flow of singles Day in 2014. After the test of Double 11, OceanBase got more recognition and support. Later, OceanBase team won the CEO Award of Ant Financial in 2015, which was the first time that a technical team won this award. Peng lei hopes to encourage those who are able to settle down and do a solid job of a technology with this award.

OceanBase team won the 2015 Ant Financial CEO Award

In the spring and summer of 2015, alipay transaction library and payment library were changed to OceanBase; In 2016, the alipay account system went online, which also marked that OceanBase really established a foothold in the most core and critical field of the financial system.

Since 2017, OceanBase has been promoted and used in commercial banks outside of Alipay and Ant Financial. The first two customers are Zheshang Bank and Bank of Nanjing. In just over two years, OceanBase has launched in dozens of commercial banks and insurance institutions such as PICC Health Insurance, Changshu Rural Commercial Bank, Bank of Suzhou and Guangdong Rural Credit Bank.

In October 2017, The “Xinyun +” Mutual finance open platform of Bank of Nanjing was officially released, which was the first attempt of the overall output of cooperation between Ali Cloud and Ant Financial. Through the construction of “Xinyun” + platform, the core system of Bank of Nanjing Mutual Finance has been greatly improved in loan transaction processing capacity, cost control and docking efficiency.

The traditional offline consumer finance business of Bank of Nanjing has been developed for 10 years with a balance of 10 billion yuan, while the online business volume of bank of Nanjing has reached 10 billion yuan in only one year after it cooperates with Internet platforms. After the launch of “Xinyun +” platform of Bank of Nanjing, business has grown rapidly, and the processing capacity of loan transactions has been comprehensively upgraded, from the original 100,000 transactions per day to 1 million transactions per day after the launch, which has played a more favorable support to inclusive finance. The asset-light mode reduces the cost of single account management to 1/5 to 1/10 of that of traditional IOE architecture, from 30 to 50 yuan per account to 4 yuan per account after it goes online. The number of maintenance personnel of “Xinyun +” platform is about 1/5 of that of traditional banking system. In previous cooperation, banks needed to connect with each Internet platform respectively. Since the project went online, multiple Internet platforms can be connected with only one Xinyun + platform, which greatly reduces repetitive construction, improves docking efficiency, and also reduces the docking cost of small and medium-sized banks and Internet platforms.

OceanBase has been on the verge of dissolution for nearly a decade, but has only taken small steps toward developing its own relational databases. Now, it seems to YangZhenKun OceanBase “opened a lot of a flower, but produce a small a fruit”, although it has been proved to everyone that generic distributed relational database can be made, but also the real application in a production system, but today OceanBase application is still very limited, far from give full play to its value.

Yang Zhenkun told us that OceanBase did not choose to develop based on open source or existing technical ideas at the beginning, but chose to take the road of distributed self-research. Although it is difficult, it will become an irreplaceable advantage after it is made. The last decade or so has been the decade of distributed systems, and the transition to distributed has become an accepted choice for everyone. At present, the distributed relational database represented by OceanBase of Ant Financial not only solves the scalability problem of relational database, but also greatly reduces the cost of relational database and improves its availability.

Oracle compatibility is now a top priority for OceanBase. The OceanBase team’s goal was to smooth out the migration of Oracle’s services in two years, with no need to change a single line of code or make any changes to the business.

In Yang zhenkun’s opinion, it is really a very difficult and even painful road to turn some of the earliest ideas and innovations into products. However, all the things OceanBase does are actually from business and customers. Only when the technology can be really applied to production and users is it really valuable. Otherwise, no matter how well it is done, it is just a castle in the air.

We believe OceanBase will go further and faster in the future.