CN113079098A - Method, device, equipment and computer readable medium for updating route - Google Patents

Method, device, equipment and computer readable medium for updating route Download PDF

Info

Publication number
CN113079098A
CN113079098A CN202110426956.8A CN202110426956A CN113079098A CN 113079098 A CN113079098 A CN 113079098A CN 202110426956 A CN202110426956 A CN 202110426956A CN 113079098 A CN113079098 A CN 113079098A
Authority
CN
China
Prior art keywords
server
routing
routing information
updating
routing table
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.)
Granted
Application number
CN202110426956.8A
Other languages
Chinese (zh)
Other versions
CN113079098B (en
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
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 Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202110426956.8A priority Critical patent/CN113079098B/en
Publication of CN113079098A publication Critical patent/CN113079098A/en
Application granted granted Critical
Publication of CN113079098B publication Critical patent/CN113079098B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method, a device, equipment and a computer readable medium for updating a route, and relates to the technical field of computers. One embodiment of the method comprises: expanding or contracting the capacity of the data management system, and synchronously modifying the routing information in the storage middleware of the container management platform; the working node process of the server asynchronously monitors the routing information in the storage middleware to update a server routing table; and based on the updated server routing table, routing the access request to the data management system after capacity expansion or capacity reduction. The implementation method reduces the time consumed by server overloading, and further realizes the routing update.

Description

Method, device, equipment and computer readable medium for updating route
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a computer-readable medium for route update.
Background
Typically, the IP addresses of the service (service) and the container (pod) are only accessible inside the cluster. An access request outside the cluster needs to be forwarded to a Node interface exposed by the service at a Node (Node) through load balancing, and then forwarded to the relevant Pod. While Ingress is the set of routing rules provided for requests entering the cluster.
Nginx is a high performance HTTP and reverse proxy web server. Generally, the Nginx directly configures upstream information (upstream), namely an IP address of a service and a Uniform Resource Identifier (URI) address of the service, in an nginx.conf configuration file, so that routing can be realized.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art: the route updating relates to a change service, the change service needs to reload the Nginx, and the Nginx reloading takes longer, so that the concurrency capability of the Nginx is reduced.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, a device, and a computer readable medium for route update, so as to reduce time consumption for server reloading, thereby implementing route update.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method for updating a route, including:
expanding or contracting the capacity of the data management system, and synchronously modifying the routing information in the storage middleware of the container management platform;
the working node process of the server asynchronously monitors the routing information in the storage middleware to update a server routing table;
and based on the updated server routing table, routing the access request to the data management system after capacity expansion or capacity reduction.
The updating server routing table includes:
and updating a request uniform resource identifier of the service identifier and/or an IP address of the service frame in the server routing table, wherein the routing information comprises the service identifier and the service name of the service frame.
The updating server routing table includes:
and updating a request uniform resource identifier of the upstream equipment identification and/or the IP address of the service framework in the routing table of the server, wherein the routing information comprises the upstream equipment identification and the service name of the service framework.
The work node process of the server asynchronously monitors the routing information in the storage middleware to update a server routing table, and the method comprises the following steps:
the working node process of the server asynchronously acquires the value of the routing information;
updating a server routing table based on a determination that routing information in the storage middleware has changed based on the value of the routing information.
The determining that routing information in the storage middleware has changed based on the IP address comprises:
determining that the routing information in the storage middleware is unchanged based on the value of the routing information, and establishing long connection of a monitoring period;
determining, during the listening period, that routing information in the storage middleware has changed based on a value of the routing information.
After the updating of the server routing table, the method further includes: and taking the updated server routing table as a backup file.
The method further comprises the following steps:
and if the working node of the server fails to acquire the server routing table, acquiring the server routing table based on the backup file.
According to a second aspect of the embodiments of the present invention, there is provided an apparatus for updating a route, including:
the synchronous module is used for expanding or contracting the capacity in the data management system and synchronously modifying the routing information in the storage middleware of the container management platform;
the asynchronous module is used for asynchronously monitoring the routing information in the storage middleware by the working node process of the server so as to update a server routing table;
and the control module is used for routing the access request to the data management system after capacity expansion or capacity reduction based on the updated server routing table.
According to a third aspect of the embodiments of the present invention, there is provided an electronic device for route update, including:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method as described above.
According to a fourth aspect of embodiments of the present invention, there is provided a computer readable medium, on which a computer program is stored, which when executed by a processor, implements the method as described above.
One embodiment of the above invention has the following advantages or benefits: expanding or contracting the capacity of the data management system, and synchronously modifying the routing information in the storage middleware of the container management platform; the working node process of the server asynchronously monitors the routing information in the storage middleware to update a server routing table; and based on the updated server routing table, routing the access request to the data management system after capacity expansion or capacity reduction. The service can be changed without the server reloading, so that the time consumed by server reloading is reduced, and routing updating is realized.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram of a main flow of a method of route update according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a device involved in route updating according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of different paths using the same service identification, according to an embodiment of the invention;
FIG. 4 is a schematic diagram of different paths using the same upstream device identification, in accordance with an embodiment of the present invention;
FIG. 5 is a schematic diagram of another different path using the same upstream device identification, in accordance with an embodiment of the present invention;
FIG. 6 is a schematic diagram of accessing a container through a service identification, according to an embodiment of the invention;
FIG. 7 is an interaction diagram of a route update according to an embodiment of the invention;
fig. 8 is a schematic structural diagram of an etc according to an embodiment of the invention;
FIG. 9 is a schematic flow chart of updating a Nginx routing table according to an embodiment of the present invention;
FIG. 10 is a flow chart illustrating the execution of a worker process according to an embodiment of the present invention;
FIG. 11 is a flowchart illustrating the execution of a master process according to an embodiment of the present invention;
fig. 12 is a schematic diagram of the main structure of an apparatus for route update according to an embodiment of the present invention;
FIG. 13 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 14 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Kubernetes, K8s for short, is an open source application for managing containerization on multiple hosts in a cloud platform. The goal is to make deploying containerized applications simple and efficient and to provide a mechanism for application deployment, planning, updating, maintenance.
When K8s expands the container when dynamically adjusting the container Pod, the server configuration file must be modified by the Ingress Controller to change the service information, and then the load reloads the server to take effect. When the container Pod information in the configuration file is very much, the time for reloading the server is long, which can reach several seconds or even ten and several seconds, and a part of Worker threads are newly added for updating the configuration, so that the concurrency capability of the server is reduced. As one example, the server may be Nginx.
In order to solve the technical problem that the server reloading takes a long time, the following technical scheme in the embodiment of the invention can be adopted.
Referring to fig. 1, fig. 1 is a schematic diagram of a main flow of a method for updating a route according to an embodiment of the present invention, where routing information is stored in a storage middleware, and a working node updates the routing information by asynchronously monitoring the routing information in the storage middleware. As shown in fig. 1, the method specifically comprises the following steps:
s101, expanding or contracting the capacity of the data management system, and synchronously modifying the routing information in the storage middleware of the container management platform.
In the embodiment of the invention, the data management system is responsible for software-defined data center management, and provides unified management, flexible network interconnection and reliable block storage of physical machines, virtual machines and containers.
The container management platform is an application for managing containerization on a plurality of hosts in a cloud platform. As one example, the container management platform is kubernets.
In the embodiment of the invention, the dynamic routing of the service framework mainly migrates the information stored by the local configuration file of the server to the storage middleware of the container management platform.
Wherein, the server is Nginx, and the storage middleware is ETCD. Nginx is a high performance HTTP and reverse proxy web server, while also providing IMAP/POP3/SMTP services. ETCD is a high-availability Key/Value storage system and is mainly used for sharing configuration and service discovery.
Referring to fig. 2, fig. 2 is a schematic diagram of a device involved in route update according to an embodiment of the present invention. And setting the routing information in the ETCD under the condition that the container Pod is expanded or contracted. And a worker node (worker) of the Nginx asynchronously listens route information in the ETCD so as to update the cache route table. The access request is then routed to the data management system according to the routing table in the cache.
In embodiments of the present invention, in case of capacity expansion or capacity reduction of the data management system, i.e. the capacity of the data management system needs to be increased or decreased due to actual demands, synchronous modification, i.e. dynamic routing, is involved. Dynamic routing means that a router can automatically establish a routing table and can adjust timely according to changes of actual conditions.
As one example, data management system expansion or contraction includes K8s performing expansion or contraction of the Pod.
The etc stores therein information previously stored in a configuration file local to Nginx, that is, stores therein route information. Due to capacity expansion or capacity reduction of the data management system, the routing information in the ETCT may be changed, namely, modified synchronously, and the routing information in the ETCD needs to be monitored.
In the embodiment of the present invention, the routing information includes three parts, which are a service name of the service framework, a request Uniform Resource Identifier (URI) and an IP address of the service framework.
The routing information stored by the ETCD mainly comprises three parts of contents, namely a Service name, a request URI and an upstream IP address.
Referring to fig. 3, fig. 3 is a schematic diagram illustrating different paths using the same service identifier according to an embodiment of the present invention. The paths of the left and right graphs in fig. 3 are different, but the IP addresses of the left and right graphs are the same.
In order to facilitate storage management routing in the ETCD, duplicate upstream IPs can be stripped by binding a plurality of request URIs with a service Identifier (ID). Therefore, when the upstream IP is changed, only the IP served in the ETCD needs to be modified, and the data bound on the plurality of paths does not need to be modified. Then, for the routing information, the routing information includes a service identification including the request URI and the IP address of the service framework and a service name of the service framework.
As an example, the server routing table is updated, specifically: and updating the request URI of the service identifier and/or the IP address of the service frame in the routing table of the server, wherein the routing information comprises the service identifier and the service name of the service frame.
Referring to fig. 4, fig. 4 is a schematic diagram of different paths using the same upstream device identification, in accordance with an embodiment of the present invention. The two request paths in fig. 4 are different, but the upstream device identifications are the same, both at s 1. Then the URIs of the two requests are bound to an upstream device identification. Therefore, when the upstream IP is changed, only the IP of the upstream equipment identifier in the ETCD needs to be modified, and the operation complexity of the ETCD is lowered without perception.
As an example, the server routing table is updated, specifically: and updating the URI of the upstream equipment identification and/or the IP address of the service frame in the routing table of the server, wherein the routing information comprises the upstream equipment identification and the service name of the service frame.
Referring to fig. 5, fig. 5 is a schematic diagram of another different path using the same upstream device identification, in accordance with an embodiment of the present invention. The two request paths in FIG. 5 are different, but the upstream device identifications are the same, both being up 1. Then the URIs of the two requests are bound to an upstream device identification.
Then, for the routing information, the routing information includes an upstream device identification including the request URI and the IP address of the service frame and the service name of the service frame.
Referring to fig. 6, fig. 6 is a schematic diagram of accessing a container through a service identification according to an embodiment of the present invention. Ingress in Nginx in FIG. 6 includes routing policy 1 and routing policy 2. The solid arrows in fig. 6 indicate that the Pod can be accessed directly through the routing information. In addition, the dashed arrows in fig. 6 indicate that according to the service identification, such as: service1 accesses the Pod. And accessing the Pod by using the service identifier, and under the condition that the upstream IP is changed, only the IP corresponding to the service identifier needs to be modified without modifying the IP bound on each path.
S102, the work node process of the server asynchronously monitors the routing information in the ETCD so as to update the routing table of the server.
Referring to fig. 7, fig. 7 is an interaction diagram of a route update according to an embodiment of the present invention. Among them, developers, containers Pod, ETCD, Nginx Worker threads, routing table caches, and dump files are involved.
The interaction in fig. 7 can be divided into two parts. The first part is that the developer operates the container to synchronously modify the routing information in the ETCD. The second part is the process that the Nginx Worker thread asynchronously listens to the routing information in the ETCD. It should be noted that the first part belongs to synchronous operation, and the second part belongs to asynchronous operation. The purpose of this operation is: network congestion caused by synchronous monitoring of Nginx Worker threads is avoided.
Specifically, the developer expands or contracts the container through the operation, dynamically modifies the routing information in the ETCD, and the ETCD returns the execution success after being modified successfully. Nginx's Worker asynchronously listens for changes and updates the routing table through the watch operation.
Referring to fig. 8, fig. 8 is a schematic structural diagram of an etc according to an embodiment of the present invention. ETCD mainly has two functions, namely a persistent key-value storage system and a distributed system data consistency service provider.
The information stored in the ETCD includes a service name, a request URI, and an IP address of the service framework. An access request is sent and forwarded to the storage module via the network layer for specific transaction processing. If the node state is updated, the node state is handed to the Raft module for arbitration and logging, and then is synchronized to other ETCD nodes. As an example, data persistence is performed only after more than half of the ETCD nodes confirm the modification of the state of the ETCD nodes.
Referring to fig. 9, fig. 9 is a schematic flowchart of updating an Nginx routing table according to an embodiment of the present invention, which specifically includes the following steps:
s901, the working node process of the server asynchronously obtains the value of the routing information.
The server may specifically be Nginx. In the process that a worker of the Nginx asynchronously monitors the routing information of the ETCD, in order to judge whether the routing information in the storage middleware changes, a reader process of the Nginx asynchronously obtains the value of the routing information. The storage middleware may be an ETCD.
S902, determining that the routing information in the storage middleware is changed based on the value of the routing information, and updating the server routing table.
Since the routing information is a necessary parameter for accessing the container, it is possible to determine whether or not the routing information in the ETCD has changed, based on the value of the routing information. And if the routing information in the ETCD is determined to be changed, updating the Nginx routing table, thereby ensuring the routing of the access request.
In the embodiment of fig. 9, whether the routing information of the ETCD is changed is determined by the value of the routing information to update the Nginx routing table.
Referring to fig. 10, fig. 10 is a schematic diagram of an execution flow of a worker process according to an embodiment of the present invention. In fig. 10, the worker process asynchronously listens to the routing information in the ETCD. Asynchronously monitoring the routing information in the ETCD by the worker process without updating, and continuing monitoring; and asynchronously monitoring that the routing information in the ETCD is updated by the worker process, and updating the cache of the routing table, namely updating the Nginx routing table.
In one embodiment of the invention, the routing information in the storage middleware is determined to be unchanged based on the value of the routing information, and long connection of a monitoring period is established; during the listening period, it is determined that the routing information in the storage middleware has changed based on the value of the routing information. Wherein the storage middleware may be an ETCD.
That is, any change in the value of the routing information occurs during the listening period, and it is determined that the routing information in the ETCD has changed, and immediately returned to Nginx to update the route. As an example, the listening period is 5 minutes.
In one embodiment of the present invention, in addition to updating the server routing table, the updated server routing table is used as a backup file. Namely, the Nginx routing table is also backed up, and the consistency of the local data and the ETCD can be kept by loading the backup file during restarting. As one example, the backup file is a dump file.
As an example, if the working node of the server fails to acquire the server routing table, the working node learns the server routing table based on the backup file. Wherein the server may be Nginx. That is, even if the ETCD fails unexpectedly in the middle and the Nginx routing table fails to be acquired, the Nginx routing table can be acquired by directly loading the backup file when the Nginx is restarted.
Referring to fig. 11, fig. 11 is a schematic diagram illustrating an execution flow of a master process according to an embodiment of the present invention.
In FIG. 11, when Nginx starts, the master process first parses the local configuration file. If the analysis fails, ending the process; after the parsing is successful, initialization of the worker process is started after a series of initialization.
And when the worker is initialized, the ETCD is removed to obtain the pull configuration so as to update the routing information. If the pulling is successful, directly updating the routing information; if the pulling fails, the backup file is opened, the previous backup Nginx routing table is obtained to realize updating, and then normal service providing is started.
S103, based on the updated server routing table, the access request is routed to the data management system after capacity expansion or capacity reduction.
After receiving the access request, the access request may be routed to the data management system after capacity expansion or capacity reduction according to the updated server routing table.
In the embodiment of the present invention, the data management system expands or contracts, and synchronously modifies the routing information in the storage middleware of the container management platform; the working node process of the server asynchronously monitors the routing information in the storage middleware to update a server routing table; and based on the updated server routing table, routing the access request to the data management system after capacity expansion or capacity reduction. The service can be changed without the server reloading, so that the time consumed by server reloading is reduced, and routing updating is realized.
Referring to fig. 12, fig. 12 is a schematic diagram of a main structure of a route updating apparatus according to an embodiment of the present invention, where the route updating apparatus may implement a route updating method, and as shown in fig. 12, the route updating apparatus specifically includes:
a synchronization module 1201, configured to expand or contract the capacity in the data management system, and synchronously modify the routing information in the storage middleware of the container management platform;
an asynchronous module 1202, configured to asynchronously monitor the routing information in the storage middleware by a work node process of the server, so as to update a server routing table;
and a control module 1203, configured to route the access request to the expanded or reduced data management system based on the updated server routing table.
In an embodiment of the present invention, the asynchronous module 1202 is specifically configured to update a request uniform resource identifier of the service identifier and/or an IP address of the service framework in the server routing table, where the routing information includes the service identifier and a service name of the service framework.
In an embodiment of the present invention, the asynchronous module 1202 is specifically configured to update a request uniform resource identifier of an upstream device identifier and/or an IP address of a service framework in the server routing table, where the routing information includes the upstream device identifier and a service name of the service framework.
In an embodiment of the present invention, the asynchronous module 1202 is specifically configured to asynchronously obtain the value of the routing information in the work node process of the server;
updating a server routing table based on a determination that routing information in the storage middleware has changed based on the value of the routing information.
In an embodiment of the present invention, the asynchronous module 1202 is specifically configured to determine that the routing information in the storage middleware is not changed based on the value of the routing information, and establish a long connection for a listening period;
determining, during the listening period, that routing information in the storage middleware has changed based on a value of the routing information.
In an embodiment of the present invention, the control module 1203 is further configured to use the updated server routing table as a backup file.
In an embodiment of the present invention, the control module 1203 is further configured to, if the working node of the server fails to obtain the server routing table, obtain the server routing table based on the backup file.
Fig. 13 shows an exemplary system architecture 1300 to which the method for route update or the apparatus for route update of the embodiments of the present invention may be applied.
As shown in fig. 13, the system architecture 1300 may include terminal devices 1301, 1302, 1303, a network 1304, and a server 1305. The network 1304 is used to provide a medium for communication links between the terminal devices 1301, 1302, 1303 and the server 1305. The network 1304 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may use terminal devices 1301, 1302, 1303 to interact with a server 1305 over a network 1304 to receive or send messages or the like. Various messaging client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, social platform software, etc. (examples only) may be installed on the terminal devices 1301, 1302, 1303.
Terminal devices 1301, 1302, 1303 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 1305 may be a server that provides various services, such as a background management server (for example only) that provides support for shopping websites browsed by users using the terminal devices 1301, 1302, 1303. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the method for route updating provided by the embodiment of the present invention is generally executed by the server 1305, and accordingly, the apparatus for route updating is generally disposed in the server 1305.
It should be understood that the number of terminal devices, networks, and servers in fig. 13 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 14, shown is a block diagram of a computer system 1400 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 14 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 14, the computer system 1400 includes a Central Processing Unit (CPU)1401, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)1402 or a program loaded from a storage portion 1408 into a Random Access Memory (RAM) 1403. In the RAM 1403, various programs and data necessary for the operation of the system 1400 are also stored. The CPU 1401, ROM 1402, and RAM 1403 are connected to each other via a bus 1404. An input/output (I/O) interface 1405 is also connected to bus 1404.
The following components are connected to the I/O interface 1405: an input portion 1406 including a keyboard, a mouse, and the like; an output portion 1407 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker and the like; a storage portion 1408 including a hard disk and the like; and a communication portion 1409 including a network interface card such as a LAN card, a modem, or the like. The communication section 1409 performs communication processing via a network such as the internet. The driver 1410 is also connected to the I/O interface 1405 as necessary. A removable medium 1411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 1410 as necessary, so that a computer program read out therefrom is installed into the storage section 1408 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 1409 and/or installed from the removable medium 1411. The computer program performs the above-described functions defined in the system of the present invention when executed by a Central Processing Unit (CPU) 1401.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a synchronous module, an asynchronous module, and a control module. Where the names of these modules do not in some cases constitute a limitation on the modules themselves, for example, a synchronization module may also be described as "for use in routing information in storage middleware of a data management system, an extended or reduced capacity, dynamic routing container management platform".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:
expanding or contracting the capacity of the data management system, and synchronously modifying the routing information in the storage middleware of the container management platform;
the working node process of the server asynchronously monitors the routing information in the storage middleware to update a server routing table;
and based on the updated server routing table, routing the access request to the data management system after capacity expansion or capacity reduction.
According to the technical scheme of the embodiment of the invention, a data management system expands or contracts the capacity and synchronously modifies the routing information in the storage middleware of a container management platform; the working node process of the server asynchronously monitors the routing information in the storage middleware to update a server routing table; and based on the updated server routing table, routing the access request to the data management system after capacity expansion or capacity reduction. The service can be changed without the server reloading, so that the time consumed by server reloading is reduced, and routing updating is realized.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method of route updating, comprising:
expanding or contracting the capacity of the data management system, and synchronously modifying the routing information in the storage middleware of the container management platform;
the working node process of the server asynchronously monitors the routing information in the storage middleware to update a server routing table;
and based on the updated server routing table, routing the access request to the data management system after capacity expansion or capacity reduction.
2. The method for route update according to claim 1, wherein the updating the server routing table comprises:
and updating a request uniform resource identifier of the service identifier and/or an IP address of the service frame in the server routing table, wherein the routing information comprises the service identifier and the service name of the service frame.
3. The method for route update according to claim 1, wherein the updating the server routing table comprises:
and updating a request uniform resource identifier of the upstream equipment identification and/or the IP address of the service framework in the routing table of the server, wherein the routing information comprises the upstream equipment identification and the service name of the service framework.
4. The method for updating the routing according to claim 1, wherein the work node process of the server asynchronously listens to the routing information in the storage middleware to update the server routing table, comprising:
the working node process of the server asynchronously acquires the value of the routing information;
updating a server routing table based on a determination that routing information in the storage middleware has changed based on the value of the routing information.
5. The method of claim 4, wherein the determining that the routing information in the storage middleware has changed based on the IP address comprises:
determining that the routing information in the storage middleware is unchanged based on the value of the routing information, and establishing long connection of a monitoring period;
determining, during the listening period, that routing information in the storage middleware has changed based on a value of the routing information.
6. The method for updating routing according to claim 1, further comprising, after updating the server routing table: and taking the updated server routing table as a backup file.
7. The method of route updating as claimed in claim 6, wherein said method further comprises:
and if the working node of the server fails to acquire the server routing table, acquiring the server routing table based on the backup file.
8. An apparatus for routing updates, comprising:
the synchronous module is used for expanding or contracting the capacity in the data management system and synchronously modifying the routing information in the storage middleware of the container management platform;
the asynchronous module is used for asynchronously monitoring the routing information in the storage middleware by the working node process of the server so as to update a server routing table;
and the control module is used for routing the access request to the data management system after capacity expansion or capacity reduction based on the updated server routing table.
9. An electronic device for routing updates, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202110426956.8A 2021-04-20 2021-04-20 Method, device, equipment and computer readable medium for updating route Active CN113079098B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110426956.8A CN113079098B (en) 2021-04-20 2021-04-20 Method, device, equipment and computer readable medium for updating route

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110426956.8A CN113079098B (en) 2021-04-20 2021-04-20 Method, device, equipment and computer readable medium for updating route

Publications (2)

Publication Number Publication Date
CN113079098A true CN113079098A (en) 2021-07-06
CN113079098B CN113079098B (en) 2023-04-07

Family

ID=76618143

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110426956.8A Active CN113079098B (en) 2021-04-20 2021-04-20 Method, device, equipment and computer readable medium for updating route

Country Status (1)

Country Link
CN (1) CN113079098B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114650251A (en) * 2022-03-18 2022-06-21 北京百度网讯科技有限公司 Routing table construction method, device, equipment and medium
CN115190015A (en) * 2022-07-12 2022-10-14 中国工商银行股份有限公司 Soft load system configuration method and device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140208295A1 (en) * 2013-01-22 2014-07-24 Maluuba Inc. Method and system for creating and managing a dynamic route topography for service oriented software environments
CN111314141A (en) * 2020-02-21 2020-06-19 腾讯云计算(北京)有限责任公司 Route updating method and device
CN111447146A (en) * 2020-03-20 2020-07-24 上海中通吉网络技术有限公司 Method, device, equipment and storage medium for dynamically updating physical routing information

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140208295A1 (en) * 2013-01-22 2014-07-24 Maluuba Inc. Method and system for creating and managing a dynamic route topography for service oriented software environments
CN111314141A (en) * 2020-02-21 2020-06-19 腾讯云计算(北京)有限责任公司 Route updating method and device
CN111447146A (en) * 2020-03-20 2020-07-24 上海中通吉网络技术有限公司 Method, device, equipment and storage medium for dynamically updating physical routing information

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114650251A (en) * 2022-03-18 2022-06-21 北京百度网讯科技有限公司 Routing table construction method, device, equipment and medium
CN114650251B (en) * 2022-03-18 2024-02-20 北京百度网讯科技有限公司 Routing table construction method, device, equipment and medium
CN115190015A (en) * 2022-07-12 2022-10-14 中国工商银行股份有限公司 Soft load system configuration method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN113079098B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
CN110417842B (en) Fault processing method and device for gateway server
CN107590001B (en) Load balancing method and device, storage medium and electronic equipment
CN108737270B (en) Resource management method and device for server cluster
CN108712332B (en) Communication method, system and device
US10657108B2 (en) Parallel I/O read processing for use in clustered file systems having cache storage
CN109245908B (en) Method and device for switching master cluster and slave cluster
CN107210924B (en) Method and apparatus for configuring a communication system
CN113079098B (en) Method, device, equipment and computer readable medium for updating route
CN109783151B (en) Method and device for rule change
CN112527520A (en) Method and device for deploying message middleware
US9390156B2 (en) Distributed directory environment using clustered LDAP servers
CN107172214B (en) Service node discovery method and device with load balancing function
CN111258627A (en) Interface document generation method and device
EP3101539B1 (en) Selection of compatible resources after updating web application servers
CN115442129A (en) Method, device and system for managing cluster access authority
CN110661857B (en) Data synchronization method and device
CN114338763A (en) Micro-service calling method, device, server and computer readable storage medium
CN113742376A (en) Data synchronization method, first server and data synchronization system
CN113296968A (en) Address list updating method, device, medium and electronic equipment
CN114760360A (en) Request response method and device, electronic equipment and computer readable storage medium
US10148503B1 (en) Mechanism for dynamic delivery of network configuration states to protocol heads
CN113364615B (en) Method, device, equipment and computer readable medium for rolling upgrade
CN111404980B (en) Data storage method and object storage system
CN114513524B (en) Resource synchronization method and device, electronic equipment and storage medium
US10798020B2 (en) Data sharing events

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