CN113407382B - Dynamic regulation and control method and system for service fault - Google Patents
Dynamic regulation and control method and system for service fault Download PDFInfo
- Publication number
- CN113407382B CN113407382B CN202110659974.0A CN202110659974A CN113407382B CN 113407382 B CN113407382 B CN 113407382B CN 202110659974 A CN202110659974 A CN 202110659974A CN 113407382 B CN113407382 B CN 113407382B
- Authority
- CN
- China
- Prior art keywords
- service
- backup
- service instance
- main
- address
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/20—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
- G06F11/202—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant
- G06F11/2023—Failover techniques
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Hardware Redundancy (AREA)
Abstract
The invention provides a dynamic regulation and control method and a dynamic regulation and control system for service faults, which belong to the technical field of computers, and the dynamic regulation and control method for the service faults 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 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; when the main server site finds a fault, the cross-site unified registration center can automatically switch to the backup server site and call corresponding services by using the backup service instance node resource list.
Description
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a dynamic regulation and control method and system for service faults.
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.
Claims (5)
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;
the method comprises the steps that metadata are added to services of each registry to allow a user to define extension data for each service, and the metadata of backup services are added to producer services to define addresses of the backup services corresponding to different available areas;
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;
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: calling the corresponding service by using the address of the corresponding main service instance;
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 utilizing the backup service instance node resource list according to the service calling information;
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.
2. 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 method comprises the steps that metadata are added to services of each registry to allow a user to define extension data for each service, and the metadata of backup services are added to producer services to define addresses of the backup services corresponding to different available areas;
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; specifically, the method comprises the following steps: 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; obtaining the address of the corresponding main service instance according to the available main service instance; calling the corresponding service by using the address of the corresponding main service instance;
the backup service registration center calls the module, is used for when the corresponding main service example in the node resource list of the said main service example is unavailable, the said backup service registration center utilizes the node resource list of the said backup service example to call the corresponding service according to the said service call information; specifically, the method comprises the following steps: the backup service registration center finds available backup service instances in the backup service instance node resource list according to the service calling information; obtaining the address of the corresponding backup service instance according to the available backup service instance; and calling the corresponding service by using the address of the corresponding backup service instance.
3. 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;
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: calling corresponding service according to the address of the main service instance;
and 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 utilizing the backup service instance node resource list according to the service calling information;
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.
4. The dynamic regulation and control method of service fault as claimed in claim 3, characterized in that said 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.
5. 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 method comprises the steps that metadata are added to services of each registry to allow a user to define extension data for each service, and the metadata of backup services are added to producer services to define addresses of the backup services corresponding to different available areas;
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; specifically, the method comprises the following steps: 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; 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; calling corresponding service according to the address of the main service instance;
the cross-site unified registry calls corresponding services 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; specifically, the method comprises the following steps: 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; 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; and calling corresponding service according to the address of the backup service instance.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110659974.0A CN113407382B (en) | 2021-06-15 | 2021-06-15 | Dynamic regulation and control method and system for service fault |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110659974.0A CN113407382B (en) | 2021-06-15 | 2021-06-15 | Dynamic regulation and control method and system for service fault |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113407382A CN113407382A (en) | 2021-09-17 |
CN113407382B true CN113407382B (en) | 2022-04-01 |
Family
ID=77683924
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110659974.0A Active CN113407382B (en) | 2021-06-15 | 2021-06-15 | Dynamic regulation and control method and system for service fault |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113407382B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115396296B (en) * | 2022-08-18 | 2023-06-27 | 中电金信软件有限公司 | Service processing method, device, electronic equipment and computer readable storage medium |
CN115914241B (en) * | 2022-09-27 | 2024-06-11 | 重庆富民银行股份有限公司 | Opensips-based registration center system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109257440A (en) * | 2018-10-29 | 2019-01-22 | 南京南瑞信息通信科技有限公司 | A kind of service discovery and client load equalization methods based on service register center |
US10560353B1 (en) * | 2014-09-16 | 2020-02-11 | Amazon Technologies, Inc. | Deployment monitoring for an application |
CN111414230A (en) * | 2020-03-18 | 2020-07-14 | 北京达佳互联信息技术有限公司 | Service management system, service management method, server, and storage medium |
CN112286503A (en) * | 2020-10-28 | 2021-01-29 | 平安科技(深圳)有限公司 | Multi-registration center micro-service unified management method, device, equipment and medium |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9806911B2 (en) * | 2015-11-02 | 2017-10-31 | International Business Machines Corporation | Distributed virtual gateway appliance |
WO2021026923A1 (en) * | 2019-08-15 | 2021-02-18 | Nokia Solutions And Networks Oy | Detection of instance liveness |
CN111464592B (en) * | 2020-03-09 | 2023-07-25 | 平安科技(深圳)有限公司 | Load balancing method, device, equipment and storage medium based on micro-service |
CN112653574B (en) * | 2020-12-11 | 2023-07-04 | 邦彦技术股份有限公司 | Service disaster recovery method and system based on IMS cluster application |
CN112671882B (en) * | 2020-12-18 | 2022-03-01 | 上海安畅网络科技股份有限公司 | Same-city double-activity system and method based on micro-service |
CN112637335B (en) * | 2020-12-22 | 2022-02-22 | 新华三大数据技术有限公司 | Main/standby mode service deployment method, device, equipment and storage medium |
CN112583648B (en) * | 2021-02-24 | 2021-06-25 | 北京城建设计发展集团股份有限公司 | Intelligent service fault processing method based on DNS |
-
2021
- 2021-06-15 CN CN202110659974.0A patent/CN113407382B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10560353B1 (en) * | 2014-09-16 | 2020-02-11 | Amazon Technologies, Inc. | Deployment monitoring for an application |
CN109257440A (en) * | 2018-10-29 | 2019-01-22 | 南京南瑞信息通信科技有限公司 | A kind of service discovery and client load equalization methods based on service register center |
CN111414230A (en) * | 2020-03-18 | 2020-07-14 | 北京达佳互联信息技术有限公司 | Service management system, service management method, server, and storage medium |
CN112286503A (en) * | 2020-10-28 | 2021-01-29 | 平安科技(深圳)有限公司 | Multi-registration center micro-service unified management method, device, equipment and medium |
Also Published As
Publication number | Publication date |
---|---|
CN113407382A (en) | 2021-09-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112671882B (en) | Same-city double-activity system and method based on micro-service | |
US7844851B2 (en) | System and method for protecting against failure through geo-redundancy in a SIP server | |
JP3974652B2 (en) | Hardware and data redundancy architecture for nodes in communication systems | |
EP1810447B1 (en) | Method, system and program product for automated topology formation in dynamic distributed environments | |
CN113407382B (en) | Dynamic regulation and control method and system for service fault | |
CN102148850B (en) | Cluster system and service processing method thereof | |
CN112003716A (en) | Data center dual-activity implementation method | |
CN113572831B (en) | Communication method, computer equipment and medium between Kubernetes clusters | |
CN106599711A (en) | Database access control method and device | |
CN108632067A (en) | Disaster tolerance dispositions method, apparatus and system | |
CN110391940B (en) | Service address response method, device, system, equipment and storage medium | |
CN110661641B (en) | Virtual network function VNF deployment method and device | |
WO2020057445A1 (en) | Communication system, method, and device | |
CN111083177B (en) | Cross-domain collaborative interaction method based on collaborative gateway | |
WO2022007908A1 (en) | Method for service collaboration between network element devices, and network element device | |
CN112511326A (en) | Switching method, device, equipment and storage medium | |
CN113381936B (en) | Network information processing method and device and network equipment | |
CN115865932B (en) | Traffic scheduling method and device, electronic equipment and storage medium | |
CN113904973B (en) | Route updating method, medium, device and computing equipment | |
CN116319963A (en) | Service management method, system, terminal equipment and storage medium | |
KR20090029404A (en) | Load distributed type duplex system | |
CN114268581A (en) | Method for realizing high availability and load sharing of network equipment | |
CN112732482A (en) | Cifs service backup switching method, device, equipment and readable storage medium | |
CN112468466A (en) | Realization system for super-large-scale IMS AS technology | |
CN111817954B (en) | Switching method of route reflection mode and network architecture system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |