Introduction to is a member company of UFIDA Group, focusing on financial and management services for domestic small and micro enterprises. On the one hand, Chanjet has made its own products, businesses, and technology structure Internet-based; on the other hand, Chanjet has launched a one-stop cloud service platform for Chanjet, providing small and micro enterprises with digital intelligence, financial taxation, and digital intelligence business. As the core platform services, application services, business services and data value-added services, we are committed to establishing a "small and micro enterprise service ecosystem".
160ebe87a8c74c At the 2021 Cloud Native Industry Conference of the Institute of
Chanjet is a member company of UFIDA Group, focusing on financial and management services for domestic small and micro enterprises. On the one hand, Chanjet has made its own products, businesses, and technology structure Internet-based; on the other hand, Chanjet has launched a one-stop cloud service platform for Chanjet, providing small and micro enterprises with digital intelligence, financial taxation, and digital intelligence business. As the core platform services, application services, business services and data value-added services, we are committed to establishing a "small and micro enterprise service ecosystem".
According to Analysys International's report, Chanjet currently maintains the No. 1 coverage in the domestic small and micro enterprise cloud service market. More than 1.3 million companies and institutions have used Chanjet's software and services to achieve cost reduction and efficiency improvement, continuous innovation, and digital intelligence transformation.
In the early days, Chanjet’s business applications were built on the company’s self-developed CSP platform, including customer butler, easy account, good accounting, and good business. Each company was assigned an independent virtual machine, and resources were completely isolated. In the initial stage, the platform solution greatly simplified the complexity of development, improved development efficiency, and met the company's initial needs for the development of cloud services.
New demand
With the increase in the scale of users, the existing solutions of assigning an independent virtual machine to each user have prominent problems. First of all, it is reflected in the increasing number of virtual machines. When the customer conversion rate is not high, it is easy to cause waste of resources, and the operation and maintenance costs are also high. Second, the version of different user software iterations is not the same, and specialization is required. Design and maintain multiple versions of the patch update system; third, the product needs to be stopped and launched, and the business will be temporarily unavailable; finally, if the business of several users has a peak period, the capacity cannot be quickly and flexibly expanded, and the utilization of resources is not high .
In this context, Chanjet's R&D team decided to try the current industry's more common cloud-native architecture design solutions, using cloud infrastructure, sharing computing and storage resources, adopting containerized solutions, rapid and flexible expansion, and using microservice architecture , Update products according to application, completely solve the current problems of high operation and maintenance costs, insufficient flexibility, and unbalanced resource utilization.
Small and micro enterprises are characterized by large numbers, relatively small business volume of a single enterprise, and limited enterprise IT capabilities. Taking Chanjet's good business products as an example, using the existing cloud-native architecture can facilitate Chanjet to quickly develop a SaaS application that responds to large-scale and small-scale users and supports flexible and scalable SaaS applications. At the same time, through service orchestration, other product lines, such as Smart+, can be quickly built. At present, more than 200,000 paying users are using the cloud-native enterprise cloud service provided by Chanjet, which generates more than 100G of business data every day.
The driving force of cloud native application architecture
Domestic cloud computing products are developing rapidly, and the trend of enterprise applications moving to the cloud is obvious. In addition, government departments encourage enterprises to go to the cloud and introduce subsidy policies, and enterprise going to the cloud has become the general trend.
Especially in the epidemic stage, the business model changes, and the consumption mode changes. Only when enterprises go to the cloud can they be more conducive to accelerating the digital and intelligent transformation of enterprises, and more effectively helping enterprises to achieve "customer online, business online, personnel online, Manage online". The value brought by the current cloud-native technology can better help enterprises in their digital intelligence transformation.
1. Real-time online
Adopt intelligent access gateway to connect to the nearest cloud enterprise network, build private network communication channels between VPCs, VPCs and local data centers, and improve the rapid network convergence and the quality and security of cross-network communication through automatic routing, distribution and learning , To ensure that users are online in real time around the world, and accelerate the integration of online and offline for the entire customer base.
2. Digital Intelligence
Through cheap storage in the cloud, powerful computing resources and numerous algorithm models, Changjie Universal stores massive data at very low cost and analyzes it online in real time, providing users with more business decisions.
3. Quick response to market demand
Adopt DDD design ideas and use micro-service architecture to quickly develop applications with high cohesion and low coupling. These applications can quickly combine more applications through service orchestration to meet customer groups in different industries and fields, and achieve the effect of rapid launch and iterative optimization.
4. Stable and highly reliable
Using the container and microservice architecture, you can quickly build and run elastically scalable applications. When a system fails or a performance bottleneck occurs, the damaged application can be restored in seconds through mirroring, which ensures the high availability of the system. With the benefits of cloud-native technology, Chanjet can only focus on business development. On the one hand, it can accelerate the construction of new applications. On the other hand, it can also optimize existing applications and integrate them in the cloud-native architecture to achieve the effect of changing wheels on the run. It is more convenient for customers with historical stock to upgrade to the cloud.
Cloud native application architecture design
Cloud native application architecture design route
The original product is deployed in the physical IDC, and the isolation of the virtual machine between each tenant is achieved through the second opening of the cloudfoundry cloud platform. However, since each tenant has exclusive use of the container + database, when the number of users reaches hundreds of thousands, the database upgrade efficiency, container deployment cost, and hardware operation and maintenance complexity are significantly increased. It is imminent to solve the problem of cost reduction and efficiency improvement through the application of microservices and cloud access.
Chanjet has realized the deployment of containers, application sharing, and DB sharing among multi-tenants through infrastructure cloud deployment, database cloud deployment, technical framework and business framework reconstruction. The product is based on EDAS and the Alibaba Cloud container integrated on it. Serving Kubernetes version ACK. It is hoped that through cloud native technology dividends, the current problems of high operation and maintenance costs, insufficient system flexibility, and long product iteration lead times can be solved.
Application architecture transformation
1.
Divide complex applications into high-cohesion and low-coupling modules according to the business perspective, and these modules are independently developed and released independently. The business area is divided into four layers, namely the core area service layer, the business area service layer, the application service layer and the interface service layer. The core domain service layer includes authorization, UOM, organization (Party), product, pricing, promotion and inventory model modules, which mainly provide core domain knowledge and capability services; the business domain service layer provides business functions for good business, including procurement, Inventory management and sales domain services; the application service layer calls domain services based on specific application scenarios to solve specific business problems in the application. Each layer of service is a separate microservice, based on EDAS for the full life cycle management of the service, and through the introduction of Spring Cloud to achieve service registration discovery and governance.
In addition, because EDAS seamlessly integrates ACK and supports hosting applications in the form of containers to Alibaba Cloud Kubernetes clusters or hybrid cloud clusters (other cloud domains or self-built clusters in IDC), it can connect with Chanjet's underlying K8s cluster to achieve The timing elasticity of the K8s cluster and the automatic elasticity based on a certain monitoring indicator such as CPU/RT/Load are improved.
2. Data consistency
In the traditional single service architecture, the functions of all fields are aggregated to run in one process, and strong business consistency can be ensured through database transactions. However, Chanjet is now designed according to a distributed microservice architecture. Modules in different domains will be built into independent microservices. Microservices need to follow an eventual consistency scheme to ensure data consistency. For scenarios with high real-time requirements, Chanjet uses the TCC model; for those with low real-time requirements and can be processed in a long process, Chanjet uses message queues to decouple services to achieve final consistency.
Technical architecture transformation
1. Containerized management
The core application is deployed in the container, and unified orchestration and operation scheduling are performed through Kubernetes. For spike scenarios or asynchronous tasks that consume computing power, function calculations are used to build on-demand.
2. Service governance
After the introduction of the microservice architecture, service management is particularly complicated. For this reason, Chanjet introduced the Spring Cloud one-stop solution, so that development only needs to focus on business development, without paying attention to technical details. Through Spring Cloud, complete service discovery registration, configuration management, current limiting and downgrading, service invocation, data monitoring, etc., to achieve cost reduction and efficiency improvement, and also reduce operation and maintenance costs.
3. Gitops pipeline
Based on Gitlab, Jenkins, Rundeck, and K8s, build a self-developed DevOps pipeline, build independently according to micro-applications, freely package micro-services, and release and deploy according to containerization, ensuring that the operating environment of R&D, testing, and online stages is maintained constant.
4. Database level transformation
All tenants share the database, and divide the database and tables according to factors such as application and data volume; introduce the OLAP database, separate the transaction database and the analysis database, to avoid large queries from dragging users' transactions.
Cloud native application technology framework
The system is divided into front-end presentation layer, business middle station, technology platform, operation and maintenance middle station, and infrastructure layer.
front-end presentation layer : use the H5 front-end development framework based on the integration of micro-front-end applications, use qiankun to achieve the integration of homogeneous applications and heterogeneous applications, and support multi-terminal development.
business center : adopts the design idea of microservice architecture and is built on the EDAS platform. It can realize elastic scaling, current limiting and degrading, flow monitoring, etc. at the application service layer; the business model is driven by metadata and supports GraphQL queries; use RocketMQ realizes the decoupling of business.
technology mid-stage : Including container management, DevOps pipeline, micro-service governance, link tracking, etc., it is the cornerstone of rapid business delivery, stable system operation, and rapid business innovation.
Infrastructure layer : Including data storage layer and middleware. Data is stored based on relational databases, such as MySQL, PolarDB, etc., through tenant identification at the database table level to achieve multi-tenant shared database; the database also supports read-write separation, query operations only need to access the read database. The rest of the middleware has been re-encapsulated by the technology platform, shielding the specific technical details of the business.
Front desk adopts micro front-end framework
**
The front-end application has evolved from an ordinary single application to a monolithic application due to the increase in the number of participants and the increasing demand for product application modules. The front-end development projects of products such as Good Business, Smart+, and Micro Mall are all developed together. As a result, functional development and iterative launch cannot be deployed separately according to the application. In addition, the early business and technology layering is not clear, resulting in insufficient abstraction of public components, strong coupling between business and technology, and it is extremely difficult for technology to be updated separately.
Chanjet needs to design a framework to ensure that Chanjet's business code can be migrated smoothly, and it can also ensure that Chanjet can update its technology iteratively without affecting the online business.
Chanjet only needs to construct a sufficiently lightweight base in the main system, plus public reusable components (including basic technology components, basic business components, public business services, etc.), and then let each sub-application follow a common The agreement can be implemented. This protocol includes how the main application should load the sub-applications, how the sub-applications are perceived and scheduled by the main application, and how the applications communicate with each other. At the same time, Chanjet's system should also provide a unified build project, so that sub-applications no longer pay attention to operations such as configuration, dependency, construction, and release. In this way, each micro-application can be released and deployed independently, and the weak coupling between different applications also reduces the complexity of development.
Technology Platform-Container Management
quick release link:
Based on the linkage between the git source code management platform and the configuration management platform, the rapid and automatic generation and management of container images are realized. Based on the distinction of environment variables and the unified management and control of the configuration center, a container image multi-environment deployment mode can be realized, and Each code is scanned for security and consistency to ensure the security and stability of the code link.
Closed loop management link:
After being posted online, based on Alibaba Cloud Prometheus monitoring, the abnormal information is sent to the message center, and data aggregation and strategy orchestration in the message center form a work order flow mode to realize the closed-loop management of effective data.
business guarantee link:
In terms of container elastic scaling, Chanjet uses the HPA mechanism of K8s, based on the ability of Alibaba Cloud Container Service ACK to maximize the use of resources and custom indicators at the business layer, to achieve microservices in the face of sudden traffic such as live broadcasts, seckills, and online exams. The rapid expansion and contraction of capacity.
Technology Platform-DevOps Pipeline
- The pipeline method is used to connect tasks that originally run independently on a single or multiple nodes to achieve complex process orchestration that is difficult to complete for a single task. Automated build, test, and release processes make it easy to test every code change and catch bugs that are easy to fix.
- By constructing a DevOps tool chain, the whole process support from requirement issuance, to code submission and compilation, testing and verification to deployment and operation and maintenance is realized, opening up the complete path of software delivery, and providing end-to-end support for software development.
Technology Platform-Microservice Governance
With the rapid development of business, Chanjet has carried out a large number of micro-service transformations on the original IT system to meet the needs of rapid iteration and frequent release of large-scale Internet applications. As the SaaS-based enterprise management cloud service has the characteristics of large number of users, complex business, long call links, and deep integration with third-party application systems, it has brought great challenges to the transformation of microservices. Chanjet must improve its overall microservice governance and monitoring capabilities to ensure the stability and robustness of the system during frequent version iterations.
to the enterprise-level distributed application service EDAS provided by Alibaba Cloud. Spring Cloud applications running on EDAS can enjoy application lifecycle management, lossless offline, full link flow control, etc. A series of enhancements in the field of microservice governance. Especially in the application release process, the smooth online and offline and grayscale mechanisms provided by EDAS greatly improve the stability of the system during the version update and reduce the risk of application release.
Technology platform-full link monitoring
Hein’s Law states: Behind every serious accident, there are inevitably 29 minor accidents, 300 near misses, and 1,000 hidden dangers.
Especially after Chanjet adopts the microservice architecture, because the business links involved in SaaS products are extremely complex, when users report system bugs or performance problems, the technical team needs to spend a very long time on the intricate links. Locate the source of the fault and analyze the performance bottleneck. Chanjet also uses some APM tool products, including application performance monitoring, user experience monitoring, link tracking, problem diagnosis, etc., but such tools can only locate framework-level problems. For custom functions and in-process problems Asynchronous processing cannot achieve link tracking, and this type of APM plays even less role in a distributed application architecture.
Since Chanjet’s application is hosted in Alibaba Cloud’s EDAS, EDAS integrates the application real-time monitoring service ARMS , which can monitor the health status and key indicators of microservices, and set alarms for the monitoring indicators to detect and handle possible existence in time In order to ensure the health and availability of applications, Chanjet only needs to connect business operations with system logs, system logs and ARMS, and it can start from the business, run through the entire business life cycle, and quickly locate the application. The location of performance bottlenecks and abnormal failures.
To this end, Chanjet has implemented a set of mechanisms that abstractly model business operations according to Timeline, and combine system logs and Alibaba Cloud ARMS to form a trinity full-link tracking mechanism.
- In principle, all interactions corresponding to write permission points other than read operations should be regarded as a BI. So Chanjet can simply think that the authority point of each write operation is a BI. This in turn requires that the REST api provided by the backend must be scene-oriented, and each API corresponds to a permission point.
- The request\_id of BI and REST api needs to be associated to track the relationship between business operations and system logs.
- WebFilter intercepts all RESTful API Requests and Responses, obtains request and response information, and parses specific characteristics, roles, relationships and other data from the intercepted data through the value formula in the interactive protocol. The Create operation is added to the Request request to automatically record the original value of the entity, and the Complete operation is added when the Response returns, responsible for writing the new value, and recording the before and after changes. The two are used in pairs at the beginning and end of the interface call.
- In the background log, the comparison between user\_req\_id and the uber-trace-ID of Alibaba Cloud's arms is recorded.
Through the full-link tracking mechanism, Chanjet associates the interactive operation of the business with the monitoring of Alibaba Cloud ARMS applications. In particular, there are some operations that are decoupled through message queues in the business, and Chanjet can be tracked through BI , Which provides further monitoring capabilities for Chanjet's microservice system. After accessing ARMS, the workload of locating system fault sources and performance bottlenecks was reduced to less than 50% through the use of full-link information investigation and real-time diagnosis tools, which greatly improved the work efficiency of the IT team.
Technology Platform-Grayscale Release
Grayscale release (also known as canary release) refers to a release method that can smoothly transition between black and white. A/B testing can be performed on it, that is, some users continue to use product feature A, and some users start to use product feature B.
Gray period 160ebe87a8dbb9: The period from the new features in the gray environment until the deployment of the new features to the online formal environment is called the gray period. For 2C applications, the user is used as the basic unit of gray scale for shunting. For 2B applications, tenants are the basic unit for distribution.
Grayscale environment includes database grayscale and application grayscale. If you support grayscale at the database level, you need to create a new grayscale DB, import the customer data participating in the grayscale into the grayscale DB, and then clean the data and merge it into the formal production DB after the grayscale is over. This process requires more operations and higher costs. In view of this, the database level does not consider grayscale. Based on this setting, the following constraints need to be followed:
- The amount of gray-scale customers is controlled in a small range to reduce the scope of data restoration as much as possible;
- The model design strictly follows the compatibility principle, such as: only increase but not decrease, and fields avoid reuse;
- The system data that affects business logic needs to be evaluated. For example, if a system-level enumeration value is added, which is only visible to grayscale customers, you can consider copying a copy of the system data for grayscale customers and delete it after grayscale. The system back-end code logic will give priority to tenant data, and no more Obtain system-level data.
Grayscale of the application Because the back-end external services are all REST APIs, load balancing or reverse proxy that supports calling external services can be used to obtain the grayscale user list, and then the users can be diverted. The compatibility of the back-end interface needs to be guaranteed. When the compatibility cannot be guaranteed, the front-end must be forced to upgrade together.
Infrastructure layer-database read and write separation
When the initial cloud service was launched, the user scale was small and the amount of data was small, so the online environment MySQL did not implement a read-write separation solution. During the stable operation for a period of time, the increase in PV and UV as the scale of users has brought tremendous pressure to the database, which is mainly reflected in the following three points:
- For complex services, the efficiency of multi-table joint checking is low, which leads to insufficient response of business functions or even query timeouts;
- During peak business periods, traditional databases cannot be quickly upgraded. They can only wait for the peak business to pass or perform flow control;
- The business code is sensitive to the master-slave delay and cannot make full use of the slave library.
In the early stage, Sharding-JDBC was used to realize the separation of read and write, but the read and write operations of existing products are mutually bypassed, and it is not easy to separate the read operations, and the synchronization delay between the read library and the write library is relatively large, which does not meet business needs. After investigating PolarDB, I found that its cluster address directly supports read-write separation and is 100% compatible with MySQL syntax, which has no impact on business. Through PolarDB's minute-level bounce capability, it can be quickly upgraded; its unique parallel query capability can also reduce the response time of complex queries and improve the concurrency of the system.
Therefore, Chanjet migrated the database from MySQL to PolarDB, and adopted the one-write-multiple-read mode, and separately designated read nodes for the time-consuming report query business, which reduced the impact of time-consuming operations on other businesses and ensured users’ Normal trading operations.
Operation and maintenance middle station-monitoring system
The traditional alarm mechanism uses the message as the carrier to be as concise as possible. It is more inclined to alarm that is the failure mode, covering less information, and often serves as a reminder for later judgments.
With the improvement of the operation and maintenance model, the combination of a large number of efficient tools, self-healing, time-series events and other related systems continue to emerge. At the same time, the cloud-native model that has emerged in recent years will realize the old difficult problem of intelligent early warning: the problem of information standardization. High-quality solutions have also accelerated the pace of upgrading the monitoring structure. The single mode of alarm no longer meets the needs. The operation and maintenance personnel hope that the alarm is meaningful, has a process, and has a conclusion.
Chanjet has long been committed to a three-dimensional monitoring architecture based on customer experience. From the latitude of customer performance and experience loss, the monitoring information is graded and weighted, and users are accurately monitored through customer portraits and feature models in each link of the business chain. Experience. The user can warn and enter the processing process without the user's perception. The incidents that enter the process are reversed in the internal message center, associated calculations, root cause analysis and self-healing solutions. And according to the event processing model to respond to the event, send an alarm, the alarm covers the key information and conclusions of the event. While improving the effectiveness of early warning, it also avoids various efficiency losses in the traditional fault handling model.
Features of cloud native application services
DevOps Tools-Troubleshooting Center
As we all know, distributed systems follow the CAP theory, Chanjet usually chooses to meet AP and give up C (consistency). According to Murphy's law, Chanjet ultimately requires manual intervention to ensure the final consistency of the data. Then, checking to find inconsistent data, distinguishing error scenarios, and repairing them according to procedures, a system is needed to assist.
Different from system operation and maintenance, business maintenance is for business and services, and business problems are discovered and resolved through the monitoring of tenants and tenant data. In addition to data inconsistency, there are other common faults during system operation. It is also necessary to facilitate the support and resolution of some common customer problems, and provide some analysis views to help R&D or operation and maintenance to understand the status and trends of tenants. The response to these demands will also become inefficient due to the physical isolation and safety requirements of the production environment. Only by solidifying into the system to form a tool set can it be better solved.
Therefore, Chanjet provides a set of business maintenance system, responsible for business data monitoring, problem diagnosis, fault repair, situation warning, etc. The overall design is as follows:
At present, the system conducts regular inspections for six types of failures: activation failure, timing task failure, dead letter, data audit violation, import timeout, and TCC failure, and integrates with the Midas message system of operation and maintenance to detect problems in time and issue nails to the specific person in charge. Nail alarm; the person in charge can view the specific cause through the display of the fault and the detailed list; for the specific fault, it also provides auxiliary methods such as viewing the context log, re-opening, replaying the dead letter, recalculating the quantity account, and resubmitting to solve the fault.
Security Service-Content Security
Chanjet's products will involve collaborative chat messages and e-commerce product evaluations. These contents may be maliciously used by outsiders, and some illegal advertisements, online fraud, terrorist information and other content will be entered into Chanjet's products and Therefore, Chanjet’s operation and maintenance security department needs to increase content security monitoring to ensure the clean and healthy operation of the company’s products and prevent cybercrimes from happening to Chanjet’s products and users.
Chanjet borrows the system's operation log and message queue to decouple content security detection and business functions. With the help of functional computing capabilities, it can call the security detection capabilities (text, image, etc.) provided by cloud service vendors on demand. Identify sharable businesses and whether the content complies with the security law. Manual review and misjudgment pardons are also added to the test results.
Separation of numbers
For statistical analysis data, Chanjet uses DTS to incrementally synchronize the original data from the relational database to the data warehouse every day. After performing data cleaning and summary statistical analysis at a fixed time, this part of the data is transmitted to Elasticsearch. At the same time, Chanjet also uses MaxCompute's multi-task computing capabilities to perform label calculations on business data, and the calculation results are also passed to Elasticsearch. The business system accesses these data through Elasticsearch's REST API and displays it to end users.
Full link flow control technology + terminal cloud joint debugging
Due to the dependence between microservices, developers cannot complete development and testing locally, and must rely on a set of test development environment.
R&D efficiency : When hundreds of developers share an environment, the development code is frequently changed, the quality is low, services affect each other, the development environment is often interrupted, and debugging is difficult, which seriously affects the development efficiency and R&D hope Each project can provide a set of environment, as shown in the figure:
R&D costs : If a full environment is provided for each project, the cost of computing resources is high, and the cost of operation and maintenance will also increase sharply. (There are nearly a hundred microservices in the development state, and 20 projects are developed and calculated in parallel, which requires the computing resource cost and operation and maintenance cost of nearly 2000 POD/ECS) During the growth period of the product, the number of parallel projects and services are increasing.
Comprehensive efficiency and cost factors, Chanjet introduced gateway, full-link flow precise control technology, end-cloud joint debugging technology, and superimposed the project development environment with the application of baseline environment + incremental modification: according to the enterprise Id at the entrance Traffic marking (inject environmental identification into the request according to the enterprise ID), such as: https://cloud.chanjet.com/req?orgId = enterprise ID, the environmental identification is circulated in the entire execution process along with the request (http request, rpc requests, timed tasks, messages, etc.), through the environment identification, precise control of microservice calls/messages. As shown in the figure:
Chanjet deploys the latest online code in the baseline environment, and only deploys applications involving modifications in the project environment:
(1) Provide a stable independent project environment for project research and development, so that research and development can quickly collaborate in a "small-scale, multi-batch" (DevOps best practice) method;
(2) Save resources and reduce operation and maintenance costs. (Modify 5% of the applications for each project, and there are nearly a hundred microservices in the development state. If 20 projects are developed in parallel, 2000*95%=1900 ECS/POD will be saved);
(3) Using terminal-cloud joint debugging technology, it is convenient for the development of local PC to be added to the project environment for debugging. as the picture shows:
The technical value of cloud native
Highly flexible and scalable
The system can support horizontal expansion at the application service layer and database layer.
Application: architecture and containerized deployment. The technology platform can sense server load, elastically scale service nodes, realize cluster expansion/shrinkage, and quickly supplement computing power.
database: database supports rapid expansion of read nodes to support more concurrent requests. At the same time, tenants realize data isolation and can realize cross-database migration according to load.
Microservices
In the microservice architecture and design phase:
- Introduce the MDD domain-driven methodology for application architecture design and domain model design;
- According to the design principles of microservices, perform service splitting and definition of responsibilities and relationships, and determine service interfaces and domain models;
As a complex ToB application, Chanjet will split the microservices according to the following principles:
- Available-the split modules can meet the needs of the application;
- Easy to use-split modules can form applications in a relatively simple and clear way to serve application value;
- Beauty-express complex issues in the simplest way; easy for business people to understand.
Back-end For Front-end
After adopting the microservice architecture on the server side, Chanjet needs to add a BFF layer between the front and back ends to simplify the complexity of collaborative development for front and back personnel. The BFF layer is implemented based on Node. Chanjet chose Egg.js and made layered packaging based on Egg.js, which will not affect business development when Node's own technology is upgraded. In order to improve efficiency, Chanjet has also connected the caching middleware Redis at the Node layer, and used GraphQL for aggregation queries.
End-cloud joint debugging solution
After adopting the microservice architecture, each set of environment deployment requires 30+ microservice containers. If there are multiple features in parallel in the development phase, the environment is deployed separately for each feature branch, which consumes too much resources. To this end, Chanjet has introduced gateways, full-link traffic marking control technology, end-cloud joint debugging technology, and overlays the project development environment with the application of baseline environment + incremental modification, and quickly pulls up a complete set of The development and debugging environment reduces the development cost. At the same time, developers can directly register their local computers in the microservice environment to complete the verification and testing of upstream and downstream businesses locally, which greatly improves the work efficiency of developers and the quality of submitted code.
Offline data analysis
In the early days, Chanjet’s database was only OLTP, and data was stored in MySQL. As the amount of data increased, statistical analysis queries not only took a long time to query themselves, but also consumed the resources of the online transaction database, affecting the response time of online transactions. Only through the cloud native database PolarDB, separation of reads and writes can only relieve part of the query pressure.
For some analysis in the system that does not require high real-time requirements, Chanjet has introduced a data warehouse for offline data processing, ETL and unified scheduling through DataWorks tools, and big data index calculations and label calculations in MaxCompute.
Full link gray scheme
Chanjet's system realizes the full-link grayscale from front-end to back-end services, message queues, and timing tasks.
Front-end static resources: distinguish between gray-scale static resources and formal environment static resources. After login, the tenant in the login information determines which environment should be routed to.
Message queue: distinguish gray message queue and formal message queue. Consumption according to environmental variables
Timed task: The task executor of the timed task decides whether to execute it through environment variables and the list of tenants.
Back-end Rest interface: parse the url path through lua script in Nginx, and route according to the tenant information in the gray list.
Business value brought by cloud native
containerized operation and maintenance management:
The containerized deployment and management based on the EDAS+ACK mode realizes the improvement of application release, and in the elastic scaling and capacity management, it can also speed up the identification of abnormalities and self-healing of faults. And it continues to climb on the target of 2 (abnormal identification)-5 (quick positioning) -10 (self-healing stop loss).
:
Based on the combined analysis of the log platform and the data center, the display of user portraits and user trajectories is realized, and the continuous mining of data can realize the quantification of user experience percentages and product quality percentages, thereby providing digital guarantee for the docking of service teams.
cost:
From the IDC computer room container model to the cloud platform containerization upgrade, there is no need to invest in large amounts of hardware equipment and replacement equipment, which greatly saves a lot of equipment costs and labor costs, and new needs and ideas are available. Investment according to the amount, flexible expansion and contraction.
DevOps:
The devops, which is connected to the cloud native environment, saves 50% of personnel in support of R&D requirements, and increases the efficiency of construction and deployment by 4 times. Among them, there are 12,734 updates in 2020, with a success rate of 91.8%.
Multiple environmental resources:
Through the multi-characteristic gray scheme model, 7 sets of development environments were merged into 1 set. There are 90 microservices in each environment, which can realize flexible dynamic adjustment and expansion. Save 450 nodes.
Cloud native containerization :
The containerized EDAS+K8s deployment mode can realize the flexible expansion and contraction of nodes, especially supporting Chanjet's live broadcast events and spike scenarios. It not only saves manpower deployment and other links, but also saves the cost of second-level scaling.
Cloudy platform:
Through the establishment of DevOps and containerized models, it meets the needs of users in multi-cloud scenarios, saves 50% of manpower, and realizes an automated operation and maintenance model for multi-cloud environments.
database upgrade:
After good business upgraded from MySQL to PolarDB, the processing performance was increased by 20% to 40%, and it successfully revived the unsupported low-end handheld pda adaptation work. Sample return visits to customers, satisfaction has also increased significantly.
stability:
Based on the docking of cloud-native infrastructure, cloud products can achieve 5 9 SLA services, which avoids the stability and security risks of building open source components by itself. And in terms of component functions, you can also enjoy the benefits of various business requirements. After docking with cloud native, a stability guarantee target of 2 (alarm)-5 (positioning)-10 (stop loss) can be proposed, thereby continuously improving user satisfaction.
Copyright Statement: content of this article is contributed spontaneously by Alibaba Cloud real-name registered users, and the copyright belongs to the original author. The Alibaba Cloud Developer Community does not own its copyright and does not assume corresponding legal responsibilities. For specific rules, please refer to the "Alibaba Cloud Developer Community User Service Agreement" and the "Alibaba Cloud Developer Community Intellectual Property Protection Guidelines". If you find suspected plagiarism in this community, fill in the infringement complaint form to report it. Once verified, the community will immediately delete the suspected infringing content.
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。