CN111147308B - Network management method and system based on micro-service architecture - Google Patents
Network management method and system based on micro-service architecture Download PDFInfo
- Publication number
- CN111147308B CN111147308B CN201911399704.XA CN201911399704A CN111147308B CN 111147308 B CN111147308 B CN 111147308B CN 201911399704 A CN201911399704 A CN 201911399704A CN 111147308 B CN111147308 B CN 111147308B
- Authority
- CN
- China
- Prior art keywords
- service
- service process
- processes
- client
- network
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/02—Standardisation; Integration
- H04L41/024—Standardisation; Integration using relational databases for representation of network management data, e.g. managing via structured query language [SQL]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/04—Network management architectures or arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/51—Discovery or management thereof, e.g. service location protocol [SLP] or web services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/52—Network services specially adapted for the location of the user terminal
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses a network management method and a system based on a micro-service architecture, wherein the network management method comprises the following steps: creating and deploying service processes of different businesses, creating at least one database, and storing business information corresponding to the service processes of all the different businesses in the database; creating a service discovery module, and registering network positions of all service processes in the service discovery module; the client receives the service request and sends the service request to the service discovery module; according to the service request, the service discovery module determines the network position of a service process corresponding to the service request and sends the network position to the client; the client side assembles a Uniform Resource Locator (URL) of the service process according to the network position of the service process, requests to access the service process and sends a service request to the service process; and the service process receives the service request, calls service information from the database and sends the service information to the client. The invention deploys the service processes of different services independently and completely decouples the service processes and the client.
Description
Technical Field
The invention relates to the field of software architecture of a network management system, in particular to a network management method and system based on a micro-service architecture.
Background
Currently, in enterprise-level applications of companies, a common network management system usually includes a complete enterprise-level server-side application program, and the complete enterprise-level server-side application program is usually established in three main parts: a front-end web interface, a database, and a plurality of applications in a server-end. The plurality of application programs can be logically divided into processes of equipment management, user management, alarm management, log management, monitoring system and the like.
As the functional logic required by the network management system becomes more complex, especially more applications are deployed in the cloud, and the change cycles of the applications are connected, and changing a small part of an application may require rebuilding and deploying all the applications, such a network relationship system is usually difficult to maintain a good modular structure.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a network management method and system based on a micro-service architecture.
In order to achieve the above object, in a first aspect, an embodiment of the present invention provides a network management method based on a microservice architecture, where the network management method includes the following steps:
creating and deploying service processes of different services on a server side, creating at least one database, and storing service information corresponding to the service processes of all the different services in the database;
creating a service discovery module, and registering network positions of all service processes in the service discovery module;
a client receives a service request and sends the service request to the service discovery module;
according to the service request, the service discovery module determines the network position of a service process corresponding to the service request and sends the determined network position to the client;
the client side assembles a Uniform Resource Locator (URL) of the service process according to the network position of the service process, requests to access the service process and sends the service request to the service process;
and after receiving the service request, the service process calls the service information from the database and sends the called service information to the client.
On the basis of the technical scheme, the server side comprises a single or a plurality of host devices, and the specific steps of creating and deploying the service processes of different services on the server side are as follows:
establishing and deploying all service processes of different businesses on a single host device by using an operation and maintenance automation tool and an infrastructure; or
All service processes of different businesses are created and deployed on a plurality of host devices by using the operation and maintenance automation tool and.
On the basis of the technical scheme, the service processes of the different services comprise: user management service process, alarm management service process, log management service process, monitoring system service process and AGENT proxy service process.
On the basis of the technical scheme, the number of the databases is two, the two databases are a relational database and a time sequence database, the relational database stores the service information corresponding to the user management service process, the alarm management service process and the log management service process, and the time sequence database stores the service information of the monitoring system service process.
In a second aspect, an embodiment of the present invention further provides a network management system based on a micro-service architecture, where the network management system includes a client, a service discovery module, a plurality of service processes of different services, and at least one database storing service information corresponding to the service processes of all the different services;
the service discovery module is used for registering network positions of all service processes;
the client is used for receiving a service request and sending the service request to the service discovery module;
the service discovery module is further used for determining a network position of a service process corresponding to the service request according to the service request and sending the determined network position to the client;
the client is also used for requesting to access the service process and sending the service request to the service process after assembling the uniform resource locator URL of the service process according to the network position of the service process;
and the service process is used for calling the service information from the database after receiving the service request and sending the called service information to the client.
On the basis of the technical scheme, all the service processes communicate with the service discovery module through the REST API interface.
On the basis of the technical scheme, the service processes communicate with each other through REST API interfaces.
On the basis of the above technical solution, the service discovery module includes:
a registration unit for registering network locations of all service processes in the service discovery module;
and the determining unit is used for determining the network position of the corresponding service process according to the service process corresponding to the service request.
On the basis of the technical scheme, the service processes of the different services comprise: the system comprises a user management service process, an alarm management service process, a log management service process, a monitoring system service process and an AGENT proxy service process.
On the basis of the technical scheme, the number of the databases is two, the two databases are a relational database and a time sequence database, the relational database is used for storing business information corresponding to the user management service process, the alarm management service process and the log management service process, and the time sequence database is used for storing the business information of the monitoring system service process.
Compared with the prior art, the invention has the advantages that:
(1) The invention provides a network management method and a system based on a micro-service architecture, wherein a plurality of service processes of different services in the network management system adopt the micro-service architecture, and the service processes are independent and independently deployed, so that the problems of repeated wheel building and disordered management of the service process of the traditional network management system are solved, the development period is shortened, and the operation and maintenance cost is reduced.
(2) In the invention, the network management system is established and deployed with a plurality of service processes according to functions, each service process is independently deployed, and the modification of the service processes is limited to the service processes, so that the plurality of service processes in the system provided by the invention can be independently managed without influencing the normal motion of other service processes, the operation and maintenance period is greatly shortened, and the operation and maintenance cost is reduced. And moreover, a proper database is selected and used according to the service characteristics of the service process, so that the efficiency of calling the service information by the service process is improved, and the system performance is improved.
(3) In the invention, the client and the server are completely decoupled, and the client acquires and assembles the network position of each service process in the server through the service discovery module, so that the client and each service process in the server communicate through the REST API.
Drawings
Fig. 1 is a flowchart of a network management method based on a microservice architecture in an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail below with reference to specific embodiments and with reference to the attached drawings.
Examples
Referring to fig. 1, an embodiment of the present invention provides a network management method based on a microservice architecture, where the network management method includes the following steps:
step S1: creating and deploying service processes of different services on a server side, creating at least one database, and storing service information corresponding to the service processes of all the different services in the database;
step S2: creating a service discovery module, and registering network positions of all service processes in the service discovery module;
and step S3: a client receives a service request and sends the service request to the service discovery module;
and step S4: according to the service request, the service discovery module determines the network position of a service process corresponding to the service request and sends the determined network position to the client;
step S5: after the client assembles a Uniform Resource Locator (URL) of the service process according to the network position of the service process, the client requests to access the service process and sends the service request to the service process;
step S6: after receiving the service request, the service process calls the service information from the database and sends the called service information to the client;
step S7: and the client receives and displays the service information.
In the invention, a network management system is established and deployed with a plurality of service processes according to functions, each service process is independently deployed, and the modification of the service processes is limited to the service processes, so that the plurality of service processes in the system provided by the invention can be independently managed without influencing the normal motion of other service processes; meanwhile, the client and the server are completely decoupled, and the client acquires and assembles the network position of each service process in the server through the service discovery module, so that the client and each service process in the server are communicated.
In the embodiment of the present invention, the service discovery module is a service discovery tool consul, and dynamic management of each service process is implemented. When the client calls the service information, the request service discovery module acquires the network position of the corresponding service process, accesses the corresponding service process according to the network position and acquires the service information, and the client does not need to record the network position of each service process, so that the server and the client are completely decoupled. And meanwhile, the client checks whether each service process can be normally accessed through the timing wheel of the service discovery module so as to carry out network management.
Specifically, all service processes register network locations of all service processes in the service discovery module, and the service discovery module records the network locations of the service processes in a K-V storage form, where K is a name of a service process, and V is an IP: and (4) PORT. And positioning the network position of each service process according to the PORT number PORT.
In the embodiment of the invention, the micro-service architecture is adopted to independently form the services of different services into independent processes according to functions, and a user is allowed to intensively deploy or individually deploy each service process according to actual requirements according to a field environment, so that the deployment efficiency and safety are improved, the automatic deployment of each service process is realized, and an operation and maintenance automation tool ansable is introduced. Preferably, the server includes a single or multiple host devices, and the specific steps of creating and deploying the service processes of different services on the server are as follows:
establishing and deploying all service processes of different businesses on a single host device by using an operation and maintenance automation tool and an infrastructure; or
And (3) creating and deploying all service processes of different businesses on a plurality of host devices by using the operation and maintenance automation tool ansable.
Specifically, the installation and deployment of each service process on a single or multiple hosts are realized by using a playbook tool in an operation and maintenance automation tool ansable, and the playbook tool is described and defined through a YAML format, supports a synchronous and asynchronous mode, can deploy the service processes in multiple hosts, and executes specific instruction steps on hosts of different groups to realize customized configuration.
Further, the service process of the different services includes: the system comprises a user management service process, an alarm management service process, a log management service process, a monitoring system service process and an AGENT proxy service process.
Furthermore, the number of the databases is two, the two databases are a relational database and a time sequence database, the relational database stores the service information corresponding to the user management service process, the alarm management service process and the log management service process, and the time sequence database stores the service information of the monitoring system service process. The user management service process, the alarm management service process and the log management service process share the same relational database mysql server; the monitoring system service process selects a time sequence database prometheus due to the characteristics of strong correlation between data and time and unchangeable one-time writing. And selecting and using a proper database according to the service characteristics of the service process, so that the efficiency of calling the service information by the service process is improved, and the system performance is improved.
In a second aspect, an embodiment of the present invention further provides a network management system based on a micro-service architecture, where the network management system includes a client, a service discovery module, a plurality of service processes of different services, and at least one database storing service information corresponding to the service processes of all the different services;
the service discovery module is used for registering network positions of all service processes;
the client is used for receiving a service request and sending the service request to the service discovery module;
the service discovery module is further used for determining a network position of a service process corresponding to the service request according to the service request and sending the determined network position to the client;
the client is further configured to, after assembling a Uniform Resource Locator (URL) of the service process according to the network location of the service process, request to access the service process and send the service request to the service process;
the service process is used for calling the service information from the database after receiving the service request and sending the called service information to the client;
and the client is also used for receiving and displaying the service information.
Preferably, all service processes communicate with the service discovery module through a REST API interface.
Further, a plurality of service processes communicate with each other through a REST API interface. The service processes are independent of each other and communicate with each other.
Preferably, the service discovery module comprises a registration unit and a determination unit, wherein the registration unit is used for registering the network positions of all service processes in the service discovery module; the determining unit is configured to determine, according to the service process corresponding to the service request, a network location of the corresponding service process by the service discovery module.
In the embodiment of the present invention, the service discovery module is a service discovery tool consul, and implements dynamic management on each service process. When the client calls the service information, the request service discovery module acquires the network position of the corresponding service process, accesses the corresponding service process according to the network position and acquires the service information, and the client does not need to record the network position of each service process, so that the server and the client are completely decoupled. And meanwhile, the client checks whether each service process can be normally accessed through the timing wheel of the service discovery module so as to carry out network management.
Specifically, all service processes register network locations of all service processes in the service discovery module, and the service discovery module records the network locations of the service processes in a K-V storage form, where K is a name of a service process, and V is an IP: and (4) PORT. And positioning the network position of each service process according to the PORT number PORT.
Specifically, the service processes of the different services include: the system comprises a user management service process, an alarm management service process, a log management service process, a monitoring system service process and an AGENT proxy service process. The number of the databases is two, the two databases are a relational database and a time sequence database, the relational database is used for storing the business information corresponding to the user management service process, the alarm management service process and the log management service process, and the time sequence database is used for storing the business information of the monitoring system service process. The user management service process, the alarm management service process and the log management service process share the same relational database mysql server; the monitoring system service process selects a time sequence database prometheus due to the characteristics of strong correlation between data and time and unchangeable once writing. And selecting and using a proper database according to the service characteristics of the service process, so that the efficiency of calling the service information by the service process is improved, and the system performance is improved.
Furthermore, the user management service process, the alarm management service process and the log management service process are realized by using a JAVA SpringMVC language, and the interaction among the user management service process, the alarm management service process, the log management service process and the database mysql server uses an object relational mapping framework hibernate. The AGENT proxy service process is implemented using C language. The monitoring system service process is realized by GO, python or shell script languages according to needs, and interaction between the monitoring system service process and a time sequence database promemeus uses a data Query Language (promQL).
Further, the network management system can also independently develop a new service process according to the business requirement, and register the newly developed service process to the service discovery module. It can be seen that the network management system also has good expansibility.
The present invention will be explained in detail with reference to a specific embodiment, taking the example of a user requesting host-a performance data through a PC.
Starting a network management system, and registering IP and PORT to a service discovery tool consul by each service process;
a user accesses a network management system through a PC (personal computer), and requests host-A performance data from a front-end web interface; the method comprises the steps that a web interface at the front end accesses a service discovery process consul and requests address information of a monitoring system service process; the service discovery tool consul returns address information 1.1.1.1 of the monitoring system service process to the web interface, wherein the address information is 1111; the web interface constructs a URL through address information of a monitoring system service process, accesses the monitoring system service process through an REST interface and requests host-A performance data; after receiving the request, the monitoring system service process inquires host-A performance data from a database proxy; the database proxy returns host-A performance data to the monitoring system service process; the monitoring system service process returns host-A performance data inquired from the database to the web interface; the web interface presents the received host-a performance data to the user.
The present invention is not limited to the above-described embodiments, and it will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the principle of the present invention, and such modifications and improvements are also considered to be within the scope of the present invention. Those not described in detail in this specification are within the skill of the art.
Claims (6)
1. A network management method based on micro service architecture is characterized in that the network management method comprises the following steps:
creating and deploying service processes of different services on a server side, creating at least one database, and storing service information corresponding to the service processes of all the different services in the database;
creating a service discovery module, and registering network positions of all service processes in the service discovery module;
a client receives a service request and sends the service request to the service discovery module;
according to the service request, the service discovery module determines the network position of a service process corresponding to the service request and sends the determined network position to the client;
the client side assembles a Uniform Resource Locator (URL) of the service process according to the network position of the service process, requests to access the service process and sends the service request to the service process;
after receiving the service request, the service process calls the service information from the database and sends the called service information to the client;
the service processes of the different businesses comprise: a user management service process, an alarm management service process, a log management service process, a monitoring system service process and an AGENT proxy service process;
the number of the databases is two, the two databases are a relational database and a time sequence database, the relational database stores business information corresponding to the user management service process, the alarm management service process and the log management service process, and the time sequence database stores business information of the monitoring system service process.
2. The network management method based on micro-service architecture as claimed in claim 1, wherein the server includes a single or multiple host devices, and the specific steps of creating and deploying the service processes of different services on the server are as follows:
establishing and deploying all service processes of different businesses on a single host device by using an operation and maintenance automation tool ansable; or
And (3) creating and deploying all service processes of different businesses on a plurality of host devices by using the operation and maintenance automation tool ansable.
3. A network management system based on a micro-service architecture is characterized by comprising a client, a service discovery module, a plurality of service processes of different services and at least one database storing service information corresponding to the service processes of all the different services;
the service discovery module is used for registering network positions of all service processes;
the client is used for receiving a service request and sending the service request to the service discovery module;
the service discovery module is also used for determining the network position of a service process corresponding to the service request according to the service request and sending the determined network position to the client;
the client is also used for requesting to access the service process and sending the service request to the service process after assembling the Uniform Resource Locator (URL) of the service process according to the network position of the service process;
the service process is used for calling the service information from the database after receiving the service request and sending the called service information to the client;
the service processes of the different services comprise: a user management service process, an alarm management service process, a log management service process, a monitoring system service process and an AGENT proxy service process;
the number of the databases is two, the two databases are a relational database and a time sequence database, the relational database is used for storing the business information corresponding to the user management service process, the alarm management service process and the log management service process, and the time sequence database is used for storing the business information of the monitoring system service process.
4. The microservice architecture-based network management system of claim 3, wherein all service processes communicate with the service discovery module through a REST API interface.
5. The microservice-based network management system of claim 3, wherein a plurality of the service processes communicate with each other via a REST API interface.
6. The microservice architecture-based network management system of claim 3, wherein the service discovery module comprises:
a registration unit for registering network locations of all service processes in the service discovery module;
and the determining unit is used for determining the network position of the corresponding service process according to the service process corresponding to the service request.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911399704.XA CN111147308B (en) | 2019-12-30 | 2019-12-30 | Network management method and system based on micro-service architecture |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911399704.XA CN111147308B (en) | 2019-12-30 | 2019-12-30 | Network management method and system based on micro-service architecture |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111147308A CN111147308A (en) | 2020-05-12 |
CN111147308B true CN111147308B (en) | 2022-11-18 |
Family
ID=70522133
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911399704.XA Active CN111147308B (en) | 2019-12-30 | 2019-12-30 | Network management method and system based on micro-service architecture |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111147308B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111917816B (en) * | 2020-05-22 | 2022-08-26 | 淮阴工学院 | Service application independent architecture system |
CN112468314B (en) * | 2020-10-29 | 2022-11-04 | 贵州新致普惠信息技术有限公司 | Method for realizing automatic deployment of log service based on service grid |
CN114363221B (en) * | 2021-12-29 | 2024-05-03 | 武汉烽火信息集成技术有限公司 | Heartbeat detection method, storage medium, electronic equipment and system based on micro-service system |
US12095862B1 (en) | 2023-04-06 | 2024-09-17 | Zhejiang Lab | Data processing system and method |
CN116107999B (en) * | 2023-04-06 | 2023-06-27 | 之江实验室 | Database service and storage system and method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106610836A (en) * | 2016-12-23 | 2017-05-03 | 国网信息通信产业集团有限公司 | Micro-service operation management tool |
CN106612188A (en) * | 2015-10-21 | 2017-05-03 | 中兴通讯股份有限公司 | Method and device for extending software function based on micro service architecture |
CN108701182A (en) * | 2016-08-31 | 2018-10-23 | 甲骨文国际公司 | The data management of multi-tenant identity cloud service |
CN109191008A (en) * | 2018-09-30 | 2019-01-11 | 江苏农牧科技职业学院 | A kind of micro services frame system for fish quality supervisory systems |
-
2019
- 2019-12-30 CN CN201911399704.XA patent/CN111147308B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106612188A (en) * | 2015-10-21 | 2017-05-03 | 中兴通讯股份有限公司 | Method and device for extending software function based on micro service architecture |
CN108701182A (en) * | 2016-08-31 | 2018-10-23 | 甲骨文国际公司 | The data management of multi-tenant identity cloud service |
CN106610836A (en) * | 2016-12-23 | 2017-05-03 | 国网信息通信产业集团有限公司 | Micro-service operation management tool |
CN109191008A (en) * | 2018-09-30 | 2019-01-11 | 江苏农牧科技职业学院 | A kind of micro services frame system for fish quality supervisory systems |
Non-Patent Citations (1)
Title |
---|
微服务体系结构实现框架综述;辛园园等;《计算机工程与应用》;20181231;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN111147308A (en) | 2020-05-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111147308B (en) | Network management method and system based on micro-service architecture | |
CN110647469B (en) | Micro-service testing method and device, computer equipment and storage medium | |
CN1577242B (en) | System and method for automatic configuration | |
US5832191A (en) | Method and apparatus for automatically enabling communication with a network printer | |
CN102377817A (en) | Connection management system, and a method for linking connection management server in thin client system | |
US20080222617A1 (en) | Server side application integration framework | |
CN110658794B (en) | Manufacturing execution system | |
CN103677858A (en) | Method, system and device for managing virtual machine software in cloud environment | |
CN110196729A (en) | Application program update method, equipment and device and storage medium | |
US20070282964A1 (en) | Method and apparatus for processing remote shell commands | |
CN111404628B (en) | Time synchronization method and device | |
CN110633175A (en) | Multi-computer-room data processing method based on micro-service, electronic equipment and storage medium | |
CN115562757B (en) | Data processing method, configuration center system, electronic device and storage medium | |
US20060165119A1 (en) | Communicating between communications components having differing protocols absent component modifications | |
US7043726B2 (en) | Binding of processes in network systems | |
CN114244654B (en) | URL forwarding method, device, equipment and computer storage medium | |
CN112637037B (en) | Cross-region container communication system, method, storage medium and computer equipment | |
CN110730197B (en) | Service discovery method and system | |
KR20200048633A (en) | System and method for automatically testing software | |
CN112698930A (en) | Method, device, equipment and medium for obtaining server identification | |
CN102891763A (en) | Method and device for acquiring CIM (Common Information Model) resource | |
CN112448854A (en) | Kubernetes complex network policy system and implementation method thereof | |
CN111984679A (en) | Access method, device, host, system and medium of hardware acceleration database | |
CN100570553C (en) | Be used to be provided at the terminal and the method for the dynamic interaction between the application programs | |
CN116614358A (en) | Cloud platform application release method, device and system and computer equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |