CN115866061A - Service processing method, device, equipment and medium based on service cluster system - Google Patents

Service processing method, device, equipment and medium based on service cluster system Download PDF

Info

Publication number
CN115866061A
CN115866061A CN202211519497.9A CN202211519497A CN115866061A CN 115866061 A CN115866061 A CN 115866061A CN 202211519497 A CN202211519497 A CN 202211519497A CN 115866061 A CN115866061 A CN 115866061A
Authority
CN
China
Prior art keywords
service
cluster
registration
cross
called
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
CN202211519497.9A
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.)
Ningbo Geely Automobile Research and Development Co Ltd
Original Assignee
Ningbo Geely Automobile Research and Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ningbo Geely Automobile Research and Development Co Ltd filed Critical Ningbo Geely Automobile Research and Development Co Ltd
Priority to CN202211519497.9A priority Critical patent/CN115866061A/en
Publication of CN115866061A publication Critical patent/CN115866061A/en
Pending legal-status Critical Current

Links

Images

Abstract

The application provides a service processing method, a device, equipment and a medium based on a service cluster system. The method comprises the following steps: the method comprises the steps of constructing a service cluster system consisting of a service cluster and a cross-cluster registration synchronization center, obtaining a first time difference, a second time difference, a third time difference, a service load list and a service load ordered list according to a heartbeat mechanism, obtaining a first formula, a second formula and a third formula according to corresponding weights, obtaining a service cluster with the highest priority and a service node with the highest priority in the service cluster with the highest priority, and carrying out cross-cluster calling on the service node. Compared with the prior art, the registration center in the cluster only records the mapping relation between the service and the service address in the cluster, and cross-network and cross-regional service calling cannot be realized.

Description

Service processing method, device, equipment and medium based on service cluster system
Technical Field
The present application relates to the field of service invocation technologies, and in particular, to a service processing method, device, apparatus, and medium based on a service cluster system.
Background
With the development of communication technology, more and more micro service architectures are deployed in a cloud environment. In the micro service architecture system in the prior art, the registry only records the mapping relationship between the service and the service address working in a single network area.
However, in the prior art, if the micro service architecture is deployed across network areas, services between different network areas cannot be obtained by querying a registration address in a registration center, and thus cross-network and cross-area service invocation is difficult to implement.
Disclosure of Invention
The application provides a service processing method, a device, equipment and a medium based on a service cluster system, which are used for solving the problem that in the prior art, a registration center in a cluster only records the mapping relation between services and service addresses in the cluster, and cross-network and cross-regional service calling cannot be realized.
In a first aspect, the present application provides a service processing method based on a service cluster system, including:
a first service cluster receives a service calling request sent by a cross-cluster registration synchronous center, wherein the service calling request comprises: and identifying the service to be called.
And the first service cluster calls the service to be called corresponding to the service identification to be called according to the service calling request, and queries and acquires the identification of a second service cluster corresponding to the service identification to be called from a first registry in the first service cluster when the calling service associated with the service to be called is determined to be called and the associated calling service is not in the first service cluster in the calling process.
And the first service cluster sends a cross-cluster calling request carrying the identification of the associated calling service to a second service cluster corresponding to the identification of the second service cluster, so that the second service cluster calls the associated calling service corresponding to the identification of the associated calling service according to the cross-cluster calling request.
In a specific implementation manner, the invoking, by the first service cluster, the service to be invoked corresponding to the service identifier to be invoked according to the service invoking request includes:
and the local API gateway in the first service cluster inquires and acquires a current service load list corresponding to the service identifier to be called and a first time difference corresponding to the service identifier to be called in the current first time delay table from the first registration center according to the service calling request, and acquires the service node with the highest priority under the service to be called according to the current load list, the corresponding weight, the first time difference and the corresponding weight so as to forward the service calling request to the service node with the highest priority.
And the service node with the highest priority in the first service cluster carries out service calling processing according to the calling request.
In a specific embodiment, the method further comprises the following steps:
the first registration center in the first service cluster performs heartbeat mechanism processing with each service in the first service cluster respectively, and acquires or updates the first delay table, where the first delay table includes a first time difference corresponding to each service.
And the first registration center in the first service cluster respectively acquires a service load list corresponding to each service according to the load state of the service node in each service in the first service cluster, and sends the service load list corresponding to each service to the cross-cluster registration synchronization center.
In a specific embodiment, the method further comprises the following steps:
and the first registration center in the first service cluster performs heartbeat mechanism processing on other service clusters, acquires a third delay table and sends the third delay table to the cross-cluster registration synchronization center.
Wherein the third delay table includes a third time difference corresponding to each service cluster.
In a second aspect, the present application provides a service processing method based on a service cluster system, including:
acquiring a service call request by a cross-cluster registration synchronous center, wherein the service call request comprises: and identifying the service to be called.
And the cross-cluster registration synchronization center searches and acquires a service cluster list where the service identifier to be called is located according to the service calling request.
And the cross-cluster registration synchronization center respectively acquires a second time difference and a third time difference corresponding to each service cluster in the cluster list according to the second time delay table and the third time delay table, and respectively acquires the time delay level of each service cluster according to the second time difference and the corresponding weight as well as the third time difference and the corresponding weight.
And the cross-cluster registration synchronization center respectively acquires the corresponding load of the service identifier to be called under each service cluster according to the service load ordered list, and acquires the priority of each service cluster according to the time delay level and the corresponding weight of each service cluster, and the corresponding load and the corresponding weight of the service identifier to be called under each service cluster.
And the cross-cluster registration synchronization center sends the service calling request to the service cluster with the highest priority so that the service cluster with the highest priority carries out corresponding service calling processing according to the service calling request.
In a specific embodiment, the method further comprises the following steps:
the cross-cluster registration synchronization center respectively performs heartbeat mechanism processing with the registration center in each service cluster to acquire a second time delay table, and respectively sends the second time delay table to the registration center in each service cluster; wherein the second delay comprises a second time difference corresponding to each service cluster.
The cross-cluster registration synchronization center respectively acquires a third time delay table reported by each service cluster; and the third time delay table is obtained by the registration center in the service cluster performing heartbeat mechanism processing on other service clusters.
In a specific embodiment, the method further comprises the following steps:
and the cross-cluster registration synchronization center respectively acquires a service load list corresponding to each service under each service cluster reported by each service cluster, integrates the same service and acquires a service load ordered list.
In a third aspect, the present application provides a service cluster, including:
the API gateway is used for receiving a service calling request sent by a cross-cluster registration synchronous center, and the service calling request comprises: and identifying the service to be called.
And the service is used for calling the service to be called corresponding to the service identifier to be called according to the service calling request, and inquiring and acquiring the identifier of a second service cluster corresponding to the service identifier to be called from a first registration center in the service cluster when the calling service associated with the service to be called is determined to be called and the associated calling service is not in the service cluster in the calling process.
The service is further configured to send a cross-cluster call request carrying the identifier of the associated call service to a second service cluster corresponding to the identifier of the second service cluster, so that the second service cluster calls the associated call service corresponding to the identifier of the associated call service according to the cross-cluster call request.
In a specific embodiment, the API gateway is specifically configured to:
according to the service calling request, a current service load list corresponding to the service identifier to be called and a first time difference corresponding to the service identifier to be called in the current first time delay table are obtained through inquiry in the first registration center, and according to the current load list, the corresponding weight and the first time difference and the corresponding weight, a service node with the highest priority under the service to be called is obtained, so that the service calling request is forwarded to the service node with the highest priority.
And the service node with the highest priority in the first service cluster carries out service calling processing according to the calling request.
In a specific embodiment, the first registration center is configured to perform heartbeat mechanism processing on each service in the service cluster, and acquire or update the first delay table, where the first delay table includes a first time difference corresponding to each service.
And respectively acquiring a service load list corresponding to each service according to the load state of the service node in each service in the first service cluster, and sending the service load list corresponding to each service to the cross-cluster registration synchronization center.
In one embodiment, the registry is further configured to:
and carrying out heartbeat mechanism processing on other service clusters to obtain a third time delay table, and sending the third time delay table to the cross-cluster registration synchronization center.
And the third time delay table comprises a third time difference corresponding to each service cluster.
In a fourth aspect, the present application provides a cross-cluster registration synchronization center, including:
the external gateway is configured to obtain a service invocation request, where the service invocation request includes: and identifying the service to be called.
And the internal server is used for searching and acquiring a service cluster list where the service identifier to be called is located according to the service calling request.
The internal server is further configured to obtain a second time difference and a third time difference corresponding to each service cluster in the cluster list according to the second time delay table and the third time delay table, and obtain a time delay level of each service cluster according to the second time difference and the corresponding weight, and the third time difference and the corresponding weight.
The internal server is further configured to obtain, according to the service load ordered list, loads corresponding to the service identifiers to be called in each service cluster, and obtain the priority of each service cluster according to the delay level and the corresponding weight of each service cluster, and the loads and the corresponding weights corresponding to the service identifiers to be called in each service cluster.
And the external gateway is further configured to send the service invocation request to the service cluster with the highest priority, so that the service cluster with the highest priority performs corresponding service invocation processing according to the service invocation request.
In one embodiment, the internal server is further configured to:
carrying out heartbeat mechanism processing with a registration center in each service cluster to obtain a second time delay table, and respectively sending the second time delay table to the registration center in each service cluster; wherein the second delay comprises a second time difference corresponding to each service cluster.
Respectively acquiring a third time delay table reported by each service cluster; and the third time delay table is obtained by the registration center in the service cluster performing heartbeat mechanism processing on other service clusters.
In one embodiment, the internal server is further configured to:
and respectively acquiring a service load list corresponding to each service under each service cluster reported by each service cluster, integrating the same service, and acquiring a service load ordered list.
In a fifth aspect, the present application provides a service cluster system, including: registering a synchronization center and a plurality of service clusters across the clusters; wherein the cross-cluster registration synchronization center is configured to execute the service processing method according to the second aspect; the service cluster is configured to perform the service processing method according to the first aspect.
In a sixth aspect, the present application provides a service cluster, including:
processor, memory, communication interface.
The memory is to store executable instructions that are executable by the processor.
Wherein the processor is configured to perform the service processing method of the first aspect via execution of the executable instructions.
In a seventh aspect, the present application provides a cross-cluster registration synchronization center, including:
processor, memory, communication interface.
The memory is used for storing executable instructions executable by the processor.
Wherein the processor is configured to perform the service processing method of the second aspect via execution of the executable instructions.
In an eighth aspect, the present application provides a readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the service processing method of the first aspect.
In a ninth aspect, the present application provides a readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the service processing method of the second aspect.
The application provides a service processing method, a device, equipment and a medium based on a service cluster system, wherein a first service cluster receives a service call request sent by a cross-cluster registration synchronous center, and the service call request comprises the following steps: a service identifier to be called; the first service cluster calls a service to be called corresponding to the service identifier to be called according to the service calling request, and queries and acquires an identifier of a second service cluster corresponding to the service identifier to be called from a first registry in the first service cluster when the calling service associated with the service to be called is determined to be called and the associated calling service is not in the first service cluster in the calling process; and the first service cluster sends a cross-cluster calling request carrying the identification of the associated calling service to a second service cluster corresponding to the identification of the second service cluster, so that the second service cluster calls the associated calling service corresponding to the identification of the associated calling service according to the cross-cluster calling request. Compared with the prior art, the registration center in the service cluster only records the mapping relation between the service and the service address in the cluster, and cross-network and cross-region service calling cannot be realized.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a first embodiment of a service processing method based on a service cluster system according to the present application;
fig. 2 is a schematic flowchart of a second embodiment of a service processing method based on a service cluster system according to the present application;
fig. 3 is a schematic flowchart of a third embodiment of a service processing method based on a service cluster system according to the present application;
fig. 4 is a schematic flowchart of a fourth embodiment of a service processing method based on a service cluster system according to the present application;
FIG. 5 is a schematic diagram of a service-based cluster system according to the present application;
fig. 6 is a schematic structural diagram of a fourth service cluster according to the embodiment of the present application;
fig. 7 is a schematic structural diagram of a fifth embodiment of a cross-cluster registration synchronization center provided in the present application;
fig. 8 is a schematic structural diagram of a sixth embodiment of a service cluster system provided in the present application.
Specific embodiments of the present application have been shown by way of example in the drawings and will be described in more detail below. The drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the concepts of the application by those skilled in the art with reference to specific embodiments.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by persons skilled in the art based on the embodiments in the present application in light of the present disclosure, are within the scope of protection of the present application.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the above-described drawings (if any) are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the prior art, a registry in a cluster only records the mapping relationship between services and service addresses in the cluster, and can only call the services in the cluster, so that cross-network and cross-region service call is difficult to realize. The idea of the present application is therefore how to implement service invocation across networks and areas.
The technical solution of the present application will be described in detail below with reference to specific examples. It should be noted that the following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
Fig. 1 is a schematic flowchart of a first embodiment of a service processing method based on a service cluster system, as shown in fig. 1, the service processing method based on the service cluster system specifically includes the following steps:
step S101: a first service cluster receives a service invocation request sent by a cross-cluster registration synchronous center.
Wherein the service invocation request includes: and identifying the service to be called.
Step S102: and the first service cluster calls the service to be called corresponding to the service identifier to be called according to the service calling request, and queries and acquires the identifier of a second service cluster corresponding to the service identifier to be called from a first registration center in the first service cluster when the calling service associated with the service to be called is determined to be called and the associated calling service is not in the first service cluster in the calling process.
Specifically, as shown in fig. 5, which is a schematic diagram of a service cluster system based on the present application, each service cluster internal service sends its corresponding service information to a registration center in a service cluster through a hypertext transfer protocol HTTP to perform registration processing, so as to form a local service list, the registration center in the service cluster sends the service information to an external gateway across cluster registration synchronization centers through a transmission control protocol TCP, the external gateway sends the service information to an internal server through the hypertext transfer protocol HTTP, the internal server sends the service information to the service list through the hypertext transfer protocol HTTP to perform registration processing, that is, the service list across cluster registration synchronization centers includes service information in all service clusters. And the internal server of the cross-cluster registration synchronization center performs matching processing on the service and the server load balancer SLB corresponding to the service cluster to which the service belongs according to the service information, and the service list of the cross-cluster registration synchronization center registers the service information corresponding to all the services in all the service clusters, sends the service information to the external gateway through the internal server, and sends the service information to the registration center of each service cluster through the transmission control protocol TCP by the external gateway.
If the service exits from the service cluster or the state is abnormal, the registration center in the service cluster to which the service belongs receives the information of the service exit or detects that the service is in the abnormal state through a heartbeat mechanism, the local service list is updated, the service list of the cross-cluster registration synchronization center is updated synchronously, and the updated service information is sent to the registration center in each service cluster.
The service information includes a service name, a port number corresponding to the service, a service description, an IP address corresponding to the service, a service cluster to which the service belongs, and the like. The transmission control protocol TCP connection takes the pki certificate as a two-way verification mode. The communication data protocol format is command (fixed to 4 bytes) + length (fixed to 2 bytes) + data, specifically, command is command information, length is data length information, data is data information, and the communication data protocol can use several file compression programs to perform compression processing.
Specifically, when the intra-service cluster registration information sends a connection information initialization command to the cross-cluster registration synchronization center, the data information included in the command is service cluster information, service cluster state, service quantity, time stamp and the like; when the registration information in the service cluster sends a command for requesting the synchronization of the service list to the cross-cluster registration synchronization center, the data information included in the command is service cluster information, a time stamp and the like; when the service registration command is sent to the cross-cluster registration synchronous center for the registration information in the service cluster, the data information included in the command is service cluster information, SLB information, a service name, a service state, a time stamp and the like; when a service logout command is sent to a cross-cluster registration synchronous center for registration information in a service cluster, data information included in the command is service cluster information, SLB information, a service name, a service state, a timestamp and the like; when a cross-cluster registration synchronization center sends a service synchronization command to registration information in a service cluster, the data information included in the command is a service list, a timestamp and the like, and specifically, the service list includes a service name, a service cluster corresponding to the service, a service state and an SLB corresponding to the service; when a cross-cluster registration synchronous center sends a request service list reporting command to the registration information in the service cluster, the data information included in the command is a time stamp and the like.
Step S103: and the first service cluster sends a cross-cluster calling request carrying the identification of the associated calling service to a second service cluster corresponding to the identification of the second service cluster, so that the second service cluster calls the associated calling service corresponding to the identification of the associated calling service according to the cross-cluster calling request.
In this embodiment, a service to be called in a first service cluster, that is, an associated calling service, searches for and acquires a service cluster to which the associated calling service belongs according to service information corresponding to services in all service clusters sent by a cross-cluster registration synchronization center in a registration center inside the service cluster, and sends a cross-cluster calling request to an SLB of the service cluster through a hypertext transfer protocol HTTP if the query result indicates that the associated calling service belongs to another service cluster, the SLB of the service cluster sends the cross-cluster calling request to an API gateway inside the service cluster through the hypertext transfer protocol HTTP, and the API gateway searches for and acquires an IP address of the associated calling service in the registration center inside the service cluster according to the cross-cluster calling request and calls the associated calling service according to the IP address of the associated calling service.
Specifically, as shown in fig. 5, if it is found in the registry a of the service cluster a that the associated calling service, that is, the service 3, belongs to the service cluster B, a cross-cluster calling request is sent to the SLB-B of the service cluster B through the hypertext transfer protocol HTTP, the SLB-B of the service cluster sends the cross-cluster calling request to the API gateway B inside the service cluster through the hypertext transfer protocol HTTP, and the API gateway B searches for and obtains the IP address of the service 3 in the registry inside the service cluster according to the cross-cluster calling request, and calls the service 3 according to the IP address of the service 3.
In this embodiment, a service invocation request sent across a cluster registration synchronization center is received by a first service cluster, where the service invocation request includes: a service identifier to be called; the first service cluster calls a service to be called corresponding to the service identifier to be called according to the service calling request, and queries and acquires an identifier of a second service cluster corresponding to the service identifier to be called from a first registration center in the first service cluster when the calling service associated with the service to be called is determined to be called and the associated calling service is not in the first service cluster in the calling process; and the first service cluster sends a cross-cluster calling request carrying the identification of the associated calling service to a second service cluster corresponding to the identification of the second service cluster, so that the second service cluster calls the associated calling service corresponding to the identification of the associated calling service according to the cross-cluster calling request. Compared with the prior art that the registration center in the service cluster only records the mapping relation between the service and the service address in the service cluster and cannot realize cross-network and cross-region service calling, the service cluster system consisting of the cross-cluster registration synchronization center and the plurality of service clusters is constructed, and cross-network and cross-region service calling is realized.
Fig. 2 is a schematic flowchart of a second embodiment of a service processing method based on a service cluster system provided in the present application, and as shown in fig. 2, the service processing method based on the service cluster system specifically includes the following steps:
step S201: and acquiring a service call request by the cross-cluster registration synchronous center.
Wherein the service invocation request comprises: and identifying the service to be called.
Step S202: and searching and acquiring a service cluster list where the service identifier to be called is located by the cross-cluster registration synchronization center according to the service calling request.
In this embodiment, each service cluster internal service sends its corresponding service information to a registration center in the service cluster through a hypertext transfer protocol HTTP to perform registration processing, so as to form a local service list, the registration center in the service cluster sends the service information to an external gateway of a cross-cluster registration synchronization center through a transmission control protocol TCP, the external gateway sends the service information to an internal server through the hypertext transfer protocol HTTP, the internal server sends the service information to the service list through the hypertext transfer protocol HTTP to perform registration processing, that is, the service list of the cross-cluster registration synchronization center includes service information in all service clusters, and the cross-cluster registration synchronization center searches and obtains a service cluster list where a service identifier to be called is located according to the service information corresponding to a service calling request.
The service information includes a service name, a port number corresponding to the service, a service description, an IP address corresponding to the service, a service cluster to which the service belongs, and the like. The transmission control protocol TCP connection takes a pki certificate as a bidirectional verification mode. The communication data protocol is in a format of command (fixed to 4 bytes) + length (fixed to 2 bytes) + data, specifically, command is command information, length is data length information, data is data information, and the communication data protocol can perform compression processing using several file compression programs.
Specifically, when a registration center in a service cluster sends a connection information initialization command to a cross-cluster registration synchronization center, data information included in the command is service cluster information, service cluster state, service quantity, time stamp and the like; when a registration center in a service cluster sends a command for requesting service list synchronization to a cross-cluster registration synchronization center, data information included in the command is service cluster information, a time stamp and the like; when a service registration command is sent to a cross-cluster registration synchronous center by a service cluster registration center, the data information included in the command is service cluster information, SLB information, a service name, a service state, a time stamp and the like; when a service logout command is sent to a cross-cluster registration synchronous center by a service cluster registration center, the data information included in the command is service cluster information, SLB information, a service name, a service state, a time stamp and the like; when a cross-cluster registration synchronization center sends a service synchronization command to a service cluster registration center, data information included in the command is a service list, a timestamp and the like, and specifically, the service list includes a service name, a service cluster corresponding to the service, a service state and an SLB corresponding to the service; when the cross-cluster registration synchronous center sends a request service list reporting command to the service cluster registration center, the data information included in the command is a time stamp and the like.
Step S203: and the cross-cluster registration synchronization center respectively acquires a second time difference and a third time difference corresponding to each service cluster in the service cluster list according to the second time delay table and the third time delay table, and respectively acquires the time delay level of each service cluster according to the second time difference and the corresponding weight as well as the third time difference and the corresponding weight.
In this embodiment, the time when the cross-cluster registration synchronization center sends a heartbeat according to the heartbeat mechanism and the time when the registration center in each service cluster receives the heartbeat are recorded, and a second time delay table is obtained, where the second time delay includes a second time difference corresponding to each service cluster, and the second time difference is T 2 And (4) showing. Recording the time of the registration center in the service cluster sending the heartbeat according to the heartbeat mechanism and the time of other service clusters receiving the heartbeat, and acquiring a third time delay table, wherein the third time delay table comprises a third time difference which is T 3 And (4) showing. Setting the weight corresponding to the second time difference as a second weight according to the actual requirement, wherein the weight is omega 2 The weight corresponding to the third time difference is the third weight, which is represented by ω 3 And (4) showing.
According to the second time difference T 2 A second weight ω 2 A third time difference T 3 A third weight ω 3 And acquiring a first formula, and acquiring the delay level of each service cluster according to the first formula, wherein the delay level of each service cluster is represented by P.
Specifically, the first formula is expressed as:
P=T 2 ×ω 2 +T 3 ×ω 3
when a heartbeat command is sent to a cross-cluster registration synchronous center by a service cluster registration center, data information included in the command is service cluster information, a timestamp and the like; when the cross-cluster registration synchronization center sends a command of a cross-cluster registration synchronization center heartbeat response to the service cluster registration center, data information included in the command is a time stamp and the like.
Step S204: and the cross-cluster registration synchronization center respectively acquires the corresponding load of the service identifier to be called under each service cluster according to the service load ordered list, and acquires the priority of each service cluster according to the delay level and the corresponding weight of each service cluster, and the corresponding load and the corresponding weight of the service identifier to be called under each service cluster.
In this embodiment, when a service call occurs, a local registration center in a service cluster records the call, updates the load state of each service in the service cluster in real time, obtains a service load list, and synchronizes the load sorting table to a cross-cluster registration synchronization center through a TCP protocol, where specifically, the service load list is represented by M.
For example, if the service 1 is an acquisition function and the service 2 is an inquiry function, then for horizontal extension of the same function, the service 1 includes a service 1.1, a service 1.2, and a service 1.3, the service 2 includes a service 2.1, a service 2.2, and a service 2.3, and when the service 1.1 is being called 5 times, the service 1.2 is being called 4 times, the service 1.3 is being called 3 times, the service 2.1 is being called 4 times, the service 2.2 is being called 3 times, and the service 2.3 is being called 2 times, the service load list M records that the service 1.1 is being called 5 times, the service 1.2 is being called 4 times, the service 1.3 is being called 3 times, the service 2.1 is being called 4 times, the service 2.2 is being called 3 times, and the service 2.3 is being called 2 times.
And acquiring the load N corresponding to each service cluster according to the service load ordered list M, wherein the load N corresponding to each service cluster is equal to the service load ordered list, namely the service load ordered list can also represent N, the load N corresponding to each service cluster is synchronized to the cross-cluster registration synchronization center through a TCP (transmission control protocol), and is transmitted to each service cluster through the TCP to be synchronized to the cross-cluster registration synchronization center, so that each service cluster acquires the load N corresponding to all other service clusters.
Specifically, the load N is the load accumulation of the same service, and as in the above example, the load N corresponding to the service 1 is 5+4+3=12, and the load N corresponding to the service 2 is 4+3+2=9 times.
For the delay level P of the service cluster, according to the actual requirement, obtaining a fourth weight corresponding to the delay level P of the service cluster, and using omega 4 Showing that the corresponding load N under the service cluster obtains a fifth weight, omega, corresponding to the corresponding load N under the service cluster according to actual requirements 5 And (4) showing.
According to the delay level P and the fourth weight omega of the service cluster 4 Corresponding load N and fifth weight omega under the service cluster 5 And acquiring a second formula, and acquiring the priority of each service cluster according to the second formula, wherein the priority of each service cluster is represented by X.
Specifically, the second formula is expressed as:
X=P×ω 4 +N×ω 5
step S205: and the cross-cluster registration synchronization center sends the service calling request to the service cluster with the highest priority so that the service cluster with the highest priority carries out corresponding service calling processing according to the service calling request.
In this embodiment, the registration center in the service cluster acquires or updates the first delay table according to the time when the heartbeat is sent by the heartbeat mechanism and the time when the service in the service cluster receives the heartbeat, where the first delay table includes a first time difference corresponding to each service, and the first time difference is T 1 And (4) showing.
For a first time difference T 1 Obtaining the first time difference T according to the actual requirement 1 Corresponding first weight, with ω 1 Representing, a service load list M, obtained according to the actual demandSixth weight, in ω, corresponding to the service load list M 6 And (4) showing.
According to a first time difference T 1 First weight ω 1 Service load list M, sixth weight omega 6 And acquiring a third formula, and acquiring the priority of the service in the service cluster according to the third formula, wherein the priority of the service in the service cluster is represented by Y.
Specifically, the third formula is expressed as:
Y=T 1 ×ω 1 +M×ω 6
and when cross-regional service is called, acquiring a service node with the highest priority according to the priority of the service in the service cluster, and calling the service of the node.
In this embodiment, when determining the associated call service, a service to be called in a service cluster searches for and acquires a service cluster to which the associated call service belongs according to service information corresponding to services in all service clusters sent by a cross-cluster registration synchronization center through a registration center in the service cluster, sends a cross-cluster call request to an SLB of the service cluster through a hypertext transfer protocol HTTP, sends the cross-cluster call request to an API gateway in the service cluster through the hypertext transfer protocol HTTP, and the API gateway searches for and acquires an IP address of the associated call service in the registration center in the service cluster according to the cross-cluster call request and calls the associated call service according to the IP address of the associated call service.
In this embodiment, the cross-cluster registration synchronization center searches and acquires a service cluster list where a service identifier to be called is located according to a service calling request; and acquiring a service cluster with the highest priority corresponding to the associated calling service according to the first formula, the second formula and the third formula, inquiring and acquiring the service with the highest priority in the service cluster with the highest priority, and calling the service. Compared with the prior art, the registration center in the service cluster only records the mapping relation between the service and the service address in the service cluster, and cross-network and cross-regional service calling cannot be realized.
Fig. 3 is a schematic flowchart of a third embodiment of a service processing method based on a service cluster system, which is provided in the present application, and as shown in fig. 3, the service processing method based on the service cluster system specifically includes the following steps:
step S301: the first service cluster receives a service invocation request sent across the cluster registration synchronization center.
Wherein the service invocation request includes: and identifying the service to be called.
Step S302: and the first service cluster calls the service to be called corresponding to the service identifier to be called according to the service calling request.
In this embodiment, each service cluster internal service sends the corresponding service information to a registration center in the service cluster through a hypertext transfer protocol HTTP for registration processing to form a local service list, the registration center in the service cluster sends the service information to an external gateway of a cross-cluster registration synchronization center through a transmission control protocol TCP, the external gateway sends the service information to an internal server through the hypertext transfer protocol HTTP, the internal server sends the service information to a service list through the hypertext transfer protocol HTTP for registration processing, that is, the service list of the cross-cluster registration synchronization center includes the service information in all service clusters. And the internal server of the cross-cluster registration synchronization center performs matching processing on the service and the server load balancer SLB corresponding to the service cluster to which the service belongs according to the service information, and the service list of the cross-cluster registration synchronization center registers the service information corresponding to all the services in all the service clusters, sends the service information to the external gateway through the internal server, and sends the service information to the registration center of each service cluster through a Transmission Control Protocol (TCP) by the external gateway.
If the service exits from the service cluster or the state is abnormal, the registration center in the service cluster to which the service belongs receives the message of service exit or detects that the service is in the abnormal state through a heartbeat mechanism, the local service list is updated, the service list of the cross-cluster registration synchronization center is updated synchronously, and the updated service information is sent to the registration centers in the service clusters.
The service information of this step including the service, the tcp check mode and the command content is described in the above embodiments, and will not be described herein again.
Step S303: and a first registration center in the first service cluster respectively performs heartbeat mechanism processing on each service in the first service cluster, and acquires or updates a first time delay table, wherein the first time delay table comprises a first time difference corresponding to each service.
In this embodiment, the first time difference is T 1 It is shown that the detailed process of this step is described in the above embodiment, and is not described herein again.
Step S304: and the first registration center in the first service cluster respectively acquires a service load list corresponding to each service according to the load state of the service node in each service under the first service cluster, and sends the service load list corresponding to each service to the cross-cluster registration synchronization center.
In this embodiment, the service load list is denoted by M, and the detailed process of this step is as in the above embodiment, which is not described herein again.
Step S305: and the first registration center in the first service cluster performs heartbeat mechanism processing on other service clusters to obtain a third time delay table, and sends the third time delay table to the cross-cluster registration synchronization center.
And the third time delay table comprises a third time difference corresponding to each service cluster.
In this embodiment, the third time difference is T 3 It is shown that the detailed process of this step is described in the above embodiment, and is not described herein again.
Step S306: in the calling process, when it is determined that a calling service associated with the service to be called is called and the associated calling service is not in the first service cluster, the identification of the second service cluster corresponding to the service identification to be called is inquired and obtained from a first registry in the first service cluster.
In this embodiment, the second service cluster should be the service cluster with the highest priority, and the service cluster priority algorithm is described in the above embodiment, which is not described herein again.
Step S307: the local API gateway in the first service cluster inquires and acquires a current service load list corresponding to the service identifier to be called and a first time difference corresponding to the service identifier to be called in a current first time delay table from the first registration center according to the service calling request, and acquires a service node with the highest priority under the service to be called according to the current load list, the corresponding weight, the first time difference and the corresponding weight so as to forward the service calling request to the service node with the highest priority.
And the service node with the highest priority in the first service cluster performs service calling processing according to the calling request.
In this embodiment, the service node priority algorithm is described in the above embodiment, and is not described herein again.
Step S308: and the first service cluster sends a cross-cluster calling request carrying the identification of the associated calling service to a second service cluster corresponding to the identification of the second service cluster, so that the second service cluster calls the associated calling service corresponding to the identification of the associated calling service according to the cross-cluster calling request.
In this embodiment, the call processing of the associated call service is described in the above embodiments, and is not described herein again.
In this embodiment, the first service cluster searches for a service cluster list where the service identifier to be called is located according to the service calling request; and acquiring the service cluster with the highest priority corresponding to the associated calling service according to a correlation formula, inquiring and acquiring the service with the highest priority in the service cluster with the highest priority, and calling the service. Compared with the prior art, the registration center in the service cluster only records the mapping relation between the service and the service address in the service cluster, and cross-network and cross-regional service calling cannot be realized.
Fig. 4 is a schematic flowchart of a fourth embodiment of a service processing method based on a service cluster system, as shown in fig. 4, the service processing method based on the service cluster system specifically includes the following steps:
step S401: and acquiring a service call request by the cross-cluster registration synchronous center.
Wherein the service invocation request includes: and identifying the service to be called.
Step S402: and searching and acquiring a service cluster list where the service identifier to be called is located by the cross-cluster registration synchronization center according to the service calling request.
In this embodiment, each service cluster uploads the service information of the registry to the cross-cluster registration synchronization center, and the specific process refers to the above embodiments, which is not described herein again.
Step S403: the cross-cluster registration synchronization center respectively performs heartbeat mechanism processing with the registration center in each service cluster to acquire a second time delay table, and respectively sends the second time delay table to the registration center in each service cluster; wherein the second delay comprises a second time difference corresponding to each service cluster.
In this embodiment, the second time difference is T 2 It is shown that the detailed process of this step is described in the above embodiments, and is not described herein again.
Step S404: respectively acquiring a third time delay table reported by each service cluster by a cross-cluster registration synchronous center; the third delay table is obtained by the registration center in the service cluster performing heartbeat mechanism processing on other service clusters.
In this embodiment, the third time difference is T 3 It is shown that the detailed process of this step is described in the above embodiments, and is not described herein again.
Step S405: and the cross-cluster registration synchronization center respectively acquires a second time difference and a third time difference corresponding to each service cluster in the service cluster list according to the second time delay table and the third time delay table, and respectively acquires the time delay level of each service cluster according to the second time difference and the corresponding weight as well as the third time difference and the corresponding weight.
In this embodiment, the delay level of the service cluster is denoted by P, and the detailed process of this step is described in the above embodiment, which is not described herein again.
Step S406: and the cross-cluster registration synchronization center respectively acquires a service load list corresponding to each service under the service cluster reported by each service cluster, integrates the same service and acquires a service load ordered list.
In this embodiment, the service load list is denoted by M, and the service load ordered list is denoted by N, and the detailed process of this step is described in the above embodiments, and is not described herein again.
Step S407: and the cross-cluster registration synchronization center respectively acquires the corresponding load of the service identifier to be called under each service cluster according to the service load ordered list, and acquires the priority of each service cluster according to the delay level and the corresponding weight of each service cluster, and the corresponding load and the corresponding weight of the service identifier to be called under each service cluster.
In this embodiment, the priority of the service cluster is represented by a delay level P of the service cluster, and the detailed process of this step is shown in the above embodiment and will not be described herein again.
Step S408: and the cross-cluster registration synchronization center sends the service calling request to the service cluster with the highest priority so that the service cluster with the highest priority carries out corresponding service calling processing according to the service calling request.
In this embodiment, the priority of the service in the service cluster is obtained according to the priority of the service cluster and the corresponding parameter, where the priority of the service in the service cluster is represented by Y, and the detailed process of this step is shown in the above embodiment and will not be described herein again.
In this embodiment, the cross-cluster registration synchronization center searches and acquires a service cluster list where a service identifier to be called is located according to a service calling request; and acquiring the service cluster with the highest priority corresponding to the associated calling service according to a correlation formula, inquiring and acquiring the service with the highest priority in the service cluster with the highest priority, and calling the service. Compared with the prior art, the registration center in the service cluster only records the mapping relation between the service and the service address in the service cluster, and cross-network and cross-regional service calling cannot be realized.
Fig. 6 is a schematic structural diagram of a fourth embodiment of a service cluster provided in the present application, where the service cluster may be a service cluster of any one of the service processing methods based on the service cluster system. Specifically, as shown in fig. 6, the service cluster 50 includes: API gateway 51, service 52 and first registry 53.
The API gateway 51 is configured to receive a service call request sent by a cross-cluster registration synchronization center, where the service call request includes: and identifying the service to be called.
And the service 52 is configured to, according to the service invocation request, perform invocation processing on the service to be invoked corresponding to the service identifier to be invoked, and query, in the invocation process, from the first registration center 53 in the service cluster, to obtain an identifier of a second service cluster corresponding to the service identifier to be invoked when it is determined that the invocation service associated with the service to be invoked is invoked and the associated invocation service is not in the service cluster.
The service 52 is further configured to send a cross-cluster call request carrying the identifier of the associated call service to the second service cluster corresponding to the identifier of the second service cluster, so that the second service cluster calls the associated call service corresponding to the identifier of the associated call service according to the cross-cluster call request.
The service cluster 50 in this embodiment may perform the method embodiment one or the method embodiment three, and the implementation principle and the technical effect are similar, which are not described herein again.
On the basis of the above embodiment, the API gateway 51 is specifically configured to:
according to the service calling request, a current service load list corresponding to the service identifier to be called and a first time difference corresponding to the service identifier to be called in a current first time delay list are inquired and obtained from a first registration center, and according to the current load list, the corresponding weight, the first time difference and the corresponding weight, the service node with the highest priority under the service to be called is obtained, so that the service calling request is forwarded to the service node with the highest priority.
And the service node with the highest priority in the first service cluster carries out service calling processing according to the calling request.
On the basis of the foregoing embodiment, the first registration center 53 is configured to perform heartbeat mechanism processing on each service in the service cluster respectively, and acquire or update a first delay table, where the first delay table includes a first time difference corresponding to each service.
And respectively acquiring a service load list corresponding to each service according to the load state of the service node in each service in the first service cluster, and sending the service load list corresponding to each service to the cross-cluster registration synchronization center.
On the basis of the above embodiment, the first registry 53 is further configured to:
and carrying out heartbeat mechanism processing on other service clusters, acquiring a third time delay table, and sending the third time delay table to the cross-cluster registration synchronization center.
And the third time delay table comprises a third time difference corresponding to each service cluster.
Fig. 7 is a schematic structural diagram of a fifth embodiment of a cross-cluster registration synchronization center provided in the present application, where the cross-cluster registration synchronization center may be a cross-cluster registration synchronization center of any service processing method based on a service cluster system. Specifically, as shown in fig. 7, the cross-cluster registration synchronization center 60 includes: to the external gateway 61, internal server 62.
The external gateway 61 is configured to obtain a service invocation request, where the service invocation request includes: and identifying the service to be called.
And the internal server 62 is configured to search a service cluster list where the service identifier to be called is located according to the service calling request.
The internal server 62 is further configured to obtain a second time difference and a third time difference corresponding to each service cluster in the service cluster list according to the second time delay table and the third time delay table, and obtain a time delay level of each service cluster according to the second time difference and the corresponding weight, and the third time difference and the corresponding weight.
The internal server 62 is further configured to obtain the load corresponding to the service identifier to be called under each service cluster according to the service load ordered list, and obtain the priority of each service cluster according to the delay level and the corresponding weight of each service cluster, and the load and the corresponding weight of the service identifier to be called under each service cluster.
The external gateway 61 is further configured to send the service invocation request to the service cluster with the highest priority, so that the service cluster with the highest priority performs corresponding service invocation processing according to the service invocation request.
The cross-cluster registration synchronization center 60 in this embodiment may perform the second or fourth embodiments of the method, and the implementation principle and technical effect are similar, which are not described herein again.
On the basis of the above embodiment, the internal server 62 is further configured to:
carrying out heartbeat mechanism processing with the registration center in each service cluster to obtain a second time delay table, and respectively sending the second time delay table to the registration center in each service cluster; wherein the second time delay comprises a second time difference corresponding to each service cluster.
Respectively acquiring a third time delay table reported by each service cluster; and the third time delay table is obtained by the registration center in the service cluster performing heartbeat mechanism processing on other service clusters.
On the basis of the above embodiment, the internal server 62 is further configured to:
and respectively acquiring a service load list corresponding to each service under the service cluster reported by each service cluster, integrating the same service, and acquiring a service load ordered list.
Fig. 8 is a schematic structural diagram of a sixth embodiment of a service cluster system provided in the present application, and as shown in fig. 8, the service cluster system 70 includes: service cluster 50, register sync center 60 across clusters.
The service cluster 50 is configured to execute the technical solution provided in the foregoing first embodiment or third embodiment; the cross-cluster registration synchronization center 60 is configured to execute the technical solutions provided in the foregoing second embodiment or fourth embodiment.
The application provides a service cluster, this server includes: a processor, a memory, and a communication interface; wherein the memory is used for storing executable instructions executable by the processor; the processor is configured to execute the technical solution in the first embodiment or the third embodiment through executing the executable instructions. Alternatively, the memory may be separate or integrated with the processor.
Optionally, when the memory is a device independent from the processor, the service cluster may further include: and the bus is used for connecting the devices.
The server is configured to execute the technical solution in the first embodiment or the third embodiment, and the implementation principle and the technical effect are similar, which are not described herein again.
The application provides a cross-cluster registration synchronization center, and the electronic device includes: a processor, a memory, and a communication interface; wherein the memory is used for storing executable instructions executable by the processor; the processor is configured to execute the technical solution in the second embodiment or the fourth embodiment through executing the executable instructions.
Alternatively, the memory may be separate or integrated with the processor.
Optionally, when the memory is an independent device, the cross-cluster registration synchronization center may further include: and the bus is used for connecting the devices.
The cross-cluster registration synchronization center is configured to execute the technical solution in the second embodiment or the fourth embodiment, and the implementation principle and the technical effect are similar, which are not described herein again.
The embodiment of the present application provides a readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the technical solutions provided in the first embodiment or the third embodiment.
The embodiment of the present application provides a readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the technical solutions provided in the second embodiment or the fourth embodiment.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) referred to in the present application are information and data authorized by the user or fully authorized by each party, and the collection, use and processing of the related data need to comply with relevant laws and regulations and standards of relevant countries and regions, and are provided with corresponding operation entries for the user to select authorization or denial.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (19)

1. A service processing method based on a service cluster system is characterized by comprising the following steps:
a first service cluster receives a service calling request sent by a cross-cluster registration synchronous center, wherein the service calling request comprises: a service identifier to be called;
the first service cluster calls a service to be called corresponding to the service identifier to be called according to the service calling request, and queries and acquires an identifier of a second service cluster corresponding to the service identifier to be called from a first registry in the first service cluster when the calling service associated with the service to be called is determined to be called and the associated calling service is not in the first service cluster in the calling process;
and the first service cluster sends a cross-cluster calling request carrying the identification of the associated calling service to a second service cluster corresponding to the identification of the second service cluster, so that the second service cluster calls the associated calling service corresponding to the identification of the associated calling service according to the cross-cluster calling request.
2. The method according to claim 1, wherein the first service cluster performs call processing on the service to be called corresponding to the service identifier to be called according to the service call request, and includes:
the local API gateway in the first service cluster inquires and acquires a current service load list corresponding to the service identifier to be called and a first time difference corresponding to the service identifier to be called in the current first time delay table from the first registration center according to the service calling request, and acquires a service node with the highest priority under the service to be called according to the current load list, the corresponding weight, the first time difference and the corresponding weight so as to forward the service calling request to the service node with the highest priority;
and the service node with the highest priority in the first service cluster carries out service calling processing according to the calling request.
3. The method of claim 2, further comprising:
the first registration center in the first service cluster performs heartbeat mechanism processing with each service in the first service cluster respectively to acquire or update the first time delay table, where the first time delay table includes a first time difference corresponding to each service;
and the first registration center in the first service cluster respectively acquires a service load list corresponding to each service according to the load state of the service node in each service in the first service cluster, and sends the service load list corresponding to each service to the cross-cluster registration synchronization center.
4. The method of any of claims 1 to 3, further comprising:
the first registration center in the first service cluster performs heartbeat mechanism processing on other service clusters to obtain a third delay table, and sends the third delay table to the cross-cluster registration synchronization center;
wherein the third delay table includes a third time difference corresponding to each service cluster.
5. A service processing method based on a service cluster system is characterized by comprising the following steps:
acquiring a service call request by a cross-cluster registration synchronous center, wherein the service call request comprises: a service identifier to be called;
the cross-cluster registration synchronization center searches and acquires a service cluster list where the service identifier to be called is located according to the service calling request;
the cross-cluster registration synchronization center respectively acquires a second time difference and a third time difference corresponding to each service cluster in the service cluster list according to a second time delay table and a third time delay table, and respectively acquires a time delay level of each service cluster according to the second time difference and a corresponding weight as well as the third time difference and a corresponding weight;
the cross-cluster registration synchronization center respectively acquires the corresponding load of the service identifier to be called under each service cluster according to the service load ordered list, and acquires the priority of each service cluster according to the time delay level and the corresponding weight of each service cluster, and the corresponding load and the corresponding weight of the service identifier to be called under each service cluster;
and the cross-cluster registration synchronization center sends the service calling request to the service cluster with the highest priority so that the service cluster with the highest priority carries out corresponding service calling processing according to the service calling request.
6. The method of claim 5, further comprising:
the cross-cluster registration synchronization center respectively performs heartbeat mechanism processing with the registration center in each service cluster to acquire a second time delay table, and respectively sends the second time delay table to the registration center in each service cluster; wherein the second delay comprises a second time difference corresponding to each service cluster;
the cross-cluster registration synchronization center respectively acquires a third time delay table reported by each service cluster; and the third time delay table is obtained by the registration center in the service cluster performing heartbeat mechanism processing on other service clusters.
7. The method of claim 5 or 6, further comprising:
and the cross-cluster registration synchronization center respectively acquires a service load list corresponding to each service under each service cluster reported by each service cluster, integrates the same service and acquires a service load ordered list.
8. A service cluster, comprising:
the API gateway is used for receiving a service calling request sent by a cross-cluster registration synchronous center, and the service calling request comprises: a service identifier to be called;
the service is used for calling the service to be called corresponding to the service identification to be called according to the service calling request, and inquiring and acquiring the identification of a second service cluster corresponding to the service identification to be called from a first registration center in the service cluster when the calling service associated with the service to be called is determined to be called and the associated calling service is not in the service cluster in the calling process;
the service is further configured to send a cross-cluster call request carrying the identifier of the associated call service to a second service cluster corresponding to the identifier of the second service cluster, so that the second service cluster calls the associated call service corresponding to the identifier of the associated call service according to the cross-cluster call request.
9. The service cluster of claim 8, wherein the API gateway is specifically configured to:
according to the service calling request, inquiring and acquiring a current service load list corresponding to the service identifier to be called and a first time difference corresponding to the service identifier to be called in the current first time delay table from the first registration center, and acquiring a service node with the highest priority under the service to be called according to the current load list, the corresponding weight, the first time difference and the corresponding weight so as to forward the service calling request to the service node with the highest priority;
and the service node with the highest priority in the first service cluster carries out service calling processing according to the calling request.
10. The service cluster according to claim 9, wherein the first registration center is configured to perform heartbeat mechanism processing on each service in the service cluster, and obtain or update the first delay table, where the first delay table includes a first time difference corresponding to each service;
and respectively acquiring a service load list corresponding to each service according to the load state of the service node in each service in the first service cluster, and sending the service load list corresponding to each service to the cross-cluster registration synchronization center.
11. The service cluster of any of claims 8 to 10, wherein the first registry is further configured to:
carrying out heartbeat mechanism processing on other service clusters to obtain a third time delay table, and sending the third time delay table to the cross-cluster registration synchronization center;
and the third time delay table comprises a third time difference corresponding to each service cluster.
12. A cross-cluster registry sync center, comprising:
the external gateway is configured to obtain a service invocation request, where the service invocation request includes: a service identifier to be called;
the internal server is used for searching and acquiring a service cluster list where the service identifier to be called is located according to the service calling request;
the internal server is further configured to obtain a second time difference and a third time difference corresponding to each service cluster in the cluster list according to a second time delay table and a third time delay table, and obtain a time delay level of each service cluster according to the second time difference and a corresponding weight, and the third time difference and a corresponding weight;
the internal server is further configured to obtain, according to the service load ordered list, loads corresponding to the service identifiers to be called in each service cluster, and obtain the priority of each service cluster according to the delay level and the corresponding weight of each service cluster, and the load and the corresponding weight of the service identifiers to be called in each service cluster;
and the external gateway is further configured to send the service invocation request to the service cluster with the highest priority, so that the service cluster with the highest priority performs corresponding service invocation processing according to the service invocation request.
13. The cross-cluster registration synchronization center of claim 12, wherein the internal server is further configured to:
carrying out heartbeat mechanism processing with a registration center in each service cluster to obtain a second time delay table, and respectively sending the second time delay table to the registration center in each service cluster; wherein the second delay comprises a second time difference corresponding to each service cluster;
respectively acquiring a third time delay table reported by each service cluster; and the third time delay table is obtained by the registration center in the service cluster performing heartbeat mechanism processing on other service clusters.
14. The cross-cluster registry sync center of claim 12 or 13 wherein the internal server is further configured to:
and respectively acquiring a service load list corresponding to each service under each service cluster reported by each service cluster, integrating the same service, and acquiring a service load ordered list.
15. A service clustering system, comprising: registering a synchronization center and a plurality of service clusters across the clusters; wherein the cross-cluster registration synchronization center is configured to perform the service processing method according to any one of claims 5 to 7; the service cluster is configured to perform the service processing method according to any one of claims 1 to 4.
16. A service cluster, comprising:
a processor, a memory, a communication interface;
the memory is used for storing executable instructions executable by the processor;
wherein the processor is configured to perform the service processing method of any of claims 1 to 4 via execution of the executable instructions.
17. A cross-cluster registry sync center, comprising:
a processor, a memory, a communication interface;
the memory is to store executable instructions executable by the processor;
wherein the processor is configured to perform the service processing method of any of claims 5 to 7 via execution of the executable instructions.
18. A readable storage medium on which a computer program is stored, the computer program, when being executed by a processor, implementing the service processing method of any one of claims 1 to 4.
19. A readable storage medium on which a computer program is stored, the computer program, when being executed by a processor, implementing the service processing method of any one of claims 5 to 7.
CN202211519497.9A 2022-11-30 2022-11-30 Service processing method, device, equipment and medium based on service cluster system Pending CN115866061A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211519497.9A CN115866061A (en) 2022-11-30 2022-11-30 Service processing method, device, equipment and medium based on service cluster system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211519497.9A CN115866061A (en) 2022-11-30 2022-11-30 Service processing method, device, equipment and medium based on service cluster system

Publications (1)

Publication Number Publication Date
CN115866061A true CN115866061A (en) 2023-03-28

Family

ID=85668189

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211519497.9A Pending CN115866061A (en) 2022-11-30 2022-11-30 Service processing method, device, equipment and medium based on service cluster system

Country Status (1)

Country Link
CN (1) CN115866061A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116633993A (en) * 2023-07-25 2023-08-22 中邮消费金融有限公司 Cross-network micro-service calling method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116633993A (en) * 2023-07-25 2023-08-22 中邮消费金融有限公司 Cross-network micro-service calling method, device, equipment and storage medium
CN116633993B (en) * 2023-07-25 2023-10-10 中邮消费金融有限公司 Cross-network micro-service calling method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN115442423A (en) Method for discovering services provided by a network repository function
JP3938237B2 (en) Internet telephone caller ID notification device
CN108989372A (en) Method, registration center and the equipment of service discovery
EP1727332A2 (en) Name service system and method thereof
CN113973129B (en) Gateway supporting multiple registry micro services
CN110769080B (en) Domain name resolution method, related product and computer readable storage medium
US20130279497A1 (en) Method for correlating messages across multiple protocols in a telecommunication network
CN112217856A (en) Address acquisition method, device, equipment and storage medium of application example
JP2013157748A (en) Service bus system, service bus device, and method for assuring connection uniqueness
CN115866061A (en) Service processing method, device, equipment and medium based on service cluster system
US11057242B2 (en) Address system
CN102859970A (en) Values represented as internet protocol addresses
CN109831473A (en) Logistics service providing method and equipment
CN112104680B (en) Method, device and equipment for determining edge application and storage medium
US8498400B2 (en) Method and system for implementing number portability service
CN1403895A (en) Calling party sign displayed on personal computer
JP5466750B1 (en) PBX subscriber data registration method and PBX system
JP6533502B2 (en) Communication service providing system and communication service providing method
US20220109703A1 (en) Call processing server, call processing method, and call processing program
JP6329479B2 (en) ENUM cache server, ENUM cache method, and ENUM system
CN105791456B (en) Device, system and method for realizing mobile terminal addressing between circuit domain and packet domain
JP6310411B2 (en) Communication system and congestion avoidance method
CN112866437A (en) Data processing method and domain name resolution architecture
US20040109446A1 (en) Calling method and system of flexible IP internet phone
JP6535298B2 (en) ENUM server, ENUM data registration / answer method and program

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