CN111371684A - Routing processing method and device and double-activity data center system - Google Patents

Routing processing method and device and double-activity data center system Download PDF

Info

Publication number
CN111371684A
CN111371684A CN202010135655.5A CN202010135655A CN111371684A CN 111371684 A CN111371684 A CN 111371684A CN 202010135655 A CN202010135655 A CN 202010135655A CN 111371684 A CN111371684 A CN 111371684A
Authority
CN
China
Prior art keywords
request
service
identifier
service instance
determining
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
CN202010135655.5A
Other languages
Chinese (zh)
Other versions
CN111371684B (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.)
Postal Savings Bank of China Ltd
Original Assignee
Postal Savings 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 Postal Savings Bank of China Ltd filed Critical Postal Savings Bank of China Ltd
Priority to CN202010135655.5A priority Critical patent/CN111371684B/en
Publication of CN111371684A publication Critical patent/CN111371684A/en
Application granted granted Critical
Publication of CN111371684B publication Critical patent/CN111371684B/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/302Route determination based on requested QoS
    • H04L45/306Route determination based on the nature of the carried application

Abstract

The disclosure relates to a routing processing method and device, a double-activity data center system and a computer storage medium, and relates to the technical field of computers. The routing processing method comprises the following steps: receiving a service request, wherein the service request comprises a request mechanism identifier and a request application identifier; analyzing the service request to obtain the request mechanism identifier and the request application identifier; determining a target service instance corresponding to the service request according to the request mechanism identifier and the request application identifier; and carrying out routing processing on the service request according to the target service instance. According to the method and the device, the service requester is provided with the differentiated service, and meanwhile, the user experience of the service requester is improved.

Description

Routing processing method and device and double-activity data center system
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a routing processing method and apparatus, a dual active data center system, and a computer-readable storage medium.
Background
When a service demander initiates a service request, service instances provided by a service provider to a user are different due to different request time and different service requirements, so that the problems of multi-version service and differentiated service are involved.
In the related art, when a service demander initiates a service request, a service name and a version number are added to the service request, so that a service provider routes the service request to a corresponding service instance according to the service name and the version number.
Disclosure of Invention
The inventor thinks that: in the related art, a service demander adds a service name and a version number to a service request, and the user experience is poor.
In view of the above technical problems, the present disclosure provides a solution, which improves user experience of a service requester while providing differentiated services for the service requester.
According to a first aspect of the present disclosure, there is provided a route processing method, including: receiving a service request, wherein the service request comprises a request mechanism identifier and a request application identifier; analyzing the service request to obtain the request mechanism identifier and the request application identifier; determining a target service instance corresponding to the service request according to the request mechanism identifier and the request application identifier; and carrying out routing processing on the service request according to the target service instance.
In some embodiments, determining the target service instance corresponding to the service request according to the request mechanism identifier and the request application identifier comprises: determining a general attribute corresponding to a request mechanism identifier according to a corresponding relation between the request mechanism identifier and the general attribute, wherein the general attribute comprises general attribute and non-general attribute; determining the general attribute corresponding to the request mechanism identification as the general attribute of the target service instance corresponding to the request mechanism identification; and determining the target service instance corresponding to the service request according to the general attribute of the target service instance corresponding to the request mechanism identifier, the request mechanism identifier and the request application identifier.
In some embodiments, the service request further includes a transaction code, and determining the target service instance corresponding to the service request according to the requesting authority identifier and the requesting application identifier includes: and determining a target service instance corresponding to the service request according to the request mechanism identifier, the request application identifier and the transaction code.
In some embodiments, determining a target service instance corresponding to the service request based on the requesting authority identification, the requesting application identification, and the transaction code comprises determining generic attributes of the target service instance corresponding to the service request based on the requesting authority identification and the transaction code, the generic attributes comprising generic and non-generic; and determining the target service instance corresponding to the service request according to the general attribute of the target service instance corresponding to the service request, the request mechanism identifier and the request application identifier.
In some embodiments, determining a generic attribute of a target service instance corresponding to the service request based on the requesting authority identification and the transaction code comprises: determining a process definition file identifier corresponding to the service request according to the request mechanism identifier and the transaction code; determining a general attribute corresponding to the flow definition file identification according to the corresponding relation between the flow definition file identification and the general attribute; and determining the general attribute corresponding to the flow definition file identification as the general attribute of the target service instance corresponding to the service request.
In some embodiments, determining the target service instance corresponding to the service request according to the generic attribute of the target service instance corresponding to the service request, the request mechanism identifier and the request application identifier comprises: determining at least one candidate service instance corresponding to the general attribute of the target service instance corresponding to the service request according to the corresponding relation between the service instance and the general attribute; and determining a target service instance corresponding to the service request from the at least one candidate service instance according to the corresponding relation among the request mechanism identifier, the request application identifier and the service instance.
In some embodiments, according to the correspondence between the request mechanism identifier, the request application identifier and the service instance, determining a target service instance corresponding to the service request from the at least one candidate service instance: determining candidate service instances corresponding to the request mechanism identifier and the request application identifier according to the corresponding relation between the request mechanism identifier, the request application identifier and the service instances; and determining a candidate service instance in an available state from candidate service instances corresponding to the request mechanism identification and the request application identification as the target service instance.
In some embodiments, determining a candidate service instance in an available state from among candidate service instances corresponding to the requesting authority identification and the requesting application identification comprises, as the target service instance: and determining candidate service instances in an available state from candidate service instances corresponding to the request mechanism identifier and the request application identifier according to state information of the registered service instances in the registration center, wherein the state information comprises an available state and an unavailable state as the target service instance.
In some embodiments, in a live-active data center scenario, routing the service request according to the target service instance includes determining a data center identifier corresponding to a request mechanism identifier according to a correspondence between the request mechanism identifier and the data center identifier; routing the service request to a target service instance within a data center corresponding to the data center identification.
In some embodiments, the correspondence between the request mechanism identifier and the generic attribute, the correspondence between the process definition file identifier and the generic attribute, the correspondence between the service instance and the generic attribute, the correspondence between the request mechanism identifier, the request application identifier and the service instance, and the correspondence between the request mechanism identifier and the data center identifier are all stored in a remote dictionary service Redis.
In some embodiments, the route processing method further includes: before the service request is analyzed, judging whether a server side domain name corresponding to the service request exists according to the corresponding relation between the service request stored in a remote dictionary service Redis and the server side domain name; and under the condition that the server side domain name corresponding to the service request exists in the Redis, analyzing the service request.
In some embodiments, the route processing method further includes: under the condition that the server side domain name corresponding to the service request does not exist in the Redis, judging whether the server side domain name corresponding to the service request exists according to the corresponding relation between the service request and the server side domain name stored in the relational database; and under the condition that the server side domain name corresponding to the service request exists in the relational database, analyzing the service request.
In some embodiments, routing the service request according to the target service instance includes, in the case that there are a plurality of target service instances, routing the service request to one of the target service instances using a polling policy.
In some embodiments, in a dual-active data center scenario, the route processing method is performed by a gateway of the data center closest to the originating location of the service request.
According to a second aspect of the present disclosure, there is provided a route processing apparatus including: a receiving module configured to receive a service request, the service request including a requesting authority identification and a requesting application identification; the analysis module is configured to analyze the service request to obtain the request mechanism identifier and the request application identifier; a determining module configured to determine a target service instance corresponding to the service request according to the request mechanism identifier and the request application identifier; and the routing processing module is configured to perform routing processing on the service request according to the target service instance.
According to a third aspect of the present disclosure, there is provided a route processing apparatus, including: a memory; and a processor coupled to the memory, the processor configured to execute the routing processing method of any of the above embodiments based on instructions stored in the memory.
According to a fourth aspect of the present disclosure, there is provided a dual activity data center system comprising: the first data center and the second data center respectively comprise the route processing device of any one of the above embodiments.
In some embodiments, the first data center and the second data center further include at least one registration center, respectively, and any one of the registration centers is configured to store, according to the received registration request, a correspondence between a service name and an identifier of a service instance to the any one registration center, and store the correspondence between the service name and the identifier of the service instance to the other registration centers except the any one registration center in the first data center and the second data center synchronously.
According to a fifth aspect of the present disclosure, there is provided a computer-storable medium having stored thereon computer program instructions which, when executed by a processor, implement the method of routing processing according to any of the embodiments described above.
In the embodiment, the service requester is provided with the differentiated service, and the user experience of the service requester is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description, serve to explain the principles of the disclosure.
The present disclosure may be more clearly understood from the following detailed description, taken with reference to the accompanying drawings, in which:
fig. 1 illustrates a flow diagram of a routing processing method according to some embodiments of the present disclosure;
FIG. 2 illustrates a logical block diagram between a route processing device, a service request system, a target service instance, according to some embodiments of the present disclosure;
FIG. 3 illustrates a flow diagram of a method of route processing according to further embodiments of the present disclosure;
FIG. 4 illustrates a block diagram of a route processing device, according to some embodiments of the present disclosure;
FIG. 5 shows a block diagram of a route processing device, according to further embodiments of the present disclosure;
FIG. 6 illustrates a block diagram of a dual activity data center system, according to some embodiments of the present disclosure;
FIG. 7 illustrates an architectural schematic of a dual activity data center system according to some embodiments of the present disclosure;
FIG. 8 illustrates a block diagram of a computer system for implementing some embodiments of the present disclosure.
Detailed Description
Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
The routing processing method according to some embodiments of the present disclosure will be described in detail below with reference to fig. 1 and 2.
Fig. 1 illustrates a flow diagram of a routing processing method according to some embodiments of the present disclosure.
Figure 2 illustrates a logical block diagram between a route processing device, a service request system, a target service instance, according to some embodiments of the present disclosure.
As shown in fig. 1, the routing processing method includes steps S110 to S140. For example, the route processing method is performed by the gateway. Specifically, in a dual-active data center scenario, the routing processing method is performed by the gateway of the data center closest to the originating location of the service request. The double-activity data center is two data centers which are in an operating state at the same time. For example, two data centers are deployed in different cities to form a same-city different-place dual-activity data center.
In step S110, a service request is received. The service request includes a requesting authority identification and a requesting application identification. For example, the requesting authority identification is an identification of the authority that initiated the service request. The requesting application identification is an identification of the application that initiated the service request. In particular, the requesting application identification may be represented by a system number.
Specifically, the service request from the service request system 22 is received by the front interceptor 211 in the route processing device 21 shown in fig. 2.
In step S120, the service request is parsed to obtain the requesting mechanism identifier and the requesting application identifier. Specifically, the service request from the service request system 22 is parsed by the front interceptor 211 described in fig. 2. For example, the pre-interceptor 211 shown in fig. 2 is further configured to perform admission authentication, MAC (Media access control Address) verification, and throttling control on the service request before parsing.
Performing admission authentication on the service request is to determine whether the service request is a legal service request. And under the condition that the service request is a legal service request, analyzing the service request. If the service request is an illegal service request, a message such as a request error is returned to the service request system 22.
MAC verification of the service request is to authenticate the service request system 22 with the MAC address as a username and password. And when the authentication is passed, analyzing the service request. In the case where the authentication is not passed, a message such as a request error is returned to the service request system 22.
The flow-limiting control of the service requests is to process a plurality of service requests from a plurality of service request systems 22 in a multi-gateway node manner, and each gateway node processes a corresponding service request according to a flow control mechanism of each gateway node.
In step S130, a target service instance corresponding to the service request is determined according to the request mechanism identifier and the request application identifier.
Determining the target service instance corresponding to the service request according to the request mechanism identifier and the request application identifier is achieved, for example, as follows.
Firstly, according to the corresponding relation between the request mechanism identification and the general attribute, the general attribute corresponding to the request mechanism identification is determined. Generic attributes include generic and non-generic. For example, the request mechanism identification and the correspondence of the common attribute are stored in a Remote Dictionary service (Redis Server).
Then, the general attribute corresponding to the request mechanism identification is determined as the general attribute of the target service instance corresponding to the request mechanism identification. And determining the general attribute of the target service instance corresponding to the service request as general when the general attribute corresponding to the request mechanism identification is general. In the case where the generic attribute corresponding to the request mechanism identification is non-generic, the generic attribute of the target service instance corresponding to the service request is determined to be non-generic. For example, a generic service instance is a service instance with basic functionality. A non-generic service instance is a service instance that has a special function in addition to a basic function. Specifically, the common service instance is a service instance that provides a basic function of the car credit service. The non-general service example is a service example which provides a basic function of the car credit service and provides special functions such as high concurrency. For example, a generic service instance may be named a non-grayscale service instance, and a non-generic service instance may be named a grayscale service instance.
And finally, determining the target service instance corresponding to the service request according to the general attribute of the target service instance corresponding to the request mechanism identifier, the request mechanism identifier and the request application identifier.
For example, the service request also includes a transaction code. In the case where the service request further includes a transaction code, determining the target service instance corresponding to the service request based on the requesting authority identification and the requesting application identification may be accomplished as follows. And determining a target service instance corresponding to the service request according to the request mechanism identifier, the request application identifier and the transaction code.
Specifically, the determination of the target service instance corresponding to the service request is realized according to the request mechanism identifier, the request application identifier and the transaction code in the following manner.
First, a generic attribute of a target service instance corresponding to the service request is determined based on the requesting authority identification and the transaction code. Generic attributes include generic and non-generic. For example, determining the generic attributes of the target service instance corresponding to the service request based on the requesting authority identification and the transaction code includes the following steps. And determining the process definition file identification corresponding to the service request according to the request mechanism identification and the transaction code. Therefore, the general attribute corresponding to the flow definition file identification is determined according to the corresponding relation between the flow definition file identification and the general attribute. And further determining the general attribute corresponding to the flow definition file identification as the general attribute of the target service instance corresponding to the service request. The process definition file is a file defining specific steps of the process. For example, the flow definition file identification and correspondence to the generic attributes are stored in Redis.
And then, determining the target service instance corresponding to the service request according to the general attribute, the request mechanism identification and the request application identification of the target service instance corresponding to the service request.
In particular, whether or not the service request includes a transaction code. Determining the target service instance corresponding to the service request according to the generic attribute of the target service instance corresponding to the service request, the request mechanism identifier and the request application identifier can be achieved as follows.
Firstly, at least one candidate service instance corresponding to the general attribute of the target service instance corresponding to the service request is determined according to the corresponding relation between the service instance and the general attribute. For example, the correspondence of service instances and generic attributes is stored in Redis.
And then, according to the corresponding relation of the request mechanism identifier, the request application identifier and the service instance, determining a target service instance corresponding to the service request from at least one candidate service instance. For example, the correspondence of the requesting authority identification, the requesting application identification and the service instance is stored in Redis.
For example, the target service instance corresponding to the service request is determined from at least one candidate service instance according to the corresponding relation between the request mechanism identifier, the request application identifier and the service instance. And determining candidate service instances corresponding to the request mechanism identifier and the request application identifier according to the corresponding relation among the request mechanism identifier, the request application identifier and the service instances. And further determining candidate service instances in an available state from the candidate service instances corresponding to the request mechanism identification and the request application identification as target service instances.
Specifically, the candidate service instance in the available state is determined from the candidate service instances corresponding to the request mechanism identifier and the request application identifier as the target service instance. And determining candidate service instances in an available state in the candidate service instances corresponding to the request mechanism identification and the request application identification as target service instances according to the state information of the registered service instances in the registration center. The status information includes an available status and an unavailable status.
Specifically, step S130 in fig. 1 is executed by the route interceptor 212 in the route processing device 21 in fig. 2.
Returning to fig. 1, in step S140, the service request is routed according to the target service instance.
In a dual-active data center scenario, routing of a service request according to a target service instance may be implemented, for example, as follows.
Firstly, determining a data center identifier corresponding to the request mechanism identifier according to the corresponding relation between the request mechanism identifier and the data center identifier. For example, the correspondence of the requesting authority identification and the data center identification is stored in Redis.
The service request is then routed to a target service instance within the data center corresponding to the data center identification.
Specifically, in the case that there are multiple target service instances, a polling policy is adopted to route the service request to one of the target service instances.
Specifically, step S140 in fig. 1 is executed by the service router 213 in the route processing device 21 in fig. 2. That is, the service router 213 forwards the service request to the corresponding target service instance 23, and the target service instance 23 processes the service request from the service request system 22 and sends the processing result to the post interceptor 214 in the route processing device 21. The back interceptor 214 is configured to package the processing result, generate a response message, and send the response message to the service request system 22.
The flow chart of the routing processing method according to other embodiments of the present disclosure will be described in detail with reference to fig. 3.
Fig. 3 illustrates a flow diagram of a method of route processing according to further embodiments of the present disclosure.
As shown in fig. 3, the routing processing method includes steps S111 to S113 in addition to steps S110 to S140 shown in fig. 1. Only the differences between fig. 3 and fig. 1 will be described below, and the same parts will not be described again.
In step S111, it is determined whether a server-side domain name corresponding to the service request exists according to the correspondence between the service request and the server-side domain name stored in the remote dictionary service Redis. For example, the correspondence between the service request and the server-side domain name in the configuration file in the relational database may be stored into the Redis 216 by the route locator 215 in the route processing apparatus 21 in fig. 2 at regular time intervals. Specifically, the service request is a gateway domain name, and after receiving the gateway domain name, the gateway needs to determine a server-side domain name corresponding to the gateway domain name according to the gateway domain name. Compared with a mode of storing the corresponding relation by using the configuration file, the method and the system have the advantage that the corresponding relation between the service request and the server side domain name is stored in Redis, so that the routing processing efficiency is improved.
If the server-side domain name corresponding to the service request exists in the Redis, step S120 is executed to resolve the service request.
In a case where the server-side domain name corresponding to the service request does not exist in the Redis, step S112 is performed. In step S112, it is determined whether or not a server-side domain name corresponding to the service request exists, based on the correspondence between the service request and the server-side domain name stored in the relational database. According to the method and the device, the route processing efficiency is improved, meanwhile, the accuracy of the route processing is guaranteed, and the problem that the corresponding relation stored in the Redis due to the Redis cache time difference is not updated in time is solved.
If the server-side domain name corresponding to the service request exists in the relational database, step S120 is executed to parse the service request.
For example, the routing processing method further includes step S113. If the server-side domain name corresponding to the service request does not exist in the relational database, step S113 is executed. In step S113, a message such as a request error is returned.
The routing processing method disclosed by the invention determines the target service instance corresponding to the service request according to the existing parameters such as the request mechanism identifier, the request application identifier and the like in the service request. The differentiated service can be realized without additionally adding information such as service names, version numbers and the like in the service request. The service requester is provided with differentiated services, and the user experience of the service requester is improved.
Fig. 4 illustrates a block diagram of a route processing device, according to some embodiments of the present disclosure.
As shown in fig. 4, the route processing device 41 includes a receiving module 411, a parsing module 412, a determining module 413, and a route processing module 414.
The receiving module 411 is configured to receive a service request, for example, perform step S110 as shown in fig. 1. The service request includes a requesting authority identification and a requesting application identification.
The parsing module 412 is configured to parse the service request, resulting in the requesting authority identification and the requesting application identification, for example, to perform step S120 as shown in fig. 1.
The determining module 413 is configured to determine the target service instance corresponding to the service request according to the request authority identity and the request application identity, for example, to perform step S130 shown in fig. 1.
The routing processing module 414 is configured to perform routing processing on the service request according to the target service instance, for example, execute step S140 shown in fig. 1.
Fig. 5 illustrates a block diagram of a route processing device, according to further embodiments of the present disclosure.
As shown in fig. 5, the route processing device 51 includes a memory 511; and a processor 512 coupled to the memory 511, wherein the memory 511 is used for storing instructions for executing the corresponding embodiment of the routing processing method. The processor 512 is configured to perform the routing processing method in any of the embodiments of the present disclosure based on instructions stored in the memory 511.
Fig. 6 illustrates a block diagram of a dual activity data center system, according to some embodiments of the present disclosure.
As shown in fig. 6, the dual activity data center system 6 includes a first data center 6A and a second data center 6B. The first data center 6A and the second data center 6B respectively include a route processing device 61A and a route processing device 61B in any of the embodiments of the present disclosure. For example, the first data center 6A is deployed in beijing, and the second data center 6B is deployed in fertile city.
Further, first data center 6A also includes at least one registry 62A, and second data center 6B also includes at least one registry 62B. Any one of the registries is configured to store the corresponding relation between the service name and the identifier of the service instance to the any one of the registries according to the received registration request, and synchronously store the corresponding relation between the service name and the identifier of the service instance to other registries except the any one of the registries in the first data center 61A and the second data center 61B. For example, the identification of the service instance is represented by an IP address and a port number. And the registration efficiency is improved by a synchronous registration mode.
Fig. 7 illustrates an architectural schematic of a dual activity data center system according to some embodiments of the present disclosure.
Fig. 7 differs from the dual activity data center system shown in fig. 6 in that fig. 7 shows a more detailed system architecture of the dual activity data center system 6. Differences between fig. 7 and fig. 6 will be described below, and the same parts will not be described again.
For example, as shown in fig. 7, a first data center 6A in the double data center system 6 includes a plurality of route processing devices 61A, and a second data center 6B includes a plurality of route processing devices 61B. Specifically, the route processing device 61A or the route processing device 61B is named a flow bus. In some embodiments, the flow bus may further implement at least one of access flow control, communication adaptation, load balancing, and pipelining. The multiple routing processing devices can realize load balance and improve the processing efficiency of the double-active data center system. For example, the route processing device is implemented based on a micro service gateway Zuul in a micro service architecture Spring Cloud.
Specifically, a plurality of service instances are respectively deployed on the server of the first data center 6A and the server of the second data center 6B. Specifically, the plurality of service instances includes service instance a1 through service instance AN. The multiple service instances of both data centers are identical. The service instance is used to process the service request.
Further, the first data center 6A includes a first database 63A. Specifically, the first database 63A includes a master database 631A, a first slave database 632A, and a second slave database 633A. The second data center 6B includes a first database 63B. Specifically, the first database 63B includes a master database 631B, a first slave database 632B, and a second slave database 633B. For example, the master database, the first slave database, and the second slave database are all PostGreSQL. The master database, the first slave database and the second slave database are used for realizing synchronous stream replication. The synchronous stream replication is that when the master database commits a transaction, it is required to wait for a WAL (Write-Ahead Logging, pre-Write log system) log to be transferred to the first slave database or the second slave database, and then the replication success can be returned, so that the synchronous stream replication of the master database and the first slave database or the second slave database is realized.
Further, first data center 6A includes a second database 64A. Second data center 6B includes a second database 64B. The second database 64A and the second database 64B are backup databases for implementing asynchronous stream replication. After the asynchronous stream replication is that the master database 631A or the master database 631B commits a transaction, a replication success may be returned without waiting for the WAL log to be transferred to the first slave database 632A or the first slave database 632B, the second slave database 633A or the second slave database 633B, thereby implementing the asynchronous stream replication between the master database and the second database. The second database 64A is used to store the processing data of each service instance in the second data center 6B. The second database 64B is used to store the processing data of each service instance in the first data center 6A.
For example, in a case where none of the master database 631A, the first slave database 632A, and the second slave database 633A is usable, the processing data of the corresponding transaction is acquired from the second database 64B of the second data center 6B, thereby continuing to process the unfinished transaction. Similarly, when the master database 631B, the first slave database 632B, and the second slave database 633B are all unavailable, the processing data of the corresponding transaction is acquired from the second database 64A of the first data center 6A, so as to continue processing the unfinished transaction. Specifically, a disaster in the first data center 6A may cause the master database 631A, the first slave database 632A, and the second slave database 633A to be unusable.
Further, the first data center 6A also includes F5/ESB (F5/Enterprise Service Bus ) 60A. Second data center 6B also includes F5/ESB 60B. The service request may be forwarded to the route processing device 61A or the route processing device 61B via F5/ESB 60A of the first data center 6A or F5/ESB 60B of the second data center 6B. The F5/ESB is used to implement load balancing, deciding to which of a plurality of route processing means to forward a service request specifically. Where F5 is a brand of load balancing product.
FIG. 8 illustrates a block diagram of a computer system for implementing some embodiments of the present disclosure.
As shown in FIG. 8, computer system 80 may take the form of a general purpose computing device. Computer system 80 includes a memory 810, a processor 820, and a bus 800 that connects the various system components.
The memory 810 may include, for example, system memory, non-volatile storage media, and the like. The system memory stores, for example, an operating system, an application program, a Boot Loader (Boot Loader), and other programs. The system memory may include volatile storage media such as Random Access Memory (RAM) and/or cache memory. The non-volatile storage medium stores, for instance, instructions to perform corresponding embodiments of at least one of the routing processes. Non-volatile storage media include, but are not limited to, magnetic disk storage, optical storage, flash memory, and the like.
The processor 820 may be implemented as discrete hardware components, such as a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gates or transistors, or the like. Accordingly, each of the modules, such as the judging module and the determining module, may be implemented by a Central Processing Unit (CPU) executing instructions in a memory for performing the corresponding step, or may be implemented by a dedicated circuit for performing the corresponding step.
The bus 800 may use any of a variety of bus architectures. For example, bus structures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, and Peripheral Component Interconnect (PCI) bus.
The computer system 80 may also include an input-output interface 830, a network interface 840, a storage interface 850, and the like. These interfaces 830, 840, 850 and the memory 810 and the processor 820 may be connected by a bus 800. The input/output interface 830 may provide a connection interface for input/output devices such as a display, a mouse, and a keyboard. The network interface 840 provides a connection interface for various networking devices. The storage interface 850 provides a connection interface for external storage devices such as a floppy disk, a usb disk, and an SD card.
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable apparatus to produce a machine, such that the execution of the instructions by the processor results in an apparatus that implements the functions specified in the flowchart and/or block diagram block or blocks.
These computer-readable program instructions may also be stored in a computer-readable memory that can direct a computer to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart and/or block diagram block or blocks.
The present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects.
By the routing processing method and device, the double-active data center system and the computer-storable medium in the embodiment, the user experience of the service requester is improved while differentiated services are provided for the service requester.
Thus far, a route processing method and apparatus, a dual active data center system, a computer-storable medium according to the present disclosure have been described in detail. Some details that are well known in the art have not been described in order to avoid obscuring the concepts of the present disclosure. It will be fully apparent to those skilled in the art from the foregoing description how to practice the presently disclosed embodiments.

Claims (19)

1. A method of route processing, comprising:
receiving a service request, wherein the service request comprises a request mechanism identifier and a request application identifier;
analyzing the service request to obtain the request mechanism identifier and the request application identifier;
determining a target service instance corresponding to the service request according to the request mechanism identifier and the request application identifier;
and carrying out routing processing on the service request according to the target service instance.
2. The route processing method of claim 1, wherein determining the target service instance corresponding to the service request according to the request mechanism identifier and the request application identifier comprises:
determining a general attribute corresponding to a request mechanism identifier according to a corresponding relation between the request mechanism identifier and the general attribute, wherein the general attribute comprises general attribute and non-general attribute;
determining the general attribute corresponding to the request mechanism identification as the general attribute of the target service instance corresponding to the request mechanism identification;
and determining the target service instance corresponding to the service request according to the general attribute of the target service instance corresponding to the request mechanism identifier, the request mechanism identifier and the request application identifier.
3. The routing processing method of claim 1, wherein the service request further comprises a transaction code, and determining the target service instance corresponding to the service request according to the requesting authority identifier and the requesting application identifier comprises:
and determining a target service instance corresponding to the service request according to the request mechanism identifier, the request application identifier and the transaction code.
4. The route processing method of claim 3 wherein determining the target service instance corresponding to the service request based on the requesting authority identification, the requesting application identification, and the transaction code comprises:
determining the general attributes of the target service instance corresponding to the service request according to the request mechanism identification and the transaction code, wherein the general attributes comprise general attributes and non-general attributes;
and determining the target service instance corresponding to the service request according to the general attribute of the target service instance corresponding to the service request, the request mechanism identifier and the request application identifier.
5. The route processing method of claim 4 wherein determining generic attributes of a target service instance corresponding to the service request based on the requesting authority identification and the transaction code comprises:
determining a process definition file identifier corresponding to the service request according to the request mechanism identifier and the transaction code;
determining a general attribute corresponding to the flow definition file identification according to the corresponding relation between the flow definition file identification and the general attribute;
and determining the general attribute corresponding to the flow definition file identification as the general attribute of the target service instance corresponding to the service request.
6. The route processing method according to claim 2 or 4, wherein determining the target service instance corresponding to the service request according to the generic attribute of the target service instance corresponding to the service request, the request mechanism identifier and the request application identifier comprises:
determining at least one candidate service instance corresponding to the general attribute of the target service instance corresponding to the service request according to the corresponding relation between the service instance and the general attribute;
and determining a target service instance corresponding to the service request from the at least one candidate service instance according to the corresponding relation among the request mechanism identifier, the request application identifier and the service instance.
7. The route processing method according to claim 6, wherein, according to the correspondence between the request mechanism identifier, the request application identifier and the service instance, determining a target service instance corresponding to the service request from the at least one candidate service instance:
determining candidate service instances corresponding to the request mechanism identifier and the request application identifier according to the corresponding relation between the request mechanism identifier, the request application identifier and the service instances;
and determining a candidate service instance in an available state from candidate service instances corresponding to the request mechanism identification and the request application identification as the target service instance.
8. The route processing method according to claim 7, wherein determining the candidate service instance in an available state from the candidate service instances corresponding to the request mechanism identifier and the request application identifier comprises:
and determining candidate service instances in an available state from candidate service instances corresponding to the request mechanism identifier and the request application identifier according to state information of the registered service instances in the registration center, wherein the state information comprises an available state and an unavailable state as the target service instance.
9. The routing processing method of claim 8, wherein, in a live-active data center scenario, routing the service request according to the target service instance comprises:
determining a data center identifier corresponding to a request mechanism identifier according to the corresponding relation between the request mechanism identifier and the data center identifier;
routing the service request to a target service instance within a data center corresponding to the data center identification.
10. The route processing method according to claim 9, wherein the correspondence between the request mechanism identification and the generic attribute, the correspondence between the flow definition file identification and the generic attribute, the correspondence between the service instance and the generic attribute, the request mechanism identification, the correspondence between the request application identification and the service instance, and the correspondence between the request mechanism identification and the data center identification are stored in a remote dictionary service Redis.
11. The route processing method according to claim 1, further comprising:
before the service request is analyzed, judging whether a server side domain name corresponding to the service request exists according to the corresponding relation between the service request stored in a remote dictionary service Redis and the server side domain name;
and under the condition that the server side domain name corresponding to the service request exists in the Redis, analyzing the service request.
12. The route processing method according to claim 11, further comprising:
under the condition that the server side domain name corresponding to the service request does not exist in the Redis, judging whether the server side domain name corresponding to the service request exists according to the corresponding relation between the service request and the server side domain name stored in the relational database;
and under the condition that the server side domain name corresponding to the service request exists in the relational database, analyzing the service request.
13. The route processing method according to claim 1, wherein the routing the service request according to the target service instance comprises:
and under the condition that the target service instances are multiple, routing the service request to one of the target service instances by adopting a polling strategy.
14. The route processing method according to claim 1, wherein in a dual active data center scenario, the route processing method is performed by a gateway of a data center closest to an originating location of the service request.
15. A route processing apparatus comprising:
a receiving module configured to receive a service request, the service request including a requesting authority identification and a requesting application identification;
the analysis module is configured to analyze the service request to obtain the request mechanism identifier and the request application identifier;
a determining module configured to determine a target service instance corresponding to the service request according to the request mechanism identifier and the request application identifier; and
and the routing processing module is configured to perform routing processing on the service request according to the target service instance.
16. A route processing apparatus comprising:
a memory; and
a processor coupled to the memory, the processor configured to perform the route processing method of any of claims 1 to 14 based on instructions stored in the memory.
17. A dual activity data center system comprising:
a first data center and a second data center, the first data center and the second data center comprising the route processing apparatus according to claim 15 or 16, respectively.
18. The double-activity data center system as claimed in claim 17, wherein the first data center and the second data center respectively further comprise at least one registration center, and any one registration center is configured to store the corresponding relationship between the service name and the identifier of the service instance to the any one registration center according to the received registration request, and store the corresponding relationship between the service name and the identifier of the service instance to the other registration centers except the any one registration center in the first data center and the second data center synchronously.
19. A computer-storable medium having stored thereon computer program instructions which, when executed by a processor, implement a method of route processing according to any one of claims 1 to 14.
CN202010135655.5A 2020-03-02 2020-03-02 Routing processing method and device and double-activity data center system Active CN111371684B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010135655.5A CN111371684B (en) 2020-03-02 2020-03-02 Routing processing method and device and double-activity data center system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010135655.5A CN111371684B (en) 2020-03-02 2020-03-02 Routing processing method and device and double-activity data center system

Publications (2)

Publication Number Publication Date
CN111371684A true CN111371684A (en) 2020-07-03
CN111371684B CN111371684B (en) 2022-08-09

Family

ID=71210173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010135655.5A Active CN111371684B (en) 2020-03-02 2020-03-02 Routing processing method and device and double-activity data center system

Country Status (1)

Country Link
CN (1) CN111371684B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114531492A (en) * 2020-11-05 2022-05-24 网联清算有限公司 Service calling method and device, storage medium and computer equipment
WO2022111313A1 (en) * 2020-11-24 2022-06-02 深圳前海微众银行股份有限公司 Request processing method and micro-service system
CN114584629A (en) * 2022-05-07 2022-06-03 中国光大银行股份有限公司 Transaction message processing method and device
CN115037789A (en) * 2022-06-09 2022-09-09 中国工商银行股份有限公司 Current limiting method, device, apparatus, storage medium and program product
TWI809956B (en) * 2022-06-29 2023-07-21 英業達股份有限公司 Business process control system with gray release and method thereof

Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101268450A (en) * 2004-06-10 2008-09-17 思科技术公司 A generic framework for deploying EMS provisioning services
US20130166703A1 (en) * 2011-12-27 2013-06-27 Michael P. Hammer System And Method For Management Of Network-Based Services
CN106612188A (en) * 2015-10-21 2017-05-03 中兴通讯股份有限公司 Method and device for extending software function based on micro service architecture
CN107529207A (en) * 2017-09-30 2017-12-29 北京领通科技有限公司 Network communication method and device
CN107948231A (en) * 2016-10-13 2018-04-20 阿里巴巴集团控股有限公司 Service providing method, system and operating system based on scene
CN108134828A (en) * 2017-12-20 2018-06-08 金蝶软件(中国)有限公司 Method for routing, device, computer equipment and the storage medium of service request
CN108206852A (en) * 2016-12-20 2018-06-26 杭州华为数字技术有限公司 A kind of dialogue-based Service Instance management method and equipment under micro services frame
CN108282527A (en) * 2018-01-22 2018-07-13 北京百度网讯科技有限公司 Generate the distributed system and method for Service Instance
CN109002362A (en) * 2017-06-06 2018-12-14 阿里巴巴集团控股有限公司 A kind of method of servicing, device, system and electronic equipment
CN109862075A (en) * 2018-12-29 2019-06-07 北京奥鹏远程教育中心有限公司 A kind of method for routing of Redis Service Instance
US20190222988A1 (en) * 2018-01-17 2019-07-18 Entit Software Llc Service management and provisioning
CN110311983A (en) * 2019-07-09 2019-10-08 北京字节跳动网络技术有限公司 Processing method, device, system, electronic equipment and the storage medium of service request
CN110336874A (en) * 2019-07-03 2019-10-15 北京蜜莱坞网络科技有限公司 A kind of method, apparatus, server and the storage medium of access service
CN110457382A (en) * 2019-08-12 2019-11-15 中国联合网络通信集团有限公司 Method for processing business and equipment
CN110546920A (en) * 2017-05-10 2019-12-06 华为技术有限公司 Service provisioning procedures using slicing and related definitions
CN110753031A (en) * 2019-09-18 2020-02-04 平安科技(深圳)有限公司 Micro-service-framework-based gray level combining method and device and computer equipment
CN110781013A (en) * 2019-10-25 2020-02-11 湖南御家科技有限公司 Gray scale publishing method, device, equipment and medium
CN110837424A (en) * 2019-10-15 2020-02-25 东软集团股份有限公司 Service instance determining method and device, storage medium and electronic equipment

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101268450A (en) * 2004-06-10 2008-09-17 思科技术公司 A generic framework for deploying EMS provisioning services
US20130166703A1 (en) * 2011-12-27 2013-06-27 Michael P. Hammer System And Method For Management Of Network-Based Services
CN106612188A (en) * 2015-10-21 2017-05-03 中兴通讯股份有限公司 Method and device for extending software function based on micro service architecture
CN107948231A (en) * 2016-10-13 2018-04-20 阿里巴巴集团控股有限公司 Service providing method, system and operating system based on scene
CN108206852A (en) * 2016-12-20 2018-06-26 杭州华为数字技术有限公司 A kind of dialogue-based Service Instance management method and equipment under micro services frame
CN110546920A (en) * 2017-05-10 2019-12-06 华为技术有限公司 Service provisioning procedures using slicing and related definitions
CN109002362A (en) * 2017-06-06 2018-12-14 阿里巴巴集团控股有限公司 A kind of method of servicing, device, system and electronic equipment
CN107529207A (en) * 2017-09-30 2017-12-29 北京领通科技有限公司 Network communication method and device
CN108134828A (en) * 2017-12-20 2018-06-08 金蝶软件(中国)有限公司 Method for routing, device, computer equipment and the storage medium of service request
US20190222988A1 (en) * 2018-01-17 2019-07-18 Entit Software Llc Service management and provisioning
CN108282527A (en) * 2018-01-22 2018-07-13 北京百度网讯科技有限公司 Generate the distributed system and method for Service Instance
CN109862075A (en) * 2018-12-29 2019-06-07 北京奥鹏远程教育中心有限公司 A kind of method for routing of Redis Service Instance
CN110336874A (en) * 2019-07-03 2019-10-15 北京蜜莱坞网络科技有限公司 A kind of method, apparatus, server and the storage medium of access service
CN110311983A (en) * 2019-07-09 2019-10-08 北京字节跳动网络技术有限公司 Processing method, device, system, electronic equipment and the storage medium of service request
CN110457382A (en) * 2019-08-12 2019-11-15 中国联合网络通信集团有限公司 Method for processing business and equipment
CN110753031A (en) * 2019-09-18 2020-02-04 平安科技(深圳)有限公司 Micro-service-framework-based gray level combining method and device and computer equipment
CN110837424A (en) * 2019-10-15 2020-02-25 东软集团股份有限公司 Service instance determining method and device, storage medium and electronic equipment
CN110781013A (en) * 2019-10-25 2020-02-11 湖南御家科技有限公司 Gray scale publishing method, device, equipment and medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
KATHIRAVAN THANGAVELU: ""Azure App Service - Routing request to specific instance in multi instance pool"", 《HTTPS://WWW.LINKEDIN.COM/PULSE/AZURE-APP-SERVICE-ROUTING-REQUEST-SPECIFIC-INSTANCE-THANGAVELU》 *
曹步清等: ""一种网络化软件的按需服务发现方法"", 《计算机科学》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114531492A (en) * 2020-11-05 2022-05-24 网联清算有限公司 Service calling method and device, storage medium and computer equipment
WO2022111313A1 (en) * 2020-11-24 2022-06-02 深圳前海微众银行股份有限公司 Request processing method and micro-service system
CN114584629A (en) * 2022-05-07 2022-06-03 中国光大银行股份有限公司 Transaction message processing method and device
CN115037789A (en) * 2022-06-09 2022-09-09 中国工商银行股份有限公司 Current limiting method, device, apparatus, storage medium and program product
CN115037789B (en) * 2022-06-09 2024-03-26 中国工商银行股份有限公司 Method, apparatus, device, storage medium and program product for limiting current
TWI809956B (en) * 2022-06-29 2023-07-21 英業達股份有限公司 Business process control system with gray release and method thereof

Also Published As

Publication number Publication date
CN111371684B (en) 2022-08-09

Similar Documents

Publication Publication Date Title
CN111371684B (en) Routing processing method and device and double-activity data center system
Gorenflo et al. FastFabric: Scaling hyperledger fabric to 20 000 transactions per second
US11588651B2 (en) Blockchain timestamp agreement
WO2017097123A1 (en) Access request conversion method and device
US20180077157A1 (en) Method and system for identifying user information in social network
US20110302277A1 (en) Methods and apparatus for web-based migration of data in a multi-tenant database system
CN102254031A (en) Batch processing request-based Microsoft SQL server database cluster
CN108572970B (en) Structured data processing method and distributed processing system
US10757015B2 (en) Multi-tenant routing management
US20180293257A1 (en) Method for accessing distributed database and distributed data service apparatus
CN112738294B (en) Domain name resolution method and device based on block chain, electronic equipment and storage medium
CN110569036A (en) data verification system and method under front-end and back-end separation architecture
US11539617B2 (en) Peer-to-peer application layer distributed mesh routing
WO2023040453A1 (en) Transaction information processing method and apparatus
US10158650B1 (en) Token verification from incremental inputs
WO2016101759A1 (en) Data routing method, data management device and distributed storage system
US20170132289A1 (en) Database entity analysis
CN115017169A (en) Management method and system of multi-cloud management platform
CN108829495B (en) Verification method, device, equipment and storage medium for multi-database modification transaction
US9058313B2 (en) Test method for distributed processing system and distributed processing system
US11881996B2 (en) Input and output for target device communication
CN111447273A (en) Cloud processing system and data processing method based on cloud processing system
US20220337572A1 (en) Communication between server systems in different network regions
CN112988874A (en) Data processing method, system, computing device and readable storage medium
US11483314B2 (en) Distributed evaluation list updating

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