Microservice multi-scenario deployment adaptation design model
Through the microservice multi-scenario deployment adaptation design model, the problem of insufficient hardware resources for microservices in small scenarios is solved, the unified deployment and operation of microservices in different scenarios is realized, and the development efficiency and production environment performance are improved.
Patent Information
- Application Number
- CN202010779815.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-05
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2040-08-05
AI Technical Summary
The existing microservice framework is difficult to adapt to operation and maintenance when hardware resources are insufficient in small scenarios, and does not consider the traditional single-point model, resulting in deployment complexity and resource waste.
Propose a multi-scenario deployment adaptation design model for microservices. Through microservice co-deployment, installation package construction and one-click installation package deployment, the unified deployment and operation of microservices in different scenarios is achieved, including support for independent nodes and distributed nodes. , merge services and dependencies, and design remote installation tools to meet non-duplicate configuration and automatic initialization.
It achieves unified deployment of microservices in different scenarios, improves development and testing efficiency, saves labor costs, improves production environment performance, and supports automatic registration and upgrade of services.
Smart Images

Figure CN111782233B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of microservice deployment, and specifically to a microservice multi-scenario deployment adaptation design model. Background Art
[0002] The emergence of microservices solves complex problems: it breaks down potentially large monolithic applications into a set of services; each service can be developed independently by a team; each microservice can be deployed independently; and each service can be expanded independently. Microservices also bring new problems: complex interactions between distributed systems; partitioned database architecture and transaction processing; the complexity of testing applications; changes across multiple services; the complexity of deployment models, etc. There are many open source microservice frameworks: SpringCloud, Motan, gRPC, Thrift, Dubbo, but they only solve some problems.
[0003] The design of software products and technology selection are not only related to the functions of the software itself. To a greater extent, it depends on the customer's scenario and is subject to the hardware environment. The same product, in a large scenario, is designed in a microservice way and decomposed into 20 services. So in a small scenario, under the premise of insufficient hardware resources, how do we adapt to operation and maintenance? Currently, almost all open source microservice frameworks are expanded to large scenarios without considering small scenarios, which is equivalent to denying the traditional single-point model. There are no extremes in software design, only trade-offs. The size of the scene is relative. Over time, a large scene may become a small scene, and a small scene may become a large scene. For an uncertain environment, we can only propose a compatible design pattern to respond to changes with constancy. Summary of the invention
[0004] 1. Technical issues to be resolved
[0005] In view of the deficiencies of the prior art, the present invention provides a microservice multi-scenario deployment adaptation design model, which solves the problem that the existing microservice deployment is restricted by the deployment scenario.
[0006] (II) Technical solution
[0007] To achieve the above objectives, the present invention is implemented through the following technical solutions: a microservice multi-scenario deployment adaptation design model, including the following contents:
[0008] 1. Co-deployment of microservices
[0009] In the microservice architecture, a microservice unit is a process. A microservice process corresponds to a node in the registration center. The development environment and the production environment are almost the same. The microservice unit can only be started independently in the local development environment. In the production environment, the microservice unit cannot run independently and must be added to the startup mode. The startup mode is divided into independent nodes and distributed nodes.
[0010] 1.1 Independent node: Multiple services can be performed in a single node, and a single process does not require a registration center;
[0011] 1.2 Distributed nodes: Multiple nodes provide services under the registration center, and a single process can provide multiple services;
[0012] 2. Microservice installation package construction
[0013] Under the node, compile multiple services, merge dependencies, merge configuration files, merge resource files, and merge third-party service dependencies;
[0014] 3. Microservice installation package deployment
[0015] 3.1 One-click installation package structure: including basic environment cleaning, installation interface, embedded chrome, business process, third-party service process and embedded database;
[0016] 3.2 Installation tool design: The overall design can be understood as remotely connecting to the server, uploading the installation package, and executing related commands to operate the service;
[0017] 3.3 Installation process of the installation tool: Start the installation tool and determine whether to install it. If yes, check the installation environment, upload and install the envClean installation package, then upload and install the jdk, then upload and decompress the service installation package, and finally execute the corresponding script file, execute the script to return the print information and modify the server status.
[0018] Preferably, the microservices can run independently and can be co-deployed and run. The co-deployment and running of the microservices must meet the requirements of no duplicate beans, support for log co-deployment, no duplicate third-party application configuration, support for configuration file co-deployment, no perception of service inter-deployment deployment scenarios, automatic server initialization, support for international co-deployment, automatic registration at service startup, support for service upgrade co-deployment, and no conflict in co-deployed service dependencies.
[0019] Preferably, the envClean installation package functions to create a system user and set the paths of soft, data and log.
[0020] Preferably, the corresponding script files include install, start, stop and uninstall, namely, an installation script file, a start script file, a stop script file and an uninstall script file.
[0021] (III) Beneficial effects
[0022] The present invention provides a microservice multi-scenario deployment adaptation design model. It has the following beneficial effects:
[0023] Based on microservices, this invention proposes a new design model that integrates microservices and single points, runs through the front-end and back-end, and runs through development, testing, continuous integration, and operation and maintenance. It forms a standard software production process, formulates software production rules, and uses a unified production model to adapt to different scenarios, thereby accelerating the development and testing progress; speeding up the progress of on-site implementation; saving labor costs for the company; increasing the reuse of modules; and improving the performance of the production environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A schematic diagram comparing a traditional deployment mode and a deployment mode of the present invention;
[0025] Figure 2 It is a schematic diagram of merging installation directories of the present invention;
[0026] Figure 3 This is a schematic diagram of the one-click installation package deployment structure of the present invention;
[0027] Figure 4 It is a schematic diagram of remote deployment of the present invention;
[0028] Figure 5 It is a schematic diagram of the deployment process of the present invention. DETAILED DESCRIPTION
[0029] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0030] Example:
[0031] The embodiment of the present invention provides a microservice multi-scenario deployment adaptation design model, including the following contents:
[0032] 1. Co-deployment of microservices
[0033] like Figure 1As shown in the figure, in the microservice architecture, a microservice unit is a process, and a microservice process corresponds to a node in the registration center. The development environment and the production environment are almost the same. The microservice unit can only be started independently in the local development environment. In the production environment, the microservice unit cannot run independently and must be added to the startup mode. The startup mode is divided into independent nodes and distributed nodes, while the traditional method is a single node for a single service;
[0034] 1.1 Independent node: Multiple services can be performed in a single node, and a single process does not require a registration center;
[0035] 1.2 Distributed nodes: Multiple nodes provide services under the registration center, and a single process can provide multiple services;
[0036] 2. Microservice installation package construction
[0037] like Figure 2 As shown in the figure, under the node, multiple services are compiled, dependencies are merged, configuration files are merged, resource files are merged, and third-party service dependencies are merged;
[0038] 3. Microservice installation package deployment
[0039] 3.1 One-click installation package structure: Figure 3 As shown, it includes basic environment cleaning, installation interface, embedded chrome, business process, third-party service process and embedded database;
[0040] 3.2 Installation tool design: Figure 4 As shown, the whole can be understood as remotely connecting to the server, uploading the installation package, and executing related commands to operate the service;
[0041] 3.3 Installation process of installation tool: Figure 5 As shown, start the installation tool and determine whether to install. If yes, check the installation environment, upload and install the envClean installation package, then upload and install the jdk, then upload and decompress the service installation package, and finally execute the corresponding script file. The execution script returns the print information and modifies the server status. The envClean installation package function is to create a system user and set the paths of soft, data, and log. The corresponding script files include install, start, stop, and uninstall, namely, installation script file, start script file, stop script file, and uninstall script file.
[0042] Microservices can run independently and can be deployed together. The co-deployment of microservices must meet the requirements of no duplicate beans, support for log co-deployment, no duplicate third-party application configuration, support for configuration file co-deployment, no perception of service inter-deployment deployment scenarios, automatic server initialization, support for international co-deployment, automatic registration at service startup, support for service upgrade co-deployment, and no conflict in co-deployed service dependencies.
[0043] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. Microservice multi-scenario deployment adaptation design model, characterized by: Includes the following: Step 1: Co-deploy microservices In the microservice architecture, a microservice unit is a process. A microservice process corresponds to a node in the registration center. The development environment and the production environment are consistent. The microservice unit can only be started independently in the local development environment. In the production environment, the microservice unit cannot run independently and must be added to the startup mode. The startup mode is divided into independent nodes and distributed nodes. Step 1.1 Independent Node: Multiple services are performed in a single node, and a single process does not require a registration center; Step 1.2 Distributed nodes: Multiple nodes provide services under the registration center, and a single process provides multiple services; Step 2: Build the microservice installation package Under the node, compile multiple services, merge dependencies, merge configuration files, merge resource files, and merge third-party service dependencies; Step 3: Deploy the microservice installation package Step 3.1 One-click installation package structure: including basic environment cleaning, installation interface, embedded chrome, business process, third-party service process and embedded database; Step 3.2 Installation tool design: The overall understanding is to remotely connect to the server, upload the installation package, and execute related commands to operate the service; Step 3.3 Installation process of the installation tool: Start the installation tool and determine whether to install it. If yes, check the installation environment, upload and install the envClean installation package, then upload and install the jdk, then upload and decompress the service installation package, and finally execute the corresponding script file, execute the script to return the print information and modify the server status; The microservices run independently and are co-deployed. The co-deployment of the microservices must meet the requirements of no duplicate beans, support for log co-deployment, no duplicate third-party application configuration, support for configuration file co-deployment, no perception of service inter-deployment deployment scenarios, automatic server initialization, support for international co-deployment, automatic registration at service startup, support for service upgrade co-deployment, and no conflict in co-deployed service dependencies; The envClean installation package function is to create a system user and set the paths of soft, data, and log; The corresponding script files include install, start, stop and uninstall, namely, installation script file, start script file, stop script file and uninstall script file.
Citation Information
Patent Citations
Micro-service operation management tool
CN106610836A
Micro-service deployment and operation method
CN111488201A
Software appliance framework
US20090249279A1
Microservices application configuration based on runtime environment
US20180088935A1
