400 million calls per day! Baidi Cloud API Open Platform High Availability Architecture System Construction Practice

​Guide: API serves as a bridge between different applications, and through simple docking, it can automate cross-enterprise collaboration between different enterprise platforms. "Baidi Cloud", a B-end brand of Express 100, started investing in research and development of express logistics query and subscription APIs as early as 2010, and creatively launched an open API platform that supports high concurrency, high availability, safety, reliability, and distribution. More than 400 million times, it is the leader and practitioner of the domestic API economy!

01 API and API economy

API, or Application Programming Interface, is a computing interface that allows two different applications to communicate with each other without user intervention. In layman's terms, it is a bridge between different applications, which can maintain the communication between the two sides without interruption.

For example, one programmer speaks Chinese and the other speaks English. It is difficult for the two to communicate because of the language barrier. The API is a translator who understands both Chinese and English, and can pass messages between two programmers. API is equivalent to a bilingual software, which can freely transfer information between two interfaces of different programs, allowing both parties to obtain the latest information and understand each other.

API Economy (API Economy) was proposed by IBM in 2015, that is, enterprises transform themselves into a digital platform, and provide platform capabilities internally and externally in the form of API (Application Programming Interface), so that internal and external applications and Other platforms can access and invoke the enterprise's capabilities. In the API Economy, different enterprise platforms are connected to each other through APIs, and cross-enterprise collaboration is automated, which is also the concept of a programmable economy.

As the first express logistics information query website in China, Express 100 invested in the research and development of express logistics query subscription API as early as 2010, and quickly realized commercialization. It is the leader and practitioner of the domestic API economy; currently, Express 100’s API calls The volume exceeds 400 million times, leading the express logistics information service, and has become China's express logistics information infrastructure.

02 API requirements in the field of express logistics

With the rapid development of e-commerce, consumers have higher and higher requirements for express logistics. There are many heroes in the domestic express delivery industry: state-owned enterprises include China Post, and private companies with high reputation include SF Express, JD.com, Santong Yida (ZTO, YTO, STO, Yunda), Jitu, and Alibaba-based Cainiao Express, which has just announced that it will end in person. There are also many express companies such as regional Lianhaotong and Flying Express.

Whether it is an e-commerce platform or a self-built mall, express logistics information capabilities, as a basic service, are an important part of the underlying structure of e-commerce transaction products. After consumers place an order on the platform, the most important thing for the platform to consider is how to quickly place orders and deliver goods, obtain and track logistics information and visually present it to consumers, confirm the unfreezing of frozen funds according to the delivery status, and timely and accurately settle with merchants , financial confirmation of revenue, quick processing of user returns, etc. If it is necessary to connect with each express company one by one, it will be time-consuming and labor-intensive, and long-term investment in maintenance and system upgrades will be required. The interface of the express company will also bear an unbearable burden because all companies come to connect.

Based on the rigid demand of enterprises for logistics information connection, Express 100 has integrated and aggregated more than 1,500 express companies around the world to build an express logistics information infrastructure. Based on this basic foundation and capabilities, it launched a series of "Baidi Cloud" products for enterprise customers. ——Baidi Cloud·API Open Platform, Baidi Cloud·Enterprise Express Management SaaS, Baidi Cloud·E-Commerce Express Manager SaaS, meet the express logistics management needs of enterprises in the three scenarios of "checking express delivery, sending express delivery, and managing express delivery".

Baidi Cloud·API open platform provides enterprise-level express logistics information integration solutions, helping enterprises to break through the breakpoints of logistics links and mall systems. It is the leader and practitioner of the API Economy model in the industry. The super connector between them helps enterprises achieve digital upgrades, and creates a pioneer in the modernization of China's express logistics management!

Baidi Cloud·API open platform provides enterprise-level express interface services and some SaaS applications. Based on professional software and hardware technology research and development, it has created a wealth of open API interfaces for express delivery, including real-time express query and subscription push, express map track Query and push, express electronic face-to-face bill acquisition and printing, e-commerce platform order printing and delivery, courier company delivery aggregation service, intra-city delivery/errand aggregation service, international cross-border logistics aggregation service, face-to-face bill information intelligent identification and extraction, etc. Scenario API capabilities, enterprise developers, architects, product managers, operations managers and other professionals can obtain the logistics information capabilities of all express companies through one-time integration and docking.

03 System High Availability Architecture Design

Due to its own business characteristics, the API open platform must be able to support high concurrency, high availability, security, reliability, and distribution when it is born. Otherwise, it will repeat the old problems of the centralized architecture system and become an interaction bottleneck between access systems. .

Baidi Cloud·API open platform focuses on the high availability of the whole link in the high availability architecture design, including the network layer, application layer and storage layer. In addition, since it is an open platform, the interface is open to everyone (not everyone here can call, they need to register on the open platform, they are legal users of the platform, and the platform issues a set of appId and appSecert to registered users. It is used to verify whether the request is a legitimate user), security verification, identity authentication, authentication, flow control, encryption and decryption, etc. are also factors that must be considered in system design.

(1)    High availability design at the network layer

The network layer adopts remote disaster recovery design, using XenServer to build private cloud hosts in different places, and the computer rooms in the two places are connected through dedicated line tunnels. The physical hardware security guarantees the underlying application through the enterprise firewall, and provides high-availability hardware support for the application layer.

(2)    Application layer and storage layer high availability design

The application design adopts the current mainstream micro-service framework design. The front-end service uses LVS+Nginx to achieve high-availability load balancing services. The application service uses Jekenis+K8S+Docker to realize automatic expansion and deployment of micro-services, and uses efficient open source components to realize a unified configuration center , Efficient news communication. The storage layer system uses Postgresql cluster as relational data storage, uses Redis cluster to realize application intermediate cache processing, uses ES cluster to collect and analyze data operations, and uses NFS network storage for file storage.

(3)    Safety design

In the security verification, the IP legitimacy of the requesting party is verified, and the IPs considered to have illegal behaviors (frequent requests per unit time, frequent error reports, triggering risk control, etc.) are included in the blacklist IP set.

User identity authentication uses the issued key and secret. When the user requests the service interface, the key and the signature passed through the interface parameters +key+secret are passed. The platform verifies the legality of the key and signature sign, and releases if the verification passes.

Different users have different authority to call the interface (e-commerce platform order delivery, courier company delivery aggregation service, intra-city delivery/errand aggregation service, etc.), and the interface call scope is controlled under different user status (in review, logout, user violations are banned, frozen, etc.), this part is realized through user authentication.

The system sets three granular flow controls for interface level, user level, and system level to limit the number of calls per second.

In addition, all API calls are encrypted and transmitted using https, and at the same time, MD5 encrypted signature verification is performed on the transmitted parameters to ensure the security and non-tampering of data transmission.

04 System performance and application

Inheriting the gene of Kingdee technology, based on 13 years of industry focus, the current average daily call volume of Baidi Cloud·API open platform has exceeded 400 million times, the throughput is nearly 1 million per second, the interface availability is greater than 99.97%, and the cumulative number of B-end customers served exceeds 250 Wanjia, including financial companies such as Ping An Bank, China Merchants Bank, and China Construction Bank, leading Internet companies such as Tencent, Bilibili, and Ctrip, e-commerce platforms such as Kuaishou and Xiaohongshu, and consumer goods companies such as Mengniu and Gree, have withstood the The test of leading enterprises has formed the security and reliability of the industrial Internet level, and accumulated industry-leading best practices and word-of-mouth accumulation.

Cooperative customers only need to connect with Baidi Cloud·API open platform to easily obtain all the technical experience and capabilities of Express 100 in the field of express logistics information, build a powerful and reliable express logistics module, accelerate the program development process, and let developers no longer be entangled Unfamiliar with the underlying technical details of the express logistics field, and more focused on the R&D and realization of the product's own functions, it is the first choice to help companies improve R&D efficiency, reduce costs and increase efficiency!

Express 100 unveiled at GIAC Global Internet Architecture Conference

Bilibili, Haiguanjia, TCL, Hello and other customer booths exchanged likes

If you want to know more technical content of express logistics API, please create and communicate with us through our Qiwei! For information on Baidi Cloud·API open platform and technical access examples, please click to read the original text and visit the official github resource library of Kuaidi 100 (https://github.com/kuaidi100-api).

Guess you like

Origin blog.csdn.net/msup789/article/details/131855839