CN112565093A - Method and storage medium for realizing micro-service route dynamic change based on memory database - Google Patents

Method and storage medium for realizing micro-service route dynamic change based on memory database Download PDF

Info

Publication number
CN112565093A
CN112565093A CN202011442350.5A CN202011442350A CN112565093A CN 112565093 A CN112565093 A CN 112565093A CN 202011442350 A CN202011442350 A CN 202011442350A CN 112565093 A CN112565093 A CN 112565093A
Authority
CN
China
Prior art keywords
routing
local
routing information
remote
information
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.)
Pending
Application number
CN202011442350.5A
Other languages
Chinese (zh)
Inventor
贾坤
戴鸿君
孙岩
刘至理
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong University
Original Assignee
Shandong University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shandong University filed Critical Shandong University
Priority to CN202011442350.5A priority Critical patent/CN112565093A/en
Publication of CN112565093A publication Critical patent/CN112565093A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/50Network service management, e.g. ensuring proper service fulfilment according to agreements

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computational Linguistics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to a method and a storage medium for realizing micro-service route dynamic change based on a memory database, wherein a realizing framework comprises a local route end, a remote route end, a route information management service unit, a local database or a file system, and the method comprises the following steps: and updating the issued routing information to a remote routing end in real time, regularly pulling the routing information from the remote routing end by the local routing end, comparing the version number with the version number in the routing information in the local routing end, if the version number is not consistent with the version number in the routing information in the local routing end, updating the routing information in the local routing end and enabling the routing configuration to take effect, and realizing the dynamic change of the micro-service routing, otherwise, continuously regularly pulling the routing information from the remote routing end. The invention changes the situation that the updating of the routing information in the traditional micro-service routing system needs to modify the configuration file or the code and restart the routing system, supports the dynamic change and the effect of the routing information in the micro-service routing system, does not need to write the configuration file and the code, and does not need to restart the routing system.

Description

Method and storage medium for realizing micro-service route dynamic change based on memory database
Technical Field
The invention relates to a method and a storage medium for realizing micro-service routing dynamic change based on a memory database, belonging to the technical field of micro-service routing in a micro-service/distributed system.
Background
The distributed system is characterized in that a large system is divided into a plurality of service modules, the service modules are respectively deployed on different machines, and data interaction is carried out among the service modules through interfaces. The slight difference between microservice and distributed is that the microservice application is not necessarily dispersed over multiple servers, but can be the same server, and the distributed and microservice architectures are similar, but are deployed in different ways. The distributed system focuses on distributing the pressure of the whole system, and the microservice system focuses on the capability of distributing the whole system.
The microservice architecture is essentially a distributed architecture, with applications built as collections of multiple different servlets rather than as a single application. Unlike a single program, microservices allow you to run multiple independent applications simultaneously, which may be created using different coding or programming languages. A large and complex application may be composed of multiple simple and independent services that can be executed on their own. These smaller services are combined, each running in a separate process, and with lightweight interactions, can provide all the functionality that a large single program possesses. In the micro-service architecture, the system structure becomes very complex due to the subdivision of the system and the service, and the REST API becomes a second choice due to the simplicity, high efficiency, cross-platform, easy development, easy test and easy integration. The micro service routing refers to distributing the request to the corresponding micro service processing program according to the client request URL and the corresponding matching rule. The microservice system needs a complete microservice routing mechanism to ensure that a request arrives to correctly find the corresponding service instance.
A system like a comprehensive front-end is generated at this time, which is an API Gateway (API Programming Interface). The API gateway is used as an API aggregation point and a uniform access point of micro-services dispersed in each business system, and external requests can access all internal REST API services by accessing the access point. An API gateway is a system in front of an application or service (providing REST API interface services) that protects, enhances and controls access to API services, transparently to all callers. The API gateway has mainly four major capabilities: the method comprises the steps that firstly, the access point which is used as a service request of all API interfaces manages all access requests; secondly, as an aggregation point of all back-end business services, all the business services can be called here; thirdly, realizing the strategies of safety, verification, routing, filtering, flow control, caching and the like, and carrying out some necessary intermediate processing; and fourthly, uniformly managing all API services and policies.
The memory database is a database which directly operates by putting data in a memory. The data read-write speed of the memory is higher by several orders of magnitude compared with that of the magnetic disk. The traditional mode of disk data management is abandoned by the memory database, the architecture is redesigned in the memory based on all data, and corresponding improvements are made in the aspects of data caching, fast algorithm and parallel operation, so that the data processing speed is much higher than that of the traditional database, and the application performance can be greatly improved compared with the application of accessing from a disk. Common memory databases include Memcached, Redis, and the like.
The traditional microservice routing system or product does not provide a dynamic management scheme for routing data and a persistence scheme for routing data, all data of the microservice routing system is initialized (configuration file or code configuration), and even if one piece of routing data is modified, the configuration file or code needs to be modified, and the microservice routing system is restarted, such as restarting an API gateway. Therefore, a more complete scheme is needed to uniformly manage the micro service routes, the micro service routes cannot be written in configuration files or codes, dynamic change and effectiveness of the micro service routes are supported, the micro service route systems such as an API gateway and the like do not need to be restarted, continuous operation of the system is ensured, and development work is simplified.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a method for realizing the dynamic change of a micro-service route based on a memory database.
The invention also provides a computer readable storage medium for implementing the method.
The invention takes the micro service routing system in the distributed/micro service system as a local routing end, creates a corresponding routing data model according to an API gateway open source component used by the local routing end, uses a memory database to provide the function of caching routing information, maintains routing data and a corresponding routing version number in the memory database as a remote routing end, simultaneously creates a routing information management service, provides an interface for updating the routing data and a routing information publishing function for the outside, and persists the routing information into the local database or a file system, updates the routing information and the version number to the remote routing end after the routing information is published, regularly pulls the remote routing information by the local routing end, compares the remote routing information with the local routing version number, updates the data in the local routing end through an event publishing and monitoring mechanism and validates the routing configuration if the remote routing information is inconsistent with the local routing version number, thereby realizing the dynamic change of the microservice route.
Interpretation of terms:
routing data model: i.e., the structure used in the API gateway open source component to describe or organize the routing information, typically consists of a route id, a set of route predicates, a set of route filters, a route priority, and a destination uri for route forwarding.
The technical scheme of the invention is as follows:
a method for realizing micro-service routing dynamic change based on a memory database comprises a local routing end, a remote routing end, a routing information management service unit, a local database or a file system, wherein the local routing end, the remote routing end and the routing information management service unit are sequentially connected in a circulating manner, and the routing information management service unit is connected with the local database or the file system;
the remote routing end is used for caching routing information; the routing information management service unit is used for providing an interface for updating routing information for the outside, releasing the routing information and persisting the released routing information to a local database or a file system;
the method comprises the following steps: and updating the issued routing information to the remote routing terminal in real time, wherein the routing information comprises routing data and a version number corresponding to the routing data, the size of the version number represents the old and new degree of the routing data, and the larger the version number is, the newer the data is. The local router end regularly pulls the routing information from the remote router end, the routing information is compared with the version number in the routing information in the local router end, if the routing information is inconsistent with the version number in the routing information in the local router end, the routing information of the local router end is updated through an event issuing and monitoring mechanism, the routing configuration is enabled to take effect, the dynamic change of the micro-service routing is realized, otherwise, the routing information is continuously regularly pulled from the remote router end.
According to the present invention, preferably, the local routing terminal is an API gateway, that is, a micro service routing system in a distributed/micro service system;
further preferably, the local routing terminal is an API Gateway based on Spring Cloud Gateway 2.2.3. RELEASE.
According to the invention, the remote router is a memory database. Caching routing information by using a memory database, and maintaining published routing data and a version number corresponding to the routing data in the memory database; the routing information of the remote routing end is up-to-date, and the local routing end needs to take the routing information of the remote routing end as the standard;
according to the preferred embodiment of the present invention, the routing information management service unit provides an interface for searching, adding, modifying and deleting the routing information of the local routing terminal to the outside.
According to the invention, preferably, a corresponding routing data model is created according to the API gateway, and the adding and modifying operation of the routing data of the local routing end is encapsulated through the created routing data model. The purpose is that the routing data model is consistent with the routing data model in the API gateway open source component used in the micro-service routing system, and the dynamic change of the routing data in the micro-service routing system is convenient to carry out.
Further preferably, the corresponding route data model is created in the route information management service according to the route data model in the Spring Cloud Gateway 2.2.3.RELEASE version. The method comprises the following concrete steps: (1) looking at the definition of a routing data model in a Spring Cloud Gateway 2.2.3.Release version, wherein the routing data model comprises a routing model, a filter model and a predicate model; (2) the same routing data model is created in the routing information management service against the definition of this data model.
According to the present invention, preferably, when the routing information is updated by the routing information management service unit, the routing data in the local database or the file system is changed, and the version number corresponding to the routing data is correspondingly added but is not valid in the local routing terminal, and the updated routing information is issued to the remote routing terminal by the routing information management service unit.
According to the preferred embodiment of the present invention, the local router regularly pulls the routing information from the remote router, and compares the routing information with the version number in the routing information in the local router, if the routing information is not consistent, the local router updates the routing information in the local router through the event issuing and monitoring mechanism and validates the routing configuration, so as to implement dynamic change of the micro-service routing, otherwise, the local router continuously pulls the routing information from the remote router regularly, and the method includes the following steps:
(1) a timing task is newly established at the local routing end, and the latest routing information in the remote routing end is pulled at regular time;
(2) comparing the version number corresponding to the routing data in the latest pulled routing information with the version number corresponding to the routing data in the local routing terminal, and if the version numbers are not consistent, updating the routing information; to ensure that the routing information in the local routing side is up-to-date. Namely: storing the latest routing information into the local routing terminal (namely, a micro-service routing system) according to the structure of the created routing data model, dynamically updating the routing data in the local routing terminal, and enabling the latest routing configuration to take effect at the local routing terminal;
(3) and after the routing configuration of the local routing end takes effect, assigning the version number of the routing data of the remote routing end to the version number of the routing data in the local routing end. The routing data in the local routing end is the latest routing data which is consistent with the data at the remote routing end.
Further preferably, in step (1), the latest routing information in the remote routing terminal is pulled every 3 minutes.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of carrying out a dynamic change of microservice routing based on an in-memory database.
The invention has the beneficial effects that:
1. the method for realizing the dynamic change of the micro service routing based on the memory database changes the situation that the updating of the routing information in the traditional micro service routing system needs to modify the configuration file or the code and restart the routing system, supports the dynamic change and the effect of the routing information in the micro service routing system, does not need to write the configuration file or the code, does not need to restart the routing system, ensures the continuous operation of the system and simplifies the development work.
2. The method for realizing the dynamic change of the microservice route based on the memory database provides a persistent scheme for microservice route information, and can store the route information into a local database or a file system, so that the route information updated in the microservice route system does not disappear even if the system is restarted. Even if the data disappear due to the fault of the remote routing end, the latest routing information can be read from the local database or the file system, so that the stability and the reliability of the micro-service routing system are ensured.
3. The method for realizing the dynamic change of the micro-service routing based on the memory database adopts a mode of uniformly managing routing data, provides an interface for checking all routing configuration information externally, and is convenient for developers to maintain the micro-service routing system.
Drawings
FIG. 1 is a schematic diagram of an overall architecture of a method for implementing dynamic change of a microservice route based on a memory database according to the present invention;
FIG. 2 is a schematic flow chart of a routing information management service updating routing information in the present invention;
fig. 3 is a schematic flow chart of the present invention for implementing dynamic change of micro-service routing based on the memory database.
Detailed Description
The present invention will be further described by way of examples, but not limited thereto, with reference to the accompanying drawings.
Example 1
A method for realizing micro-service routing dynamic change based on a memory database comprises a local routing end, a remote routing end, a routing information management service unit, a local database or a file system, wherein the local routing end, the remote routing end and the routing information management service unit are sequentially connected in a circulating manner, and the routing information management service unit is connected with the local database or the file system; the remote routing end is used for caching routing information; the routing information management service unit is used for providing an interface for updating routing information for the outside, releasing the routing information and persisting the released routing information to a local database or a file system; as shown in fig. 1.
The method comprises the following steps: and updating the issued routing information to the remote routing terminal in real time, wherein the routing information comprises routing data and a version number corresponding to the routing data, the size of the version number represents the old and new degree of the routing data, and the larger the version number is, the newer the data is. The local router end regularly pulls the routing information from the remote router end, compares the routing information with the version number in the routing information in the local router end, if the routing information is inconsistent with the version number in the routing information in the local router end, updates the routing information in the local router end through an event issuing and monitoring mechanism and enables the routing configuration to take effect, and realizes the dynamic change of the micro-service routing, otherwise, the local router end continuously pulls the routing information from the remote router end regularly.
Example 2
The method for implementing dynamic change of microservice routing based on the memory database according to the embodiment 1 is characterized in that:
an API Gateway based on Spring Cloud Gateway 2.2.3.RELEASE (an API Gateway open source component) is used as a local routing end, and needs to combine a remote routing end Memcached (a memory database) and a routing information management service to implement a function of dynamically changing routing data, and a specific flow diagram is shown in fig. 2 and fig. 3, and includes the following steps:
(1) a micro service is newly established in a micro service routing system, Spring Cloud Gateway 2.2.3.Release is introduced, API Gateway service is established on the basis of the micro service, the API Gateway service is used as a local routing end, and meanwhile, a corresponding routing data model is established in the routing information management service according to a routing data model in the Spring Cloud Gateway 2.2.3.Release version.
(2) A routing information management service is created in a microservice system. The routing information comprises two parts of contents, namely routing data in the local API gateway, and a version number corresponding to the routing data, wherein the version number identifies the old and new degree of the routing data, and the larger the version number is, the newer the data is. The routing information management service provides an interface for searching, adding, modifying and deleting the routing data of the local API gateway externally, when the routing data changes once, the corresponding version number of the routing data is correspondingly added, the larger the version number is, the newer the routing data is, so that the routing information of the local API gateway is maintained, and the routing information is persisted to a local database or a file system, so that the loss of the routing data is prevented.
(3) Memcached 1.5.16 is installed in the server, and is used for providing the function of caching the routing information. The Memcached maintains the published routing data and the version number corresponding to the routing data, and as a remote routing end, the routing information of the remote routing end is the latest, and the local routing end needs to take the routing information of the remote routing end as the standard.
(4) The routing information management service provides a publishing function at the same time, and after the routing data of the local API gateway is updated, the updating of the routing information is only stored in a local database or a file system and is not effective in the local API gateway. After the routing information is released, the latest routing information is updated to Memcached, that is, the remote routing end maintains the latest gateway routing information.
(5) And establishing a timing task at the local router, wherein the task is to pull the latest routing information in the remote router regularly, for example, once every 3 minutes, and then comparing the routing data version numbers, and if the routing data version numbers are not consistent, updating the routing information of the local router to ensure that the routing information in the local API gateway is latest.
(6) When the local router acquires the latest routing information from the remote router by regularly pulling, the latest routing data is stored in the memory of the API Gateway by the method provided by the InMemoryRouteDefinitionReform class in Spring Cloud Gateway 2.2.3.Release according to the structure of the routing data model created in the step (6). And then, initiating a RefreshRoutesEvent event, and dynamically refreshing the routing data in the gateway memory into a routing cache, namely enabling the loaded latest routing configuration to take effect in the local API gateway.
(7) And after the routing configuration of the local API gateway takes effect, assigning the routing data version number of the remote routing end to the routing data version number in the local API gateway, and indicating that the routing data in the local API gateway is consistent with the data of the remote routing end and is the latest routing data.
The micro-service routing dynamic change effect data is as follows:
2020-12-02 10:00:00.003WARN 2252---[scheduling-1]
c.l.i.schedule.dynamic route searching remote route pull time 2020-12-0210: 00
2020-12-02 10:00:00.389WARN 2252---[scheduling-1]
And c, i, schedule, dynamic route and routing version comparison, namely the version number of the local routing end is 0, and the version number of the remote routing end is 52
2020-12-02 10:00:00.389WARN 2252---[scheduling-1]
And c, i.e. schedule, dynamic routing, version number of remote routing end > version number of local routing end, and starting to pull remote routing information.
2020-12-02 10:00:00.422WARN 2252---[scheduling-1]
Remote routing information:
[{"filters":[{"args":{"_genkey_0":"1"},"name":"StripPrefix"}],"id":"gateway-consumer","order":0,"predi cates":[{"args":{"pattern":"/jk/**"},"name":"Path"}],"uri":"lb://gateway-consumer"},{"filters":[{"args":{"name":"X-Response-Red","value":"Blue"},"name":"AddResponseHeader"},{"args":{"_genkey_0":"1"},"name":"StripPrefix"}],"id":"gateway-consumer4","order":0,"predicates":[{"args":{"pattern":"/bbb/**"},"name":"Path"}],"uri":"lb://gateway-consumer"}]
2020-12-02 10:00:00.424WARN 2252---[scheduling-1]
and c, starting to update the routing information of the local routing end.
2020-12-02 10:00:00.435WARN 2252---[scheduling-1]
c.l.i.schedul.DynamicRouteScheduling:GatewayRouteDefinitionlist:
[GatewayRouteDefinition(id=gateway-consumer,predicates=[GatewayPredicateDefinition(name=Path,args={pattern=/jk/**})],filters=[GatewayFilterDefinition(name=StripPrefix,args={_genkey_0=1})],uri=lb://gateway-consumer,order=0),GatewayRouteDefinition(id=gateway-consumer4,predicates=[GatewayPredicateDefinition(name=Path,args={pattern=/bbb/**})],filters=[GatewayFilterDefinition(name=AddResponseHeader,args={name=X-Response-Red,value=Blue}),GatewayFilterDefinition(name=StripPrefix,args={_genkey_0=1})],uri=lb://gateway-consumer,order=0)]
2020-12-02 10:00:00.436WARN 2252---[scheduling-1]
Route1 is assembled as route definition:
GatewayRouteDefinition(id=gateway-consumer,predicates=[GatewayPredicateDefinition(name=Path,args={pattern=/jk/**})],filters=[GatewayFilterDefinition(name=StripPrefix,args={_genkey_0=1})],uri=lb://gateway-consumer,order=0)
2020-12-02 10:00:00.446INFO 2252---[scheduling-1]
service, dynamic RouteServie, issuing event RefreshRoutesEvent, dynamically refreshing gateway routing table 2020-12-0210: 00:00.446WARN 2252- - [ scheduling-1]
Route2 is assembled as route definition:
GatewayRouteDefinition(id=gateway-consumer4,predicates=[GatewayPredicateDefinition(name=Path,args={pattern=/bbb/**})],filters=[GatewayFilterDefinition(name=AddResponseHeader,args={name=X-Response-Red,value=Blue}),GatewayFilterDefinition(name=StripPrefix,args={_genkey_0=1})],uri=lb://gateway-consumer,order=0)
2020-12-02 10:00:00.464INFO 2252---[scheduling-1]
service, dynamic routing service, issuing event RefreshRoutesEvent, and dynamically refreshing gateway routing table.
2020-12-02 10:03:00.003WARN 2252---[scheduling-1]
c.l.i.schedule.dynamic route searching remote route pull time 2020-12-0210: 03:00
2020-12-02 10:03:00.047WARN 2252---[scheduling-1]
And c, I, schedule, dynamic route and routing version comparison, namely the version number of the local routing end is 52, the version number of the remote routing end is 52
2020-12-02 10:06:00.002WARN 2252---[scheduling-1]
c.l.i.schedule.dynamic route searching remote route pull time 2020-12-0210: 06:00
2020-12-02 10:06:00.038WARN 2252---[scheduling-1]
And c, I, schedule, dynamic route and routing version comparison, namely the version number of the local routing end is 52, the version number of the remote routing end is 52
The data reflects the implementation process of realizing the dynamic change of the micro-service routing based on the memory database, the invention changes the situation that the updating of the routing information in the traditional micro-service routing system needs to modify the configuration file or the code and restart the routing system, supports the dynamic change and the effectiveness of the routing information in the micro-service routing system, does not need to write the configuration file or the code, does not need to restart the routing system, ensures the continuous operation of the system and simplifies the development work.
Example 3
A computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the method of embodiment 1 or 2 for implementing dynamic change of microservice routing based on an in-memory database.

Claims (10)

1. A method for realizing micro-service routing dynamic change based on a memory database is characterized in that a realizing framework of the method comprises a local routing end, a remote routing end, a routing information management service unit, a local database or a file system, wherein the local routing end, the remote routing end and the routing information management service unit are sequentially connected in a circulating manner, and the routing information management service unit is connected with the local database or the file system;
the remote routing end is used for caching routing information; the routing information management service unit is used for providing an interface for updating routing information for the outside, releasing the routing information and persisting the released routing information to a local database or a file system;
the method comprises the following steps: and updating the issued routing information to the remote routing end in real time, wherein the routing information comprises routing data and a version number corresponding to the routing data, the local routing end regularly pulls the routing information from the remote routing end, the routing information is compared with the version number in the routing information in the local routing end, if the routing information is inconsistent with the version number in the routing information in the local routing end, the routing information of the local routing end is updated through an event issuing and monitoring mechanism, the routing configuration is enabled to take effect, the dynamic change of the micro-service routing is realized, and otherwise, the routing information is continuously regularly pulled from the remote routing end.
2. The method for implementing dynamic change of microservice routing based on the in-memory database according to claim 1, wherein the local routing end is an API gateway;
further preferably, the local routing terminal is an API Gateway based on Spring Cloud Gateway 2.2.3. RELEASE.
3. The method for implementing dynamic change of microservice routing based on the in-memory database according to claim 1, wherein the remote routing end is the in-memory database.
4. The method for implementing dynamic change of microservice routing based on the in-memory database according to claim 1, wherein the routing information management service unit provides external interfaces for searching, adding, modifying and deleting the routing information of the local routing terminal.
5. The method for implementing dynamic change of microservice routing based on the in-memory database according to claim 1, wherein a corresponding routing data model is created according to the API gateway, and the adding and modifying operations of the routing data of the local routing end are encapsulated through the created routing data model.
6. The method for implementing dynamic change of microservice routing based on in-memory database as claimed in claim 5, wherein the corresponding routing data model is created in the routing information management service according to the routing data model in Spring Cloud Gateway 2.2.3.RELEASE version.
7. The method according to claim 1, wherein when the routing information is updated through the routing information management service unit, an addition operation is correspondingly performed on a version number corresponding to the routing data, but the version number is not valid in the local routing end, and the updated routing information is issued to the remote routing end through the routing information management service unit.
8. The method according to claim 5 or 6, wherein the local router periodically pulls the routing information from the remote router, and compares the routing information with the version number in the local router, if the routing information is not consistent, the local router updates the routing information in the local router through the event issuing and monitoring mechanism and validates the routing configuration, thereby dynamically changing the micro-service routing, otherwise, the local router continuously pulls the routing information from the remote router periodically, comprising the following steps:
(1) a timing task is newly established at the local routing end, and the latest routing information in the remote routing end is pulled at regular time;
(2) comparing the version number corresponding to the routing data in the latest pulled routing information with the version number corresponding to the routing data in the local routing terminal, and if the version numbers are not consistent, updating the routing information; namely: storing the latest routing information into the local routing end according to the structure of the created routing data model, dynamically updating the routing data in the local routing end, and enabling the latest routing configuration to take effect at the local routing end;
(3) and after the routing configuration of the local routing end takes effect, assigning the version number of the routing data of the remote routing end to the version number of the routing data in the local routing end.
9. The method according to claim 8, wherein in step (1), the latest routing information in the remote router is pulled regularly every 3 minutes.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method for implementing dynamic change of microservice routing based on an in-memory database according to any one of claims 1 to 9.
CN202011442350.5A 2020-12-11 2020-12-11 Method and storage medium for realizing micro-service route dynamic change based on memory database Pending CN112565093A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011442350.5A CN112565093A (en) 2020-12-11 2020-12-11 Method and storage medium for realizing micro-service route dynamic change based on memory database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011442350.5A CN112565093A (en) 2020-12-11 2020-12-11 Method and storage medium for realizing micro-service route dynamic change based on memory database

Publications (1)

Publication Number Publication Date
CN112565093A true CN112565093A (en) 2021-03-26

Family

ID=75062400

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011442350.5A Pending CN112565093A (en) 2020-12-11 2020-12-11 Method and storage medium for realizing micro-service route dynamic change based on memory database

Country Status (1)

Country Link
CN (1) CN112565093A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113595925A (en) * 2021-07-06 2021-11-02 中企云链(北京)金融信息服务有限公司 Intelligent gateway dynamic current limiting implementation method
CN113726662A (en) * 2021-08-19 2021-11-30 成都民航西南凯亚有限责任公司 Micro-service routing and management system plug-in
CN113765701A (en) * 2021-08-02 2021-12-07 中企云链(北京)金融信息服务有限公司 Gateway control method based on permanent memory cache
CN115129740A (en) * 2022-09-01 2022-09-30 山东大学 Method and system for updating distributed micro-service database in cloud native environment
CN115174342A (en) * 2022-06-15 2022-10-11 阿里巴巴(中国)有限公司 Gateway plug-in management method, device and equipment
CN116032824A (en) * 2022-12-16 2023-04-28 中国联合网络通信集团有限公司 Processing method, gateway component, server, medium and system for routing data

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110740187A (en) * 2019-10-25 2020-01-31 家乡互动(厦门)网络科技有限公司 micro service architecture realization method
CN111314141A (en) * 2020-02-21 2020-06-19 腾讯云计算(北京)有限责任公司 Route updating method and device
CN111610979A (en) * 2020-04-15 2020-09-01 河南大学 API gateway subjected to persistence and coupling degree optimization and method thereof
CN111682954A (en) * 2019-03-11 2020-09-18 国际商业机器公司 Network for managing microservices
CN111884917A (en) * 2020-07-28 2020-11-03 浪潮云信息技术股份公司 Gateway system based on micro service and gateway dynamic routing method
CN111970198A (en) * 2020-08-13 2020-11-20 北京金山云网络技术有限公司 Service routing method, device, electronic equipment and medium
US20200374291A1 (en) * 2019-05-20 2020-11-26 At&T Intellectual Property I, L.P. Edge-node authentication for functions as a service
CN112035228A (en) * 2020-08-28 2020-12-04 光大科技有限公司 Resource scheduling method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111682954A (en) * 2019-03-11 2020-09-18 国际商业机器公司 Network for managing microservices
US20200374291A1 (en) * 2019-05-20 2020-11-26 At&T Intellectual Property I, L.P. Edge-node authentication for functions as a service
CN110740187A (en) * 2019-10-25 2020-01-31 家乡互动(厦门)网络科技有限公司 micro service architecture realization method
CN111314141A (en) * 2020-02-21 2020-06-19 腾讯云计算(北京)有限责任公司 Route updating method and device
CN111610979A (en) * 2020-04-15 2020-09-01 河南大学 API gateway subjected to persistence and coupling degree optimization and method thereof
CN111884917A (en) * 2020-07-28 2020-11-03 浪潮云信息技术股份公司 Gateway system based on micro service and gateway dynamic routing method
CN111970198A (en) * 2020-08-13 2020-11-20 北京金山云网络技术有限公司 Service routing method, device, electronic equipment and medium
CN112035228A (en) * 2020-08-28 2020-12-04 光大科技有限公司 Resource scheduling method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HONGJUN DAI; KANG CHEN: "OPTZ: a Hardware Isolation Architecture of Multi-Tasks Based on TrustZone Support", 《2017 IEEE INTERNATIONAL SYMPOSIUM ON PARALLEL AND DISTRIBUTED PROCESSING WITH APPLICATIONS AND 2017 IEEE INTERNATIONAL CONFERENCE ON UBIQUITOUS COMPUTING AND COMMUNICATIONS (ISPA/IUCC)》 *
肖仲垚: "微服务通信框架的设计与实现", 《中国优秀硕士论文电子期刊网》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113595925A (en) * 2021-07-06 2021-11-02 中企云链(北京)金融信息服务有限公司 Intelligent gateway dynamic current limiting implementation method
CN113595925B (en) * 2021-07-06 2024-01-30 中企云链(北京)金融信息服务有限公司 Method for realizing dynamic current limiting of intelligent gateway
CN113765701A (en) * 2021-08-02 2021-12-07 中企云链(北京)金融信息服务有限公司 Gateway control method based on permanent memory cache
CN113765701B (en) * 2021-08-02 2024-02-20 中企云链(北京)金融信息服务有限公司 Gateway control method based on permanent memory cache
CN113726662A (en) * 2021-08-19 2021-11-30 成都民航西南凯亚有限责任公司 Micro-service routing and management system plug-in
CN113726662B (en) * 2021-08-19 2023-02-10 成都民航西南凯亚有限责任公司 Micro-service routing and management system
CN115174342A (en) * 2022-06-15 2022-10-11 阿里巴巴(中国)有限公司 Gateway plug-in management method, device and equipment
CN115174342B (en) * 2022-06-15 2024-03-08 阿里巴巴(中国)有限公司 Plug-in management method, device and equipment of gateway
CN115129740A (en) * 2022-09-01 2022-09-30 山东大学 Method and system for updating distributed micro-service database in cloud native environment
CN115129740B (en) * 2022-09-01 2022-11-04 山东大学 Method and system for updating distributed micro-service database in cloud native environment
CN116032824A (en) * 2022-12-16 2023-04-28 中国联合网络通信集团有限公司 Processing method, gateway component, server, medium and system for routing data

Similar Documents

Publication Publication Date Title
CN112565093A (en) Method and storage medium for realizing micro-service route dynamic change based on memory database
US10114626B2 (en) Database level containers
EP2973018B1 (en) A method to accelerate queries using dynamically generated alternate data formats in flash cache
KR102177190B1 (en) Managing data with flexible schema
US10528341B2 (en) User-configurable database artifacts
US9600269B1 (en) Deployment of database objects
US20160267132A1 (en) Abstraction layer between a database query engine and a distributed file system
US20130013890A1 (en) Database system
US9996330B2 (en) Deployment process plugin architecture
US20120158795A1 (en) Entity triggers for materialized view maintenance
CN106294814B (en) The device and method of HBase the secondary index building and inquiry of database based on memory
US10997124B2 (en) Query integration across databases and file systems
CN112513835A (en) Enabling and integrating in-memory semi-structured data and text document searching with in-memory columnar query processing
US10528590B2 (en) Optimizing a query with extrema function using in-memory data summaries on the storage server
US9026523B2 (en) Efficient selection of queries matching a record using a cache
US10642841B2 (en) Document store utilizing partial object compression
US7925665B2 (en) Using query persistence for efficient subquery evaluation in federated databases
CN104598652B (en) A kind of data base query method and device
US10810116B2 (en) In-memory database with page size adaptation during loading
US20140258264A1 (en) Management of searches in a database system
US10496665B2 (en) Database system incorporating document store
CN108256019A (en) Database key generation method, device, equipment and its storage medium
US11620285B2 (en) Automatic database query translation
US11947490B2 (en) Index generation and use with indeterminate ingestion patterns
CN109753245A (en) A kind of multiple disks load balancing asynchronous read and write dispatching method and device

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210326

RJ01 Rejection of invention patent application after publication