CN115396364A - Route forwarding method and device - Google Patents

Route forwarding method and device Download PDF

Info

Publication number
CN115396364A
CN115396364A CN202211020146.3A CN202211020146A CN115396364A CN 115396364 A CN115396364 A CN 115396364A CN 202211020146 A CN202211020146 A CN 202211020146A CN 115396364 A CN115396364 A CN 115396364A
Authority
CN
China
Prior art keywords
request
processed
data center
forwarding
client
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
CN202211020146.3A
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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202211020146.3A priority Critical patent/CN115396364A/en
Publication of CN115396364A publication Critical patent/CN115396364A/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/30Routing of multiclass traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/33Flow control; Congestion control using forward notification

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a route forwarding method and a route forwarding device, which can be applied to the financial field or other fields. The method comprises the following steps: receiving a request to be processed, wherein the request to be processed is sent by a client, and the request to be processed at least comprises an identifier which is used for indicating the client to which the identifier belongs; judging whether the request to be processed belongs to the current data center or not according to a preset routing rule and an identifier; if not, determining a target data center corresponding to the request to be processed, and forwarding the request to be processed to the target data center; if so, sending the request to be processed to the route forwarding judgment device, enabling the route forwarding judgment device to judge the type of the request to be processed, determining a target service corresponding to the request to be processed according to the type, and forwarding the request to be processed to the target service for processing. By the method, the overall availability and reliability of the data center can be improved after the deployment of the multiple data centers, and the data center switching of the client can be realized noninductively.

Description

Route forwarding method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for forwarding a route.
Background
In order to ensure high availability and stability of the online system, each service role in the online system uses load balancing technology or failover technology. However, when the whole system has errors, the techniques such as load balancing or failover cannot meet the requirements of actual situations.
In the related art, the solution of using the dual-active data center solves the problem of the failure of the whole system, however, the solution of the dual-active data center has a plurality of different solutions for the routing strategy of the system for processing the request, and most of the online systems have no uniform solution for the routing strategy of the dual-active system. Routing strategies generally rely on a uniform routing forwarding module, and no matter whether the module is deployed in any data center, when the data center fails, all routing strategies fail.
Disclosure of Invention
In view of this, embodiments of the present invention provide a route forwarding method and apparatus, so as to achieve the purposes of improving overall availability and reliability of a data center after deployment of multiple data centers, and ensuring that a client end realizes data center switching without feeling.
In order to achieve the above object, the embodiments of the present invention provide the following technical solutions:
the first aspect of the embodiment of the invention discloses a route forwarding method, which is applied to a route forwarding gateway device and comprises the following steps:
receiving a request to be processed, wherein the request to be processed is uploaded by a client, and the request to be processed at least comprises an identifier which is used for indicating the client to which the identifier belongs;
judging whether the request to be processed belongs to the current data center or not according to a preset routing rule and the identifier;
if not, determining a target data center corresponding to the request to be processed, and forwarding the request to be processed to the target data center;
if yes, sending the request to be processed to a route forwarding judgment device, enabling the route forwarding judgment device to judge the type of the request to be processed, determining a target service corresponding to the request to be processed according to the type, and forwarding the request to be processed to the target service for processing.
Optionally, the process of presetting the routing rule includes:
and distinguishing the client by using the physical address of the client, and using the physical address as the unique judgment identifier of the client.
Optionally, if not, determining a target data center corresponding to the request to be processed, and forwarding the request to be processed to the target data center, including:
if not, determining a target data center corresponding to the request to be processed, and forwarding the request to be processed to the target data center in a communication mode of a hypertext transfer protocol (HTTP).
Optionally, the method further includes:
setting any data center as a main data center;
when any data center is abnormal, switching the flow of the abnormal data center to the main data center;
when the main data center is abnormal, selecting any data center from other normal data centers as the main data center.
The second aspect of the embodiment of the invention discloses a route forwarding method, which is applied to a route forwarding judgment device, and comprises the following steps:
receiving a to-be-processed request sent by a route forwarding gateway device, wherein the to-be-processed request is sent to the route forwarding gateway device by a client, and is sent by the route forwarding gateway device after the route forwarding gateway device judges that the to-be-processed request belongs to a current data center, and the to-be-processed request at least comprises an identifier which is used for indicating the client to which the to-be-processed request belongs;
judging the type of the request to be processed;
and determining a target service corresponding to the request to be processed according to the type, and forwarding the request to be processed to the target service for processing.
The third aspect of the embodiment of the present invention discloses a route forwarding device, which is applied to a route forwarding gateway device, and the device includes:
the system comprises a receiving module, a sending module and a processing module, wherein the receiving module is used for receiving a request to be processed, the request to be processed is sent by a client, the request to be processed at least comprises an identifier, and the identifier is used for indicating the client to which the request to be processed belongs;
the judging module is used for judging whether the request to be processed belongs to the current data center according to a preset routing rule and the identifier;
the forwarding module is used for determining a target data center corresponding to the request to be processed if the request to be processed is not the target data center, and forwarding the request to be processed to the target data center;
and if so, sending the request to be processed to a route forwarding judgment device, so that the route forwarding judgment device judges the type of the request to be processed, determines a target service corresponding to the request to be processed according to the type, and forwards the request to be processed to the target service for processing.
Optionally, the method further includes: presetting a module;
the preset module is used for distinguishing the client by using the physical address of the client and taking the physical address as the unique judgment identifier of the client.
Optionally, the forwarding module is specifically configured to:
if not, determining a target data center corresponding to the request to be processed, and forwarding the request to be processed to the target data center in a communication mode of a hypertext transfer protocol (HTTP).
Optionally, the method further includes:
the setting module is used for setting any data center as a main data center;
the switching module is used for switching the flow of the abnormal data center to the main data center when any data center is abnormal;
and the election module is used for electing any data center from other normal data centers as the main data center when the main data center is abnormal.
The fourth aspect of the present invention discloses a route forwarding apparatus, which is applied to a route forwarding judgment device, and the apparatus includes:
the system comprises a receiving module, a sending module and a processing module, wherein the receiving module is used for receiving a to-be-processed request sent by a route forwarding gateway device, the to-be-processed request is sent to the route forwarding gateway device by a client, and is sent by the route forwarding gateway device after the route forwarding gateway device judges that the to-be-processed request belongs to a current data center, the to-be-processed request at least comprises an identifier, and the identifier is used for indicating the client to which the to-be-processed request belongs;
the judging module is used for judging the type of the request to be processed;
and the forwarding module is used for determining a target service corresponding to the request to be processed according to the type and forwarding the request to be processed to the target service for processing.
Based on the foregoing method and apparatus for route forwarding provided in an embodiment of the present invention, the method is applied to a route forwarding gateway device, and the method includes: receiving a request to be processed, wherein the request to be processed is uploaded by a client, and the request to be processed at least comprises an identifier which is used for indicating the client to which the identifier belongs; judging whether the request to be processed belongs to the current data center or not according to a preset routing rule and the identifier; if not, determining a target data center corresponding to the request to be processed, and forwarding the request to be processed to the target data center; if yes, sending the request to be processed to a route forwarding judgment device, enabling the route forwarding judgment device to judge the type of the request to be processed, determining a target service corresponding to the request to be processed according to the type, and forwarding the request to be processed to the target service for processing. In the scheme, when a request to be processed is received, if the request to be processed is judged not to belong to the current data center, after a target data center corresponding to the request to be processed is determined, the request to be processed is forwarded to the target data center, and if the request to be processed is judged to belong to the current data center, the request to be processed is sent to the route forwarding judgment device, so that the route forwarding judgment device forwards the request to be processed to a target service for processing, and therefore the overall availability and reliability of the data center are improved after the multiple data centers are deployed, and the data center switching is guaranteed to be realized in a non-sensible manner by a client.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flowchart of a route forwarding method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of another route forwarding method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a route forwarding apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of another route forwarding device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
In this application, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein.
The route forwarding method and the route forwarding device provided by the invention can be used in the financial field or other fields, for example, can be used in the route forwarding application scenario in the financial field. The other fields are arbitrary fields other than the financial field, for example, the field of route processing. The foregoing is merely an example, and does not limit the application field of the routing forwarding method and apparatus provided in the present invention.
As known in the background art, the existing solution using the dual-active data center solves the problem of the failure of the entire system, however, the solution of the dual-active data center has a plurality of different solutions for the routing policy of the system for processing the request, and most of the online systems do not have a uniform solution for the routing policy of the system for dual-active. Routing strategies generally rely on a uniform routing forwarding module, and no matter whether the module is deployed in any data center, when the data center fails, all routing strategies fail.
Therefore, in the present invention, when a to-be-processed request is received, if it is determined that the to-be-processed request does not belong to a current data center, after a target data center corresponding to the to-be-processed request is determined, the to-be-processed request is forwarded to the target data center, and if it is determined that the to-be-processed request belongs to the current data center, the to-be-processed request is sent to a route forwarding determination device, so that the route forwarding determination device forwards the to-be-processed request to a target service for processing, thereby improving overall availability and reliability of the data center after deployment of multiple data centers, and ensuring that a client end realizes data center switching without feeling.
Fig. 1 is a schematic flow chart of a route forwarding method according to an embodiment of the present invention.
The route forwarding method is applied to the route forwarding gateway equipment.
The route forwarding method mainly comprises the following steps:
step S101: a pending request is received.
In step S101, a pending request is uploaded by the client.
The pending request at least comprises an identifier, and the identifier is used for indicating the client to which the pending request belongs.
In the process of implementing step S101 specifically, a route forwarding gateway device is deployed in each data center, and a client forwards a request to be processed to a route forwarding gateway device deployed in any data center, so that the route forwarding gateway device receives the request to be processed.
Step S102: and judging whether the request to be processed belongs to the current data center or not according to a preset routing rule and an identifier, if not, executing a step S103, and if so, executing a step S104.
In the process of implementing step S102 specifically, after receiving the request to be processed, the route forwarding gateway device obtains a preset routing rule, and determines whether the request to be processed belongs to the current data center according to the routing rule and the identifier, if not, it indicates that the request to be processed belongs to another data center except the current data center, step S103 is executed, and if yes, step S104 is executed.
Optionally, a process for presetting a multi-write rule according to an embodiment of the present invention includes:
and distinguishing the clients by using the physical addresses of the clients, and using the physical addresses as unique judgment identifications of the clients.
In the embodiment of the present invention, the physical address of the client is a mac (Media Access Control) address of the client.
And the mac address is used as the unique judged identifier for different clients.
It can be understood that, according to a preset routing rule, the belonging client indicated by the identifier is determined, and whether the identifier is a physical address of the belonging client is determined, that is, whether the identifier is a mac address of the belonging client is determined, if yes, it is determined that the request to be processed belongs to the current data center, and if not, it is determined that the request to be processed belongs to other data centers except the current data center.
That is to say, after receiving a request with a client identifier, the route forwarding gateway device first determines that the request belongs to a certain data center according to the identifier in the request, and forwards the request to the data center for processing after the determination is completed.
Step S103: and determining a target data center corresponding to the request to be processed, and forwarding the request to be processed to the target data center.
In the process of implementing step S103 specifically, when it is determined that the request to be processed does not belong to the current data center according to the preset routing rule and the preset identifier, a target data center corresponding to the request to be processed is determined, that is, a target data center to which the request to be processed belongs is determined in other data centers except the current data center, and the request to be processed is forwarded to the target data center.
Optionally, in a specific embodiment, a target data center corresponding to the request to be processed is determined, and the request to be processed is forwarded to the target data center in a hypertext transfer protocol HTTP communication manner.
Step S104: and sending the request to be processed to the route forwarding judgment device, so that the route forwarding judgment device judges the type of the request to be processed, determines a target service corresponding to the request to be processed according to the type, and forwards the request to be processed to the target service for processing.
In the process of implementing step S104, the route forwarding gateway device sends the request to be processed to the route forwarding judgment device, and the route forwarding judgment device receives the request to be processed, judges the type of the request to be processed, determines a target service corresponding to the request to be processed according to the type of the request to be processed, and forwards the request to be processed to the target service for processing.
Based on the above description, it can be understood that the route forwarding gateway device determines that all the uploaded requests in the clients include the identifier of the corresponding client, if the uploaded requests do not belong to the current data center, the request is automatically forwarded to the corresponding data center, if the uploaded requests belong to the current data center, the request is sent to the route forwarding determination device, and the route forwarding determination device determines the type of the request and forwards the request to the corresponding service for processing.
Step S105: and setting any data center as a main data center.
In the process of implementing step S105 specifically, in order to ensure that all data center anomalies can be handled in time, if a master data center is set for data processing, any data center is set as the master data center, or in order to perform fast switching and data center failure, one master data center needs to be designated.
It should be noted that the master data center sets a heartbeat with the route forwarding gateway devices on all other data centers at regular time.
Step S106: and judging whether any data center is abnormal or not, if so, executing step S107, and if not, normally performing routing forwarding operation.
In the process of implementing step S106, it is determined whether any data center is abnormal, if yes, step S107 is executed, and if no, it is described that any data center is normal, and the routing forwarding operation may be performed normally.
Step S107: and switching the flow of the abnormal data center to the main data center.
In the process of specifically implementing step S107, when it is determined that any data center is abnormal, the abnormal data center is determined, and the traffic of the abnormal data center is switched to the master data center.
It can be appreciated that when a heartbeat becomes abnormal, the primary data center automatically takes over all traffic for the abnormal data center.
Step S108: and judging whether the main data center is abnormal or not, if so, executing the step S109, and if not, normally performing routing forwarding operation.
In the process of implementing step S108, it is determined whether the primary data center is abnormal, if so, step S109 is executed, otherwise, it is described that the primary data center is normal, and the routing forwarding operation may be performed normally.
Step S109: and selecting any data center from other normal data centers as a main data center.
In the process of specifically implementing step S109, when it is determined that the primary data center is abnormal, any data center is selected from other normal data centers as the primary data center.
It can be understood that when the heartbeat request is not received from the main data center for a long time, the main data center alarms to inform maintenance personnel, and any one of the other data centers is automatically elected as the main data center.
The routing forwarding method provided by the embodiment of the invention is applied to the routing forwarding gateway equipment, and the to-be-processed request is sent by a client by receiving the to-be-processed request, wherein the to-be-processed request at least comprises an identifier which is used for indicating the client to which the to-be-processed request belongs; judging whether the request to be processed belongs to the current data center or not according to a preset routing rule and an identifier; if not, determining a target data center corresponding to the request to be processed, and forwarding the request to be processed to the target data center; if so, sending the request to be processed to the route forwarding judgment device, enabling the route forwarding judgment device to judge the type of the request to be processed, determining a target service corresponding to the request to be processed according to the type, and forwarding the request to be processed to the target service for processing. In the scheme, when a request to be processed is received, if the request to be processed is judged not to belong to the current data center, the request to be processed is forwarded to the target data center after the target data center corresponding to the request to be processed is determined, and if the request to be processed is judged to belong to the current data center, the request to be processed is sent to the route forwarding judgment device, so that the route forwarding judgment device forwards the request to be processed to the target service for processing, thereby improving the overall availability and reliability of the data center after the deployment of multiple data centers and ensuring that a client end realizes data center switching in a non-sensible manner.
Based on the above-mentioned route forwarding method provided by the embodiment of the present invention, as shown in fig. 2, it is a schematic flow chart of another route forwarding method provided by the embodiment of the present invention, where the route forwarding method is applied to a route forwarding judgment device, and the route forwarding method mainly includes the following steps:
step S201: and receiving a request to be processed sent by the route forwarding gateway equipment.
In step S201, the pending request is sent to the routing forwarding gateway device from the client, and after the routing forwarding gateway device determines that the pending request belongs to the current data center, the pending request is sent by the routing forwarding gateway device.
The pending request at least comprises an identification which is used for indicating the client to which the pending request belongs.
In the process of implementing step S201 specifically, the client sends the request to be processed to the route forwarding gateway device, and the route forwarding gateway device receives the request to be processed, and sends the request to be processed to the route forwarding determination device after determining that the request to be processed belongs to the current data center, and then the route forwarding determination device routes the request to be processed sent by the route forwarding gateway device.
Step S202: and judging the type of the request to be processed.
In the process of implementing step S202 specifically, after receiving the request to be processed, the route forwarding determination device determines the type of the request to be processed, so as to obtain the type corresponding to the request to be processed.
Step S203: and according to the type, determining a target service corresponding to the request to be processed, and forwarding the request to be processed to the target service for processing.
In the process of implementing step S203 specifically, the route forwarding determination device determines a target service corresponding to the request to be processed according to the obtained type corresponding to the request to be processed, and forwards the request to be processed to the target service for processing.
The route forwarding method provided by the embodiment of the invention is applied to the route forwarding judgment device, judges the type of the request to be processed after receiving the request to be processed sent by the route forwarding gateway device, determines the target service corresponding to the request to be processed according to the obtained type, and forwards the request to be processed to the target service for processing, so that the overall availability and reliability of the data center are improved after the multiple data centers are deployed, and the data center switching is realized without a client side feeling.
Corresponding to the above-described route forwarding method shown in fig. 1 in the embodiment of the present invention, an embodiment of the present invention further provides a route forwarding apparatus, as shown in fig. 3, where the route forwarding apparatus is applied to a route forwarding gateway device, and the route forwarding apparatus includes: a receiving module 31, a judging module 32, a forwarding module 33 and a sending module 34.
The receiving module 31 is configured to receive a pending request.
The pending request is sent by the client, and the pending request at least comprises an identifier which is used for indicating the client to which the pending request belongs.
And the judging module 32 is configured to judge whether the request to be processed belongs to the current data center according to a preset routing rule and a preset identifier.
And the forwarding module 33 is configured to determine, if the request to be processed does not correspond to the target data center, and forward the request to be processed to the target data center.
If yes, the sending module 34 is configured to send the request to be processed to the route forwarding determination device, so that the route forwarding determination device determines the type of the request to be processed, determines a target service corresponding to the request to be processed according to the type, and forwards the request to be processed to the target service for processing.
Optionally, based on the routing forwarding apparatus shown in fig. 3, in combination with fig. 3, the routing forwarding apparatus is further provided with a preset module.
And the presetting module is used for distinguishing the clients by using the physical addresses of the clients and taking the physical addresses as the unique judgment identifiers of the clients.
Optionally, based on the forwarding module 33 shown in fig. 3, the forwarding module 33 is specifically configured to:
if not, determining a target data center corresponding to the request to be processed, and forwarding the request to be processed to the target data center in a communication mode of a hypertext transfer protocol (HTTP).
Optionally, based on the routing forwarding apparatus shown in fig. 3, in combination with fig. 3, the routing forwarding apparatus is further provided with a setting module, a switching module, and an election module.
And the setting module is used for setting any data center as a main data center.
And the switching module is used for switching the flow of the abnormal data center to the main data center when any data center is abnormal.
And the election module is used for electing any data center from other normal data centers as the main data center when the main data center is abnormal.
It should be noted that, the specific principle and the execution process of each module in the route forwarding apparatus disclosed in the foregoing embodiment of the present invention are the same as the route forwarding method implemented by the foregoing embodiment of the present invention, and reference may be made to corresponding parts in the route forwarding method disclosed in the foregoing embodiment of the present invention, which are not described herein again.
The routing forwarding device provided by the embodiment of the invention is applied to the routing forwarding gateway equipment, and receives the to-be-processed request which is uploaded by a client, wherein the to-be-processed request at least comprises an identifier which is used for indicating the client to which the to-be-processed request belongs; judging whether the request to be processed belongs to the current data center or not according to a preset routing rule and an identifier; if not, determining a target data center corresponding to the request to be processed, and forwarding the request to be processed to the target data center; if so, sending the request to be processed to the route forwarding judgment device, enabling the route forwarding judgment device to judge the type of the request to be processed, determining a target service corresponding to the request to be processed according to the type, and forwarding the request to be processed to the target service for processing. In the scheme, when a request to be processed is received, if the request to be processed is judged not to belong to the current data center, after a target data center corresponding to the request to be processed is determined, the request to be processed is forwarded to the target data center, and if the request to be processed is judged to belong to the current data center, the request to be processed is sent to the route forwarding judgment device, so that the route forwarding judgment device forwards the request to be processed to a target service for processing, and therefore the overall availability and reliability of the data center are improved after the multiple data centers are deployed, and the data center switching is guaranteed to be realized in a non-sensible manner by a client.
Corresponding to the above-mentioned route forwarding method shown in fig. 2 in the embodiment of the present invention, an embodiment of the present invention further provides a route forwarding apparatus, as shown in fig. 4, where the route forwarding is applied to the route forwarding judgment device, and the route forwarding apparatus includes: a receiving module 41, a judging module 42 and a forwarding module 43.
The receiving module 41 is configured to receive a pending request sent by the route forwarding gateway device.
The to-be-processed request is sent to the route forwarding gateway device by the client, and is sent by the route forwarding gateway device after the route forwarding gateway device judges that the to-be-processed request belongs to the current data center, wherein the to-be-processed request at least comprises an identifier which is used for indicating the client to which the to-be-processed request belongs.
And a judging module 42, configured to judge a type of the pending request.
And a forwarding module 43, configured to determine, according to the type, a target service corresponding to the request to be processed, and forward the request to be processed to the target service for processing.
It should be noted that, the specific principle and the execution process of each module in the route forwarding apparatus disclosed in the foregoing embodiment of the present invention are the same as the route forwarding method implemented by the foregoing embodiment of the present invention, and reference may be made to corresponding parts in the route forwarding method disclosed in the foregoing embodiment of the present invention, which are not described herein again.
The route forwarding device provided by the embodiment of the invention is applied to the route forwarding judgment equipment, judges the type of the request to be processed after receiving the request to be processed sent by the route forwarding gateway equipment, determines the target service corresponding to the request to be processed according to the obtained type, and forwards the request to be processed to the target service for processing, so that the overall availability and reliability of the data center are improved after the multiple data centers are deployed, and the data center switching is realized without a client side feeling.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the system or system embodiments, which are substantially similar to the method embodiments, are described in a relatively simple manner, and reference may be made to some descriptions of the method embodiments for relevant points. The above-described system and system embodiments are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the components and steps of the various examples have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A route forwarding method is applied to a route forwarding gateway device, and comprises the following steps:
receiving a request to be processed, wherein the request to be processed is uploaded by a client, and the request to be processed at least comprises an identifier which is used for indicating the client to which the identifier belongs;
judging whether the request to be processed belongs to the current data center or not according to a preset routing rule and the identifier;
if not, determining a target data center corresponding to the request to be processed, and forwarding the request to be processed to the target data center;
if yes, sending the request to be processed to a route forwarding judgment device, enabling the route forwarding judgment device to judge the type of the request to be processed, determining a target service corresponding to the request to be processed according to the type, and forwarding the request to be processed to the target service for processing.
2. The method according to claim 1, wherein the process of presetting the routing rule comprises:
and distinguishing the client by using the physical address of the client, and using the physical address as the unique judgment identifier of the client.
3. The method according to claim 1, wherein, if no, determining a target data center corresponding to the request to be processed, and forwarding the request to be processed to the target data center includes:
if not, determining a target data center corresponding to the request to be processed, and forwarding the request to be processed to the target data center in a communication mode of a hypertext transfer protocol (HTTP).
4. The method of claim 1, further comprising:
setting any data center as a main data center;
when any data center is abnormal, switching the flow of the abnormal data center to the main data center;
and when the main data center is abnormal, selecting any data center from other normal data centers as the main data center.
5. A route forwarding method is applied to a route forwarding judgment device, and comprises the following steps:
receiving a to-be-processed request sent by a route forwarding gateway device, wherein the to-be-processed request is sent to the route forwarding gateway device by a client, and is sent by the route forwarding gateway device after the route forwarding gateway device judges that the to-be-processed request belongs to a current data center, and the to-be-processed request at least comprises an identifier which is used for indicating the client to which the to-be-processed request belongs;
judging the type of the request to be processed;
and determining a target service corresponding to the request to be processed according to the type, and forwarding the request to be processed to the target service for processing.
6. A route forwarding device applied to a route forwarding gateway apparatus, the device comprising:
the system comprises a receiving module, a sending module and a processing module, wherein the receiving module is used for receiving a request to be processed, the request to be processed is sent by a client, the request to be processed at least comprises an identifier, and the identifier is used for indicating the client to which the request to be processed belongs;
the judging module is used for judging whether the request to be processed belongs to the current data center according to a preset routing rule and the identifier;
the forwarding module is used for determining a target data center corresponding to the request to be processed if the request to be processed is not the target data center, and forwarding the request to be processed to the target data center;
and if so, sending the request to be processed to a route forwarding judgment device, so that the route forwarding judgment device judges the type of the request to be processed, determines a target service corresponding to the request to be processed according to the type, and forwards the request to be processed to the target service for processing.
7. The apparatus of claim 6, further comprising: a presetting module;
the preset module is used for distinguishing the client by using the physical address of the client and taking the physical address as the unique judgment identifier of the client.
8. The apparatus according to claim 6, wherein the forwarding module is specifically configured to:
if not, determining a target data center corresponding to the request to be processed, and forwarding the request to be processed to the target data center in a communication mode of a hypertext transfer protocol (HTTP).
9. The apparatus of claim 6, further comprising:
the setting module is used for setting any data center as a main data center;
the switching module is used for switching the flow of the abnormal data center to the main data center when any data center is abnormal;
and the election module is used for electing any data center from other normal data centers to serve as the main data center when the main data center is abnormal.
10. A route forwarding apparatus applied to a route forwarding determination device, the apparatus comprising:
a receiving module, configured to receive a to-be-processed request sent by a routing forwarding gateway device, where the to-be-processed request is sent from a client to the routing forwarding gateway device, and is sent by the routing forwarding gateway device after the routing forwarding gateway device determines that the to-be-processed request belongs to a current data center, where the to-be-processed request at least includes an identifier, and the identifier is used to indicate the client to which the to-be-processed request belongs;
the judging module is used for judging the type of the request to be processed;
and the forwarding module is used for determining a target service corresponding to the request to be processed according to the type and forwarding the request to be processed to the target service for processing.
CN202211020146.3A 2022-08-24 2022-08-24 Route forwarding method and device Pending CN115396364A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211020146.3A CN115396364A (en) 2022-08-24 2022-08-24 Route forwarding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211020146.3A CN115396364A (en) 2022-08-24 2022-08-24 Route forwarding method and device

Publications (1)

Publication Number Publication Date
CN115396364A true CN115396364A (en) 2022-11-25

Family

ID=84122832

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211020146.3A Pending CN115396364A (en) 2022-08-24 2022-08-24 Route forwarding method and device

Country Status (1)

Country Link
CN (1) CN115396364A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729176A (en) * 2017-09-14 2018-02-23 北京京东尚科信息技术有限公司 The disaster recovery method and disaster tolerance system of a kind of profile management systems
CN110535976A (en) * 2019-09-27 2019-12-03 杭州迪普科技股份有限公司 A kind of session keeping method and device
CN112187738A (en) * 2020-09-11 2021-01-05 中国银联股份有限公司 Service data access control method, device and computer readable storage medium
CN112380072A (en) * 2020-12-07 2021-02-19 中国建设银行股份有限公司 Multi-data center access method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729176A (en) * 2017-09-14 2018-02-23 北京京东尚科信息技术有限公司 The disaster recovery method and disaster tolerance system of a kind of profile management systems
CN110535976A (en) * 2019-09-27 2019-12-03 杭州迪普科技股份有限公司 A kind of session keeping method and device
CN112187738A (en) * 2020-09-11 2021-01-05 中国银联股份有限公司 Service data access control method, device and computer readable storage medium
CN112380072A (en) * 2020-12-07 2021-02-19 中国建设银行股份有限公司 Multi-data center access method and system

Similar Documents

Publication Publication Date Title
KR100810139B1 (en) System and method for maximizing connectivity during network failures in a cluster system, computer-readable recording medium having computer program embedded thereon for executing the same method
CN112671882B (en) Same-city double-activity system and method based on micro-service
EP2066101B1 (en) System and method for an improved high availability component implementation
US8472311B2 (en) Systems, methods, and computer readable media for providing instantaneous failover of packet processing elements in a network
CN102025630A (en) Load balancing method and load balancing system
CN101094102A (en) Main and standby switching method and route standby system for route device
CN107508694B (en) Node management method and node equipment in cluster
WO2020119328A1 (en) Data transmission method, apparatus and device, and storage medium
CN112925620A (en) Distributed task scheduling system and method
CN102333027A (en) Traffic load sharing realization method based on virtual router redundancy protocol extend (VRRPE) backup group and realization apparatus thereof
CN113347037B (en) Data center access method and device
CN106411585A (en) Server switching method, adapter, server and scheduling device
CN111030926B (en) Method and device for improving high availability of network
CN106452882B (en) Backup switching method and system for universal network passport server
US7738362B2 (en) System and method for address notification in a network
CN115396364A (en) Route forwarding method and device
CN105227455A (en) A kind of method and system of batch user web authentication active-standby switch
CN113992685B (en) Service controller determining method, system and device
CN113824595B (en) Link switching control method and device and gateway equipment
CN109120520A (en) A kind of fault handling method and equipment
CN101335655B (en) Safety information communicating method, device and system
JP2014032576A (en) Multiplexing method of network device or server device
CN114051059B (en) IDC transaction cross-domain decision method of remote double-activity system
CN113595760B (en) System fault processing method and device
US20090125587A1 (en) Management System, Device for Use in the System, Program Therefor, and Management Method

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