“We’ve used it.”, is what we like to hear most. Behind a few simple words, it represents heavy trust and entrustment. Starting today, we will pass“Believe in the power of openness”Share a series of in-depth cases to see the business value brought by a database to users in various industries from a business perspective.This article will introduce the story of tidb joining hands with Zhongtong technology to build a full scene and full link digital platform service.
Insight into every journey of the package
Live up to every waiting around you
It is believed that most people are quite familiar with the express logistics experience in the special period of “double 11”. From the “eager to see” after placing an order to the “whole process tracking” of the package, in recent years, express is no longer the “black box with shoulder and hand”. With the support of digital technologies such as electronic face list, automatic sorting, intelligent robot and full link digital tracking, the express industry is brewing a predictable new transformation.
Zhongtong express was founded in 2002. After more than ten years of development, its overall business scale has reached the first in the world and the first express enterprise with an adult business volume of 10 billion. Last year’s double 11 was a success with an order volume of more than 200 million. China technology is a platform for Internet logistics technology under the express of China Unicom. It has a team of more than 1000 people, and is adhering to the concept of “Internet plus logistics”, which is closely linked with the company’s strategy and business, and creates a full scene and full link digital platform service for the business of the whole ecosystem.
A brief introduction to the life cycle of express can be divided into five words, from sending and receiving to dispatch.
The whole logistics link will be disassembled into multiple key nodes according to such a process, and a large amount of data will be generated at each key node. Each data express company at each key node will conduct relevant analysis, including time-effective monitoring (such as the process tracking of express, the residence time of express at the express delivery point, etc.). In the original architecture, a lot of data statistical analysis depends on building many stored procedures on Oracle. However, with the increasing amount of data, the problems of storage and calculation become more and more obvious. Upgrading Oracle hardware alone can not fundamentally solve the problem, and with the continuous upgrading of hardware, the cost is becoming higher and higher.
In recent years, the business volume of the express industry has developed by leaps and bounds. With the surge of data brought by business development, Zhongtong has encountered the following problems:
- The data cycle stored in Oracle exadata all-in-one machine is getting shorter and shorter. The design of sub database and sub table can not meet the timeliness. Statistical analysis depends on stored procedures, and the scalability and maintainability of the system are not high.
- During the peak period of business, a single machine encounters a performance bottleneck, the risk of failure is high, and the analysis timeliness of data synchronization T + 1 is not enough.
- How to reduce TCO.
- With the rapid development of business and the surge of data volume, the data cycle that can be stored in exadata all-in-one machine is becoming shorter and shorter, and the demand of business parties for data cycle is increasing.
- Single machine performance bottleneck at business peak, high risk of single point of failure, data synchronization T + 1, insufficient analysis timeliness.
- Testing HBase and kudu to build a real-time data warehouse is difficult to be compatible with the existing technology stack, and can not well support the multi-dimensional query on the business side.
In the face of these needs, the newly built it system of Zhongtong express should not only be compatible with the past it architecture, but also be agile, be able to respond to the needs of business development faster, but also better promote the development of business in the future. In terms of key business support, the underlying database needs to meet strong consistent distributed transactions, support high concurrent reading and writing, provide flexible online expansion capability, and can be closely integrated with spark technology ecology, support the construction of large and wide tables, and support multi-dimensional query analysis.
According to the actual business situation and technical pain points of Zhongtong, tidb database cluster is built to realize the real-time writing of production data of multiple application systems. With the help of tispark, data real-time analysis and data summary are realized. At the same time, the upper application provides standardized API interface and flexible query interface for business operators and express delivery personnel, which meets the requirements of real-time, convenient To accurately query service requests, select tidb for the following reasons:
- Tidb supports online expansion. The data is divided into regions. It has its own scheduling management component to schedule hotspots and distribute data.
- Strong consistent acid distributed transaction and secondary index.
- It can write and update with high concurrency, and support rapid response to business needs and query results.
- Technical ecology is closely combined with spark, and supports rapid minute level statistical analysis with spark.
- It supports the construction of large and wide tables and multi-dimensional query analysis.
Order & waybill Center
After the user places an order through the platform client, a unique express order number is generated as the unique ID. In addition to the order number, express also has a lot of attribute information, such as sender, sender’s mobile phone, sender’s address, recipient, express type and so on. After the express order is generated, the user’s mailed items will become “express”.
When the express is sent, the courier will irregularly push the flow events, location and time information of express such as receiving, code scanning and transshipment to the system. Express transfer information can be not only simple quantitative data, but also descriptive text, geographical location and other special information. The system needs to record the flow information into the monitoring data of express, and modify the express status and real-time location, so as to realize the “whole process tracking” of the package.
In the traditional IT architecture of Zhongtong express, a large amount of data statistical analysis depends on Oracle. However, with the increasing amount of data, the problems of storage and computing become more and more obvious. Upgrading Oracle hardware alone can not fundamentally solve the problem, and with the continuous upgrading of hardware, the cost is becoming higher and higher.
The figure above shows the reconstructed architecture of the whole system of Zhongtong express:
- On the left is the message access from various links. These messages are connected through spark real-time computing, and merge and join with hive dimension table in distributed computing.
- At the same time, merge will be calculated with the data calculated and analyzed by offline T + 1 and the data with HBase.
- The final calculation result will be stored in tidb. Synchronize with tidb regularly every day, synchronize the data of tidb to hive and make a data backup.
- Relying on tispark for statistical analysis of data on tidb is usually called the summary layer. The summary layer includes public data and business layer data. We will also put these data in Oracle, including mild summary and multi-dimensional summary.
- Provide detailed services based on tidb, such as API interface services, detailed query and some tags.
From the perspective of the new architecture, each key node supports horizontal expansion, solves the single point problem and reduces the basic it cost.
Secondary distribution: Digital reshaping the whole distribution process
For logistics enterprises, reducing logistics costs has always been an industry challenge. Zhongtong express is also constantly improving efficiency and reducing costs from mode innovation, whole link optimization, and even all links of logistics.
In the daily process of receiving express, we can usually see information like “express has arrived at XXXX transfer center” and “express has arrived at XXXX distribution center”. This mode of setting transfer warehouse between factory warehouse and distribution terminal is called “secondary distribution”.
The principle is to analyze and calculate the warehouse address, material demand, vehicle carrying capacity, distribution times and other data through the big data platform, optimize the distribution route, reasonably select the logistics center address and optimize the warehouse storage space, so as to reduce the logistics cost and improve the logistics efficiency. In the whole logistics link process of express delivery of China express, there will be a lot of message access in each transfer link. It is necessary to predict the whole link routing and timeliness for each single express, and locate each express transfer link. The whole process not only has a huge amount of data, but also has high timeliness requirements.
As shown in the figure above, China Express builds a real-time data warehouse width table based on tidb. OLTP data of business is written in real time through tidb, and subsequent OLAP business is analyzed at the minute level through tispark.Through business measurement, it takes tispark about 10 minutes to synchronize 300 million pieces of data to hive, which provides guarantee for the real-time warehouse construction of Zhongtong express and the integration of offline T + 1, effectively supports the timeliness analysis and monitoring of the whole link, and can locate the status of each express in each link in quasi real time. It is understood that through secondary distribution, enterprises can save an average of 25% of the distribution cost per package in developed and dense cities.
The wave of informatization and intelligence has become a general trend. Only when technology and business go hand in hand can the express industry obtain future competitiveness.
Efficiency: it support efficiency increased by 300%
In 2019, Zhongtong express completed 12.12 billion business units, a year-on-year increase of 42.2%, 16.9 percentage points higher than the average growth rate of the industry.In the past double 11 promotion in 2019, tidb supported online OLTP and OLAP services at the same time. The peak QPS was 120000 +, supporting 10 billion level insertion and update. Tispark supported online minute level statistical analysis of services, perfectly ensuring the stable operation of double 11 Zhongtong express it services.In addition, the next generation database infrastructure based on tidb also brings the following benefits:
- Solve single point problems, clear overall architecture, enhanced maintainability and system scalability.
- Meet the requirements of high-performance OLTP business, support online horizontal expansion, go online and offline storage and computing nodes at any time, and applications are not aware.
- The data storage cycle is from 15 days to 45 days.
- OLTP and OLAP are separated to support analysis of more business dimensions.
Cost reduction: data driven fine operation, with a year-on-year decrease of 17.1%
In the face of fierce competition, through technological innovation, Zhongtong Express has upgraded the business system with tidb as the data base. At present, Zhongtong Express has more than 100 physical nodes and more than 200 instances of tidb put into production, mainly serving bill, settlement center, order center, waybill center, message center and transportation intelligent related product lines, The benefits obtained are as follows:
- Data driven refined management measures continued to bring benefits into play. In the second quarter of 2020, the single ticket cost decreased by 17.1% year-on-year.
- Tidb’s flexible, efficient and on-demand deployment scheme significantly reduces TCO compared with previous oracle.
Walk with customers and believe in the power of openness
Every time the database architecture is improved and implemented, whether TB or Pb, efforts need to be made, but it is also worth practicing by every enterprise. In this era, no matter how large the enterprise is, we should learn to use the power of open source to avoid making wheels repeatedly.
Behind every seemingly relaxed, there are unknown efforts, and behind every seemingly bright, there are unknown efforts. The road to the construction of distributed database is long and difficult. Tidb is willing to work together with Zhongtong technology and every customer to do things well.