Dynamic regulation and control method and system for service fault

文档序号:7384 发布日期:2021-09-17 浏览:47次 中文

1. A dynamic regulation and control method for service faults is characterized by comprising the following steps:

step 1: acquiring a main service instance address on a main server site and a backup service instance address on a backup server site;

step 2: registering the main service instance address with a main service registration center to generate a main service instance node resource list;

and step 3: registering the backup service instance address with a backup service registration center to generate a backup service instance node resource list;

and 4, step 4: acquiring service calling information;

and 5: the main service registration center calls corresponding services by utilizing the main service instance node resource list according to the service calling information;

step 6: and when the corresponding main service instance in the main service instance node resource list is unavailable, the backup service registration center calls the corresponding service by utilizing the backup service instance node resource list according to the service calling information.

2. The dynamic regulation and control method of service faults as claimed in claim 1, wherein the step 5: the main service registration center calls corresponding services by utilizing the main service instance node resource list according to the service calling information, and the service calling information comprises the following steps:

step 5.1: the master service registration center discovers an available master service instance in the master service instance node resource list according to the service calling information;

step 5.2: obtaining the address of the corresponding main service instance according to the available main service instance;

step 5.3: and calling the corresponding service by using the address of the corresponding main service instance.

3. The dynamic regulation and control method for service faults as claimed in claim 2, wherein the step 6: when the corresponding main service instance in the main service instance node resource list is unavailable, the backup service registration center calls the corresponding service by using the backup service instance node resource list according to the service calling information, and the method comprises the following steps:

step 6.1: the backup service registration center finds available backup service instances in the backup service instance node resource list according to the service calling information;

step 6.2: obtaining the address of the corresponding backup service instance according to the available backup service instance;

step 6.3: and calling the corresponding service by using the address of the corresponding backup service instance.

4. A service fault dynamic regulation system, comprising:

the service instance address acquisition module is used for acquiring a main service instance address on a main server site and a backup service instance address on a backup server site;

the master service instance registration module is used for registering the master service instance address with a master service registration center to generate a master service instance node resource list;

the backup service instance registration module is used for registering the backup service instance address to a backup service registration center to generate a backup service instance node resource list;

the service calling information acquisition module is used for acquiring service calling information;

the main service registry calls the module, is used for the said main service registry to call the corresponding service according to the said service call information with the said main service instance node resource tabulation;

and the backup service registry calls the corresponding service by utilizing the backup service instance node resource list according to the service calling information when the corresponding main service instance in the main service instance node resource list is unavailable.

5. A dynamic regulation and control method for service faults is characterized by comprising the following steps:

step 1: acquiring a main service instance address on a main server site and a backup service instance address on a backup server site;

step 2: registering to a cross-site unified registry by using the main service instance address and the backup service instance address to generate a main service instance node resource list and a backup service instance node resource list;

and step 3: acquiring service calling information;

and 4, step 4: the cross-site unified registry calls corresponding services by utilizing the main service instance node resource list according to the service calling information;

and 5: and when the corresponding main service instance in the main service instance node resource list is unavailable, the cross-site unified registry calls the corresponding service by utilizing the backup service instance node resource list according to the service calling information.

6. The dynamic regulation and control method of service faults as claimed in claim 5, wherein the step 2: registering to a cross-site unified registry by using the main service instance address and the backup service instance address to generate a main service instance node resource list and a backup service instance node resource list, wherein the steps of:

step 2.1: acquiring a main gateway address of the main server site;

step 2.2: registering to the cross-site unified registry according to the main service instance address and the main gateway address to generate the main service instance node resource list;

step 2.3: acquiring a backup gateway address on the backup server site;

step 2.4: and registering the cross-site unified registry according to the backup service instance address and the backup gateway address to generate the backup service instance node resource list.

7. The dynamic regulation and control method of service failure as claimed in claim 6, wherein the step 4: the cross-site unified registry calls corresponding services by utilizing the main service instance node resource list according to the service calling information, and the method comprises the following steps:

step 4.1: configuring a corresponding main service independent process for each service instance by utilizing the cross-site unified registry to the main service instance node resource list; the main service independent process comprises: the address of the corresponding main service instance, the available area where the corresponding main service instance is located, and the health status of the corresponding main service instance;

step 4.2: the cross-site unified registry discovers available main service instances in the main service independent process and addresses of corresponding main service instances according to the service calling information;

step 4.3: and calling corresponding service according to the address of the main service instance.

8. The dynamic regulation and control method of service fault as claimed in claim 7, characterized in that said step 5: when the corresponding main service instance in the main service instance node resource list is unavailable, the cross-site unified registry calls the corresponding service by using the backup service instance node resource list according to the service calling information, and the method comprises the following steps:

step 5.1: configuring a corresponding backup service independent process for each backup service instance by utilizing the cross-site unified registry to the backup service instance node resource list; the backup service independent process comprises the following steps: the address of the corresponding backup service instance, the available area where the corresponding backup service instance is located, and the health status of the corresponding backup service instance;

step 5.2: the cross-site unified registry discovers available backup service instances and addresses of corresponding backup service instances in the backup service independent process according to the service calling information;

step 5.3: and calling corresponding service according to the address of the backup service instance.

9. A system for dynamic regulation of service faults, comprising:

the service instance address acquisition module is used for acquiring a main service instance address on a main server site and a backup service instance address on a backup server site;

the service registration module is used for registering the main service instance address and the backup service instance address to a cross-site unified registry to generate a main service instance node resource list and a backup service instance node resource list;

the service calling information acquisition module is used for acquiring service calling information;

the cross-site unified registry is used for calling corresponding services by utilizing the main service instance node resource list according to the service calling information;

and the cross-site unified registry calls the corresponding service by using the backup service instance node resource list according to the service calling information when the corresponding main service instance in the main service instance node resource list is unavailable.

Background

With the rapid use of cloud computing technology in enterprises and the continuous improvement of core service availability requirements of enterprises, how to provide extensible and highly reliable infrastructure support for the continuous development of enterprise business in combination with cloud computing technology becomes a problem that cloud of enterprises must pay attention to. Deployment modes such as double-living in the same city, remote disaster recovery and the like are classic solutions for guaranteeing service availability of enterprises under the condition of abnormal service or disaster.

The two living in the same city are two machine rooms built in the same city or similar areas. The distance between the two same-city computer rooms is relatively short, the quality of a communication line is good, synchronous copying of data is easy to achieve, and high data integrity and zero data loss are guaranteed. Two machine rooms in the same city respectively bear a part of flow, the general inlet flow is completely random, internal RPC calls are closed to the same machine room through a nearby route as much as possible, and two independent clusters are equivalently deployed in the two machine rooms in a mirror mode, so that when the whole network of the city or the region where the service is located fails and an irresistible natural disaster occurs, service failure and data loss risks can be caused.

The remote disaster recovery is to establish a remote disaster recovery center to perform remote backup of data, and after a disaster occurs, it is to ensure that the original data is not lost or damaged, so the remote disaster recovery is to establish a data backup system or a disaster recovery system, and after a service failure occurs or data is lost, the service recovery time provided by the disaster recovery system is very long.

Disclosure of Invention

The invention aims to provide a dynamic regulation and control method and a dynamic regulation and control system for service faults, and aims to solve the problems that data loss is easy to occur and the provided service recovery time is long under the condition of natural disaster or abnormal service of the existing double-life or remote disaster recovery system in the same city.

In order to achieve the purpose, the invention adopts the technical scheme that: a dynamic regulation and control method for service faults comprises the following steps:

step 1: acquiring a main service instance address on a main server site and a backup service instance address on a backup server site;

step 2: registering the main service instance address with a main service registration center to generate a main service instance node resource list;

and step 3: registering the backup service instance address with a backup service registration center to generate a backup service instance node resource list;

and 4, step 4: acquiring service calling information;

and 5: the main service registration center calls corresponding services by utilizing the main service instance node resource list according to the service calling information;

step 6: and when the corresponding main service instance in the main service instance node resource list is unavailable, the backup service registration center calls the corresponding service by utilizing the backup service instance node resource list according to the service calling information.

Preferably, the step 5: the main service registration center calls corresponding services by utilizing the main service instance node resource list according to the service calling information, and the service calling information comprises the following steps:

step 5.1: the master service registration center discovers an available master service instance in the master service instance node resource list according to the service calling information;

step 5.2: obtaining the address of the corresponding main service instance according to the available main service instance;

step 5.3: and calling the corresponding service by using the address of the corresponding main service instance.

Preferably, the step 6: when the corresponding main service instance in the main service instance node resource list is unavailable, the backup service registration center calls the corresponding service by using the backup service instance node resource list according to the service calling information, and the method comprises the following steps:

step 6.1: the backup service registration center finds available backup service instances in the backup service instance node resource list according to the service calling information;

step 6.2: obtaining the address of the corresponding backup service instance according to the available backup service instance;

step 6.3: and calling the corresponding service by using the address of the corresponding backup service instance.

The invention also provides a service fault dynamic regulation and control system, which comprises:

the service instance address acquisition module is used for acquiring a main service instance address on a main server site and a backup service instance address on a backup server site;

the master service instance registration module is used for registering the master service instance address with a master service registration center to generate a master service instance node resource list;

the backup service instance registration module is used for registering the backup service instance address to a backup service registration center to generate a backup service instance node resource list;

the service calling information acquisition module is used for acquiring service calling information;

the main service registry calls the module, is used for the said main service registry to call the corresponding service according to the said service call information with the said main service instance node resource tabulation;

and the backup service registry calls the corresponding service by utilizing the backup service instance node resource list according to the service calling information when the corresponding main service instance in the main service instance node resource list is unavailable.

The invention also provides a dynamic regulation and control method for the service fault, which comprises the following steps:

step 1: acquiring a main service instance address on a main server site and a backup service instance address on a backup server site;

step 2: registering to a cross-site unified registry by using the main service instance address and the backup service instance address to generate a main service instance node resource list and a backup service instance node resource list;

and step 3: acquiring service calling information;

and 4, step 4: the cross-site unified registry calls corresponding services by utilizing the main service instance node resource list according to the service calling information;

and 5: and when the corresponding main service instance in the main service instance node resource list is unavailable, the cross-site unified registry calls the corresponding service by utilizing the backup service instance node resource list according to the service calling information.

Preferably, the step 2: registering to a cross-site unified registry by using the main service instance address and the backup service instance address to generate a main service instance node resource list and a backup service instance node resource list, wherein the steps of:

step 2.1: acquiring a main gateway address of the main server site;

step 2.2: registering to the cross-site unified registry according to the main service instance address and the main gateway address to generate the main service instance node resource list;

step 2.3: acquiring a backup gateway address on the backup server site;

step 2.4: and registering the cross-site unified registry according to the backup service instance address and the backup gateway address to generate the backup service instance node resource list.

Preferably, the step 4: the cross-site unified registry calls corresponding services by utilizing the main service instance node resource list according to the service calling information, and the method comprises the following steps:

step 4.1: configuring a corresponding main service independent process for each service instance by utilizing the cross-site unified registry to the main service instance node resource list; the main service independent process comprises: the address of the corresponding main service instance, the available area where the corresponding main service instance is located, and the health status of the corresponding main service instance;

step 4.2: the cross-site unified registry discovers available main service instances in the main service independent process and addresses of corresponding main service instances according to the service calling information;

step 4.3: and calling corresponding service according to the address of the main service instance.

Preferably, the step 5: when the corresponding main service instance in the main service instance node resource list is unavailable, the cross-site unified registry calls the corresponding service by using the backup service instance node resource list according to the service calling information, and the method comprises the following steps:

step 5.1: configuring a corresponding backup service independent process for each backup service instance by utilizing the cross-site unified registry to the backup service instance node resource list; the backup service independent process comprises the following steps: the address of the corresponding backup service instance, the available area where the corresponding backup service instance is located, and the health status of the corresponding backup service instance;

step 5.2: the cross-site unified registry discovers available backup service instances and addresses of corresponding backup service instances in the backup service independent process according to the service calling information;

step 5.3: and calling corresponding service according to the address of the backup service instance.

The invention also provides a service fault dynamic regulation and control system, which comprises:

the service instance address acquisition module is used for acquiring a main service instance address on a main server site and a backup service instance address on a backup server site;

the service registration module is used for registering the main service instance address and the backup service instance address to a cross-site unified registry to generate a main service instance node resource list and a backup service instance node resource list;

the service calling information acquisition module is used for acquiring service calling information;

the cross-site unified registry is used for calling corresponding services by utilizing the main service instance node resource list according to the service calling information;

and the cross-site unified registry calls the corresponding service by using the backup service instance node resource list according to the service calling information when the corresponding main service instance in the main service instance node resource list is unavailable.

The method and the system for dynamically regulating and controlling the service fault have the advantages that: compared with the prior art, the dynamic regulation and control method for the service fault comprises the following steps: acquiring a main service instance address on a main server site and a backup service instance address on a backup server site; registering to a cross-site unified registry by using the main service instance address and the backup service instance address to generate a main service instance node resource list and a backup service instance node resource list; the cross-site unified registry calls corresponding services by utilizing the main service instance node resource list according to the service calling information; and when the corresponding main service instance in the main service instance node resource list is unavailable, the cross-site unified registry calls the corresponding service by utilizing the backup service instance node resource list according to the service calling information. The invention utilizes the cross-site unified registration center to register and discover the service instances, when the main server site discovers a fault, the cross-site unified registration center can automatically switch to the backup server site, and the corresponding service is called by utilizing the backup service instance node resource list.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed for the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.

Fig. 1 is a schematic diagram of a dynamic service fault regulation method according to embodiment 1 of the present invention;

fig. 2 is a flowchart of a dynamic service fault regulation method according to embodiment 1 of the present invention;

fig. 3 is a flowchart of a dynamic service fault regulation method according to embodiment 2 of the present invention;

fig. 4 is a schematic diagram of a cross-site unified registry regulation and control provided in embodiment 2 of the present invention.

Detailed Description

In order to make the technical problems, technical solutions and advantageous effects to be solved by the present invention more clearly apparent, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

The invention aims to provide a dynamic regulation and control method and a dynamic regulation and control system for service faults, and aims to solve the problems that data loss is easy to occur and the provided service recovery time is long under the condition of natural disaster or abnormal service of the existing double-life or remote disaster recovery system in the same city.

In the invention, better management and control are carried out on the calling between the services, a better mode is to carry out service registration and discovery based on a uniform registration center, and then the registration center can be utilized to realize the dynamic discovery of the available services. When the unified registry is provided, the invention can expand the registry, allows setting backup service addresses for each service, and preferentially returns the main service instance address when the caller discovers the service. And automatically switching to the address of the backup service instance when the main service instance is unavailable.

Example 1:

referring to fig. 1-2, to achieve the above object, the present invention adopts the following technical solutions: a dynamic regulation and control method for service faults comprises the following steps:

s1: acquiring a main service instance address on a main server site and a backup service instance address on a backup server site;

s2: registering with a main service registration center by using a main service instance address to generate a main service instance node resource list; the master service instance node resource list can regularly send heartbeat to the master service registration center to indicate that the master service registration center is in a healthy state, and the master service registration center can also actively detect activity.

S3: registering the backup service instance address to a backup service registration center to generate a backup service instance node resource list; the backup service instance node resource list can regularly send heartbeat to the backup service registration center to indicate that the backup service instance node resource list is in a healthy state, and the backup service registration center can also actively detect the activity.

In practical application, each site is provided with a registration center cluster, and the service of each site is registered with the registration center of the current site, that is, in the invention, one or more backup server sites can be provided, and the number of the corresponding backup service registration centers is consistent with the number of the backup server sites.

If service instances need to be backed up mutually among different sites, the service instances need to be registered with other registries besides the registry of the site so as to be discovered by the service instances of other registries, that is, the service instances are registered and discovered based on the service instances of the multi-registry. Since the network is not direct, registration and access to other registries are generally performed through the gateway of the corresponding site.

The definition of the backup service is supported by adding metadata expansion capability to the registry, and the specific expansion mode is as follows:

the user is allowed to define extended data for each service by adding metadata to the service of each registry, where the metadata of backup-services is added to the producer-service to define the addresses of backup services corresponding to different available areas. Therefore, when the independent process of the consumer side performs service discovery through the registration center, two types of service instance lists of the main service and the backup service are obtained. When the independent process receives the call of a consumer to the producer-service, the flow is intercepted by the independent process, and whether the main service is called or the backup service is switched to be called is determined according to the service instance state of the producer-service, so that the perception of the service state and the automatic call switching are realized.

Meanwhile, after the main service is recovered, the registration center can synchronize a new state and finally issue the new state to the independent process of the caller, so that the call of the backup service is automatically switched back to the call of the main service.

S4: acquiring service calling information;

s5: the main service registration center calls corresponding services by utilizing the main service instance node resource list according to the service calling information;

s5 specifically includes:

s5.1: the main service registration center discovers an available main service instance in a main service instance node resource list according to the service calling information;

s5.2: obtaining the address of the corresponding main service instance according to the available main service instance;

s5.3: the corresponding service is invoked using the address of the corresponding primary service instance.

In the invention, the service instance in the site carries out service discovery through the corresponding registration center, a healthy service instance list of the site can be preferentially discovered, service calling is initiated, and the calling performance is ensured by nearby access.

S6: and when the corresponding main service instance in the main service instance node resource list is unavailable, the backup service registration center calls the corresponding service by utilizing the backup service instance node resource list according to the service calling information.

In the present invention, when all service instances of the site are unavailable, the registry returns services registered by other sites, and the services of other sites continue to provide normal services, which will be described in detail below.

S6 specifically includes:

s6.1: the backup service registration center finds available backup service instances in the backup service instance node resource list according to the service calling information;

s6.2: obtaining the address of the corresponding backup service instance according to the available backup service instance;

s6.3: the corresponding service is invoked using the address of the corresponding backup service instance.

It should be noted that, in the present invention, the service instance call across the site is generally accessed through the gateway of the site because the network is not direct, and when the registry is not available, the service instance can continue to call using the local cache.

The invention also provides a service fault dynamic regulation and control system, which comprises:

the service instance address acquisition module is used for acquiring a main service instance address on a main server site and a backup service instance address on a backup server site;

the main service instance registration module is used for registering a main service instance address to a main service registration center to generate a main service instance node resource list;

the backup service instance registration module is used for registering a backup service instance address to a backup service registration center to generate a backup service instance node resource list;

the service calling information acquisition module is used for acquiring service calling information;

the main service registration center calling module is used for calling the corresponding service by the main service registration center according to the service calling information by utilizing the main service instance node resource list;

and the backup service registration center calls the corresponding service by utilizing the backup service instance node resource list according to the service calling information when the corresponding main service instance in the main service instance node resource list is unavailable.

By establishing the registration center, the invention can dynamically switch the calling of the backup service instance to the service of other available areas after all the service instances of one available area fail, thereby reducing the influence on service application and lowering the use cost.

Example 2:

referring to fig. 3, the present invention further provides a dynamic regulation method for service faults, including the following steps:

s1: acquiring a main service instance address on a main server site and a backup service instance address on a backup server site;

s2: registering to a cross-site unified registry by using a main service instance address and a backup service instance address to generate a main service instance node resource list and a backup service instance node resource list;

in the present invention, the service instance at each site is registered with the unified registry, and at this time, the service instance needs to include an intra-site address (used for service call at the same site) and a gateway address (used for service call at cross-site).

Each service instance can send heartbeat to the registration center periodically to indicate that the service instance is in a healthy state, and active activity detection can be carried out by the cross-site unified registration center.

The cross-site unified registry is distributed and deployed, 2 sites, 3 sites or more sites can be crossed, one site is guaranteed to be in fault, and the unavailability of most registered service instances, namely the high availability of the cross-site unified registry, can not be caused.

A further description of a process is provided below.

S2 specifically includes:

s2.1: acquiring a main gateway address of a main server site;

s2.2: registering to a cross-site unified registry according to the main service instance address and the main gateway address to generate a main service instance node resource list;

s2.3: acquiring a backup gateway address on a backup server site;

s2.4: and registering the cross-site unified registry according to the backup service instance address and the backup gateway address to generate a backup service instance node resource list.

Service discovery is carried out on services in the site through the cross-site unified registration center, a healthy service instance node resource list of the site can be preferentially discovered, service calling is initiated, and calling performance is guaranteed by nearby access.

When all the main service instances of the site are unavailable, the registration center returns the services registered by other sites, and the service instances of other sites (backup sites) continue to provide normal services.

In the invention, the cross-site service call is accessed through the gateway of the site generally because the network can not directly reach.

S3: acquiring service calling information;

s4: the cross-site unified registration center calls corresponding services by utilizing the main service instance node resource list according to the service calling information;

s4 specifically includes:

after a cross-site unified registry that spans multiple available zones is available, we need to solve the problem of how to switch service instances based on the cross-site unified registry. In order to reduce the intrusion to the service instance, the invention carries out flow interception and routing by introducing an independent process, and the basic working principle is as follows:

s4.1: configuring a corresponding main service independent process for each service instance by utilizing a cross-site unified registry to a main service instance node resource list; the main service independent process comprises the following steps: the address of the corresponding main service instance, the available area where the corresponding main service instance is located, and the health status of the corresponding main service instance;

s4.2: the cross-site unified registry discovers available main service instances and addresses of corresponding main service instances in the main service independent process according to the service calling information;

the invention deploys an independent process on the environment of each service instance for transparently intercepting the flow of the application, which can be realized by setting a relevant iptables rule, so that the flow of the application can firstly pass through the deployed independent process and then enter the user service, and the independent process has an opportunity to process the network flow under the condition of not invading the user service.

The traffic interception rule based on iptables is as follows:

iptables-t nat-A OUTPUT-p tcp-d 172.31.0.0/16-j REDIRECT--to-port 31000

the purpose of the instruction is to redirect all traffic with the destination address of 172.31.0.0/16 network segment and send the redirected traffic to the 31000 port monitored by the independent process, thereby realizing transparent interception of application traffic. The independent processes are communicated through a unified 31000 port according to the specification, and the flow entering and exiting the independent processes is controlled and the related treatment capacity is realized when the flow passes through.

As the service flow in and out can be intercepted by the independent process, the independent process can analyze the communication protocol according to the standard format, thereby realizing high-level treatment capability including routing, current limiting, fusing and the like. Here, the message description is performed by taking routing as an example:

suppose service a calls service B, C, communicates via HTTP, and routes according to different access paths, a calls B when accessing the/control-B path, and a calls C when accessing the/control-C path. Then in the traditional development mode, the user needs to implement the capability in his own business application. In the invention, the business application does not need to concern the target service addresses of different routes, only needs to carry out corresponding configuration on an independent process, the path access route of/control-B is connected to the service B, and the path access route of/control-C is connected to the service C. The independent process can acquire an access path address according to the specification of the HTTP protocol, and then forward the traffic according to the service instance list acquired from the registration center. The independent process can even control the load balancing strategy during flow forwarding, such as a polling mode, a random mode or a session maintaining mode, and can also determine whether to switch the target service instance address and the retry strategy according to the actual calling result, so that better application of the service governing strategy is realized under the condition that the business application is not required to modify codes.

S4.3: and calling the corresponding service according to the address of the main service instance.

S5: and when the corresponding main service instance in the main service instance node resource list is unavailable, the cross-site unified registry calls the corresponding service by utilizing the backup service instance node resource list according to the service calling information.

The independent process is configured and issued through the registration center, the basic information of the service accessed to the registration center, including the address of the service instance, the available area, the health state and the like, so that the service can know the running conditions of other services.

S5 specifically includes:

s5.1: configuring a corresponding backup service independent process for each backup service instance by utilizing a cross-site unified registry to a backup service instance node resource list; the backup service independent process comprises the following steps: the address of the corresponding backup service instance, the available area where the corresponding backup service instance is located, and the health status of the corresponding backup service instance;

s5.2: the cross-site unified registry discovers available backup service instances and addresses of corresponding backup service instances in the backup service independent process according to the service calling information;

s5.3: and calling the corresponding service according to the address of the backup service instance.

This process is further described below:

referring to fig. 4, when a call is made between two services, such as the call C is made by an independent process in the service B, statistics are made on the call condition, and when a call exception occurs, the instance of the call C is actively deleted from the call list. If all the available instances of C are deleted, the independent process in B automatically switches to the calling of C' deployed in another available area based on the service discovery result from the registration center, and the dynamic switching of service calling is completed. Meanwhile, more control strategies such as flow limitation of service access flow, safety authentication, forwarding to different service versions according to weight and the like can be issued through the registration center, and the service management capability independent of user application is realized.

Compared with the prior art, the dynamic regulation and control method for the service fault disclosed by the invention has the following advantages that:

1. for the deployment of the core component registration center across multiple available areas, service registration and discovery among cross-area services are realized through a mode of multi-registration center synchronization or cross-area deployment, and high availability of a control end is guaranteed.

2. The related service management capacity is sunk to a general layer by deploying an independent process, and the dynamic control capacity of the service fault is solved through service discovery on a unified data plane.

3. Through registration of services of a plurality of available areas of the registration center, the independent process can preferentially register and discover in the same available area according to the area to which the independent process belongs through interaction with the registration center, and the calling efficiency is improved; when the same available area service is unavailable, the external addresses of other available areas are automatically used for accessing, and dynamic service discovery and call switching are realized.

4. The independent process conveniently expands various universal capabilities for managing the service flow, including the flow limiting, safety, authentication and the like of the service, is favorable for forming unified service management, does not transform the original user service, and can be independently developed, upgraded and maintained.

5. The control plane (registration and control center) and the data plane (independent process, transparent flow interception) are separated, control data and service data are decoupled, and the control data and the service data are independent from each other and cannot affect each other.

The invention also provides a service fault dynamic regulation and control system, which comprises:

the service instance address acquisition module is used for acquiring a main service instance address on a main server site and a backup service instance address on a backup server site;

the service registration module is used for registering the cross-site unified registry by using the main service instance address and the backup service instance address to generate a main service instance node resource list and a backup service instance node resource list;

the service calling information acquisition module is used for acquiring service calling information;

the main service instance configuration module is used for calling corresponding services by the cross-site unified registry according to the service calling information by utilizing the main service instance node resource list;

and the backup service instance configuration module is used for calling the corresponding service by using the backup service instance node resource list according to the service calling information through the cross-site unified registry when the corresponding main service instance in the main service instance node resource list is unavailable.

The invention discloses a dynamic regulation and control method and a system for service faults, and the dynamic regulation and control method for the service faults, which comprises the following steps: acquiring a main service instance address on a main server site and a backup service instance address on a backup server site; registering to a cross-site unified registry by using the main service instance address and the backup service instance address to generate a main service instance node resource list and a backup service instance node resource list; the cross-site unified registry calls corresponding services by utilizing the main service instance node resource list according to the service calling information; and when the corresponding main service instance in the main service instance node resource list is unavailable, the cross-site unified registry calls the corresponding service by utilizing the backup service instance node resource list according to the service calling information. The invention utilizes the cross-site unified registration center to register and discover the service instances, when the main server site discovers a fault, the cross-site unified registration center can automatically switch to the backup server site, and the corresponding service is called by utilizing the backup service instance node resource list.

The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:主备系统切换方法、装置、服务器及主备系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!