CN115396482A - Cross-machine-room single-point service calling method - Google Patents
Cross-machine-room single-point service calling method Download PDFInfo
- Publication number
- CN115396482A CN115396482A CN202210973391.XA CN202210973391A CN115396482A CN 115396482 A CN115396482 A CN 115396482A CN 202210973391 A CN202210973391 A CN 202210973391A CN 115396482 A CN115396482 A CN 115396482A
- Authority
- CN
- China
- Prior art keywords
- program
- point service
- address
- agent
- service
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 23
- 230000008569 process Effects 0.000 claims description 4
- 230000000007 visual effect Effects 0.000 claims description 4
- 238000012216 screening Methods 0.000 claims description 2
- 230000004048 modification Effects 0.000 abstract description 4
- 238000012986 modification Methods 0.000 abstract description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000001360 synchronised effect Effects 0.000 description 4
- 230000002159 abnormal effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000008901 benefit Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000003111 delayed effect Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a cross-machine-room single-point service calling method, which is characterized by comprising the following steps of: configuring a service program, wherein the service program comprises an agent program and a management program; the agent program is deployed between the application program and the single-point service and used for routing the service request of the application program to the single-point service; the management program manages the proxy program address and the single-point service address through the control instruction; the application program requests to call the single-point service through the agent program; the single-point service returns a request result to the application program through the agent program; after the single-point service finishes processing the request, returning a result according to a request path; and the management program controls and monitors the updating and switching of the single-point service address in the multiple computer rooms. The method and the system achieve the effects of reducing the complexity of single-point service modification in a multi-computer room environment, ensuring the consistency of single-point service calling in all computer rooms and avoiding simultaneous service of a plurality of single-point services.
Description
Technical Field
The invention belongs to the field of micro-service management, and particularly relates to a cross-machine-room single-point service calling method.
Background
Since the sellers are in china and the buyers are distributed in various countries around the world in a global B2B online transaction website, in order to increase the access speed of website users, website operators may build machine rooms in multiple cities around the world, so that overseas buyers can request services nearby. However, not all data can be requested nearby, such as strong consistent data of price, inventory, etc., and need to be collected in a single machine room for processing, so as to avoid inconvenience to websites and users caused by data errors, and even damage to benefits. These handlers, which need to be centralized in a single room to execute strongly consistent data, are defined as single point services. If a plurality of computer rooms process strongly consistent data at the same time, serious problems of data processing repetition, inconsistent data in the plurality of computer rooms and the like can occur;
in order to centralize data with strong consistency requirements to a machine room to execute reading and writing, a domain name mode is usually adopted to access the single-point service, a domain name server is used for analyzing the domain name to obtain the address of the machine room where the single-point service is located, and an access request is forwarded to a specified machine room; if the DNS server needs to synchronously change the machine room address corresponding to the domain name when switching to other machine rooms due to the fault of the specified machine room, the effective timeliness of DNS change of the machine rooms across the country is delayed, so that the addresses of partial servers are not updated timely, and further, when single-point service is requested, single-point service in a plurality of machine rooms is provided, so that data errors or data inconsistency are caused.
Secondly, the internal service call protocol of the B2B electronic commerce online transaction websites is an RPC protocol based on TCP, but not an HTTP protocol, so that the application can only call the single-point service by configuring the single-point service address; if the single-point service address is changed temporarily, the application configuration needs to be changed correspondingly, the application is excessively dependent on the single-point service calling structure, and the complexity of single-point service management and configuration is increased.
The patent "single-point service processing device and single-point service processing method" (application number: 201110177646.3) proposes that in a server cluster, a server is selected according to a preset starting rule, and a single-point service is started in the server, although the uniqueness of the starting of the single-point service in the cluster server can be ensured by prohibiting other servers from starting the single-point service, the patent only solves the problem of starting the single-point service, and the single-point service which is not explicitly started is certainly effective; secondly, after a new service is started when the single-point service is abnormal, a clearer solution is not provided for how to ensure the data consistency of a plurality of single-point services when the single-point service is abnormal.
Therefore, a technical method for decoupling an application and a single point service call structure is urgently needed, and the phenomenon of data inconsistency can be thoroughly eliminated.
Disclosure of Invention
In order to solve the above problems, the present invention provides a cross-room single point service calling method. The invention utilizes an agent mechanism, receives the application request and the positioning and calling of the single-point service through the agent program, controls the agent program to call the single-point service through the management program, and ensures the consistency of single-point service addresses in all machine rooms; the application program in the invention is only communicated with the agent program, the modification of the single-point service does not affect the adjustment and configuration of the application code, and the management program only needs to call the agent programs of all the computer rooms to switch to the new single-point service, thereby reducing the complexity of the modification of the single-point service in a multi-computer-room environment, ensuring the consistency of the call of the single-point service in all the computer rooms and avoiding the condition that a plurality of single-point services are simultaneously served.
The technical scheme of the invention is to provide a cross-machine-room single-point service calling method, which is characterized by comprising the following specific steps of:
step 1: configuring a service program, wherein the service program comprises an agent program and a management program; the agent program is deployed between the application program and the single-point service and used for routing the service request of the application program to the single-point service; the management program manages the proxy program address and the single-point service address through the control instruction; the agent address is used for positioning an agent; the single-point service address is used for positioning single-point service, and the agent program address and the single-point service address are both composed of a corresponding deployment machine room and a deployment address; the deployment room is represented by a room name; the deployment address is represented by a URL address; step 2: the application program requests to call the single-point service through the agent program; comprises the following steps: configuring a single point service address in an application program configuration file into an agent program address; the application program sends a single-point service calling request to the agent program according to the address in the configuration file; the proxy program analyzes the service name in the calling request; analyzing and acquiring the single-point service address according to the service name; the agent program positions the single-point service according to the single-point service address and routes the call request to the single-point service;
and step 3: the single-point service returns a request result to the application program through the agent program; after the single-point service finishes processing the request, returning a result according to the request path in the step 2, specifically: the request result is returned to the agent program by the single-point service, and the request result is fed back to the application program by the agent program;
and 4, step 4: the management program controls and monitors the updating and switching of the single-point service address in the multiple machine rooms; the management program writes a control instruction according to the acquired new single-point service address, calls a corresponding agent program through the deployment address of the agent program of each machine room and sends the control instruction, the control agent program receives the new single-point service address storage replacement, and meanwhile, the management program judges whether the single-point service addresses in the agent programs of the machine rooms are consistent or not according to the address storage result and the address replacement result fed back by the agent programs of the machine rooms; if the result fed back by any machine room agent program is unsuccessful, the single-point service addresses in the agent programs of all the machine rooms are inconsistent, and the management program controls the agent programs of all the machine rooms to modify the single-point service addresses into the old addresses.
In step 1, the configuration service includes: 2 external service interfaces are established for the agent program, wherein a first interface receives a single-point service calling request of the application program, and a second interface receives a control instruction of the management program; the management program receives a user request and generates a control instruction through a visual interface.
In step 1, the configuration agent specifically includes: in a multi-machine room environment, selecting a machine room deployment management program; deploying an agent program for each machine room; the single-point service address is stored in a database of the agent program in a key-value pair mode, and the storage format is as follows: [ service name: machine room name + URL address ].
The specific step of requesting to invoke the single point service in the step 2 includes:
when a first interface of the agent program receives a single-point service call request, the agent program extracts a service name of the single-point service from a request parameter; screening a corresponding single-point service address from a database according to the service name; if the machine room name is consistent with the machine room name of the agent program, the agent program uses the URL address to position the single-point service in the current machine room and routes the request to the single-point service; if the machine room name is not consistent with the machine room name of the agent program, the agent program and the called single-point service are different in one machine room, the machine room where the single-point service is deployed is taken as a target machine room, the agent program address of the target machine room is obtained according to the machine room name, the agent program of the current machine room forwards the calling request together with the agent program address and the URL address of the current machine room to the agent program of the target machine room, the agent program of the target machine room positions the single-point service in the target machine room according to the URL address, and the calling request is routed to the single-point service.
In step 3, the specific process of returning a result according to the request path in step 2 includes:
step 3-1: the single-point service returns the request result to the agent program in the same computer room;
step 3-2: the agent program judges a sender of the call request; if the calling request in the step 2 contains the proxy program address of the computer room, the sender is the proxy program, and the step 3-3 is executed; if the calling request in the step 2 does not contain the proxy program address of the computer room, the sender is an application program, and the proxy program returns the request result to the application program;
step 3-3: and returning the request result to the agent programs of other computer rooms according to the agent program addresses of the computer rooms, and returning the request result to the application program of the same computer room by the agent programs.
In the step 4, the control instruction comprises an address storage instruction and an address switching instruction;
the step 4 specifically includes:
step 4-1: when the management program saves the new single point service address, the old single point service address is not deleted;
step 4-2: the management program calls a second external service interface of the agent program according to the agent program address of each machine room and sends an address storage instruction containing a new single-point service address; after the agent program receives the instruction, the new single-point service address is stored, information of successful receiving is fed back to the management program, and a step 4-3 is executed; if any computer room agent program does not feed back information of successful receiving, the management program feeds back address storage failure to the user;
4-3, the management program sends an address switching instruction to the agent programs of all the machine rooms, and after the agent programs receive the instruction, the agent programs modify the corresponding single-point service addresses into new addresses according to the service names and feed back information of successful switching to the management program; if any computer room agent program does not feed back the information of successful switching, executing the step 4-4;
step 4-4: and the management program calls a second external service interface of the agent program which successfully feeds back the address backspace instruction, the backspace instruction comprises an old single-point service address, and after the agent program receives the instruction, the agent program rolls back the updated single-point service address to the old single-point service address.
The invention achieves the following beneficial effects:
1) The invention ensures that the service request is sent to the single-point service in any machine room by configuring the agent program between the application and the single-point service, configuring the single-point service address in the agent program and bearing the service request of the application, thereby not only eliminating the simple dependence of the application program on the single-point service, decoupling the application and the single-point service calling structure, but also reducing the difficulty and complexity of positioning the single-point service in a multi-machine room environment.
2) The agent programs of all the machine rooms are managed in a unified mode through the configuration management program, the management program executes switching and updating of the single-point service addresses in the agent programs in a unified mode, the single-point service address updating actions can be synchronized in a multi-machine room environment at the same time, the consistency of the single-point service address updating results in the multi-machine room environment is guaranteed, inconsistency caused by timeliness is reduced, multiple single-point services in the multi-machine room environment are effective, and strong consistent data processing errors are caused.
Drawings
FIG. 1 is a flowchart illustrating a cross-room single point service invocation method according to an embodiment of the present invention
FIG. 2 is a flow chart of a request invocation based on an agent in an embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating a request result return flow based on an agent in an embodiment of the present invention;
FIG. 4 is a flowchart of an embodiment of a hypervisor controlling single point service address switching;
fig. 5 is a schematic structural diagram of a cross-room single point service call system in the embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
FIG. 1 is a flow chart illustrating a cross-machine-room single-point service calling method according to an embodiment of the present invention
Step 101: configuring a service program, wherein the service program comprises an agent program and a management program;
the agent program is deployed between the application program and the single-point service and used for routing the service request of the application program to the single-point service; 2 external service interfaces are established for the agent program, wherein a first interface receives a single-point service calling request of the application program, and a second interface receives a control instruction of the management program; all service requests are submitted to the agent program for bearing by configuring the agent program between the application and the single-point service;
the management program manages the proxy program address and the single-point service address through the control instruction; the agent address is used for positioning an agent; the single-point service is customized and positioned, and the agent program address and the single-point service address are both composed of a corresponding deployment machine room and a deployment address; the deployment room is represented by a room name; the deployment address is represented by a URL address; the management program receives a user request and generates a control instruction through a visual interface. In a multi-machine room environment, a machine room deployment management program is selected; deploying an agent program for each machine room; the single-point service address is stored in a database of the agent program in a key-value pair mode, and the storage format is as follows: [ service name: computer room name + URL address
Step 102: the application program requests to call the single-point service through the agent program; FIG. 2 is a flow chart illustrating a request call based on an agent in an embodiment of the present invention; the method specifically comprises the following steps:
step 102-1: configuring the single point service address in the application program configuration file as an agent program address; the application program sends a single-point service calling request to the agent program according to the address in the configuration file;
step 102-2: acquiring a service name of the single-point service; when a first interface of the agent program receives a single-point service call request, the agent program extracts a service name of the single-point service from a request parameter;
step 102-3: the agent program judges whether the single-point service for processing the request is configured in a local computer room; the agent program screens a corresponding single-point service address from a database according to the service name; judging whether the machine room name of the single-point service is consistent with the deployment machine room of the agent program, and if so, executing the step 102-4; if not, the agent program and the called single-point service are different, and step 102-5 is executed in a computer room;
step 102-4: the agent program routes the request to the single-point service of the local computer room; the agent program uses the URL address to position the single-point service in the current machine room and routes the request to the single-point service;
step 102-5: routing the request to single-point service through request transmission among agent programs of different computer rooms; and taking the machine room for deploying the single-point service as a target machine room, acquiring an agent program address of the target machine room according to the machine room name, forwarding the calling request, the agent program address of the current machine room and the URL address to the agent program of the target machine room by the agent program of the current machine room, positioning the single-point service in the target machine room according to the URL address by the agent program of the target machine room, and routing the calling request to the single-point service.
The agent program is configured between the application and the single-point service, the agent program receives the service request of the application, and the single-point service address is configured in the agent program, so that the service request is sent to the single-point service in any computer room, the simple dependence of the application program on the single-point service is eliminated, the application and the single-point service call structure are decoupled, and the difficulty and complexity of positioning the single-point service in a multi-computer-room environment are reduced.
Step 103: the single point service returns a request result to the application program through the agent program; returning a request result to the agent program from the single-point service, and feeding back the request result to the application program by the agent program; fig. 3 is a schematic diagram illustrating a request result return flow based on an agent in an embodiment of the present invention, which includes the following specific steps:
step 103-1: the single-point service returns the request result to the agent program of the same computer room;
step 103-2: the agent program judges a sender of the call request; if the calling request in the step 2 contains the proxy program address of the computer room, the sender is the proxy program, and the step 3-3 is executed; if the calling request in the step 2 does not contain the proxy program address of the computer room, the sender is an application program, and the proxy program returns the request result to the application program;
step 103-3: and returning the request result to the agent programs of other computer rooms according to the agent program addresses of the computer rooms, and then returning the request result to the application program of the same computer room by the agent program.
Step 104: the management program controls and monitors the updating and switching of the single-point service address in the multiple machine rooms;
the management program controls and monitors the updating and switching of the single-point service address in the multiple machine rooms; the management program writes a control instruction according to the acquired new single-point service address, calls a corresponding agent program through the deployment address of the agent program of each machine room and sends the control instruction, the control agent program receives the new single-point service address storage replacement, and meanwhile, the management program judges whether the single-point service addresses in the agent programs of the machine rooms are consistent or not according to the address storage result and the address replacement result fed back by the agent programs of the machine rooms; if the result fed back by any machine room agent program is unsuccessful, the single-point service addresses in the agent programs of all the machine rooms are inconsistent, and the management program controls the agent programs of all the machine rooms to modify the single-point service addresses into old addresses;
the agent programs of all the computer rooms are managed in a unified mode through the configuration management program, the management program executes switching and updating of the single-point service addresses in the agent programs in a unified mode, the single-point service address updating actions can be synchronized in a multi-computer-room environment at the same time, the consistency of the single-point service address updating results in the multi-computer-room environment is guaranteed, inconsistency caused by the timeliness problem is reduced, multiple single-point services in the multi-computer-room environment are effective, and further strong-consistency data processing errors are caused.
Fig. 4 is a flowchart illustrating an embodiment of a method for controlling a single point service address switching by a hypervisor, which specifically includes:
step 104-1: when the management program saves the new address of the single point service, the old address of the single point service is not deleted;
step 104-2: the management program sends a new address to the agent programs of all the machine rooms; the management program calls a second external service interface of the agent program according to the agent program address of each machine room and sends an address storage instruction containing a single-point service new address; after the agent program receives the instruction and stores the single-point service new address, feeding back information of successful reception to the management program, and executing step 104-3; if any computer room agent program does not feed back information of successful receiving, the management program feeds back address storage failure to the user;
step 104-3, the management program controls each machine room agent program to update the new address of the single-point service; the management program sends an address switching instruction to the agent programs of all the machine rooms, and after the agent programs receive the instruction, the agent programs modify the corresponding single-point service addresses into new addresses according to the service names and feed back information of successful switching to the management program; if any computer room agent program does not feed back the information of successful switching, executing the step 104-4;
step 104-4: the single-point service address in each machine room agent program is returned to an old address; and the management program calls a second external service interface of the agent program which successfully feeds back the address backspace instruction, the backspace instruction comprises an old address of the single-point service, and the agent program modifies the updated single-point service address into the old address of the single-point service after receiving the instruction.
Fig. 5 is a schematic structural diagram of a cross-machine-room single-point service call system in an embodiment of the present invention, which specifically includes an agent program, a management program, an application program, and a single-point service; in a multi-machine room environment, selecting any machine room to deploy a management program; agent programs, application programs and single-point services are deployed in all the machine rooms; the same single-point service is deployed in different machine rooms, and a user requests to access the single-point service nearby through an application program; in the embodiment of the invention, an application program, an agent program and a single-point service are deployed in a machine room 1, a machine room 2 and a machine room 3, and a management program is deployed in the machine room 1; and configuring the address of the single point service for processing the request in the management program, and informing the agent program of each computer room by the management program.
The application program accesses the agent program of the same machine room nearby and sends a single-point service call request; the agent program receives the single-point service call request of the application program, the agent program positions and processes the machine room of the single-point service of the request, and if the single-point service and the application program are in the same machine room, the agent program directly sends the call request to the single-point service in the same machine room; if the single-point service and the application program are not in the same machine room, the machine room in which the single-point service is located is taken as a target machine room, the agent program of the current machine room firstly sends the calling request to the agent program of the target machine room, and then the agent of the target machine room sends the calling request to the single-point service;
the single point service transmits the result of the request processing to an application program through the agent program; if the single-point service and the application program are in the same computer room, the single-point service sends a result to an agent program in the same computer room, and the agent program transmits the result to the application program;
if the single-point service and the application program are not in the same machine room, the request result is transmitted to the application program through the sequential transmission of the agent programs of 2 machine rooms; the method comprises the following steps: and the single-point service sends the result to the agent program of the same machine room, the agent program sends the result to the agent program of the machine room where the application program is located, and the agent program of the machine room where the application program is located sends the result to the application program.
The management program obtains a single-point service switching request input by a user with a visual interface to the outside, packages a new single-point service address as a control instruction, and sends the control instruction to the agent programs of all the machine rooms for storage and updating, so that synchronous updating and consistency of the single-point service addresses in the multiple machine rooms are guaranteed.
The invention achieves the following beneficial effects:
1) The invention ensures that the service request is sent to the single-point service in any computer room by configuring the agent program between the application and the single-point service, configuring the single-point service address in the agent program and ensuring that the application program sends the single-point service to any computer room, thereby not only eliminating the simple dependency relationship of the application program on the single-point service, decoupling the application and the single-point service calling structure, but also reducing the difficulty and complexity of positioning the single-point service in a multi-computer room environment.
2) The agent programs of all the machine rooms are managed in a unified mode through the configuration management program, the management program executes switching and updating of the single-point service addresses in the agent programs in a unified mode, the single-point service address updating actions can be synchronized in a multi-machine room environment at the same time, the consistency of the single-point service address updating results in the multi-machine room environment is guaranteed, inconsistency caused by timeliness is reduced, multiple single-point services in the multi-machine room environment are effective, and strong consistent data processing errors are caused.
The above embodiments do not limit the present invention in any way, and all other modifications and applications that can be made to the above embodiments in equivalent manners are within the scope of the present invention.
Claims (6)
1. A cross-machine-room single-point service calling method is characterized by comprising the following specific steps:
step 1: configuring a service program, wherein the service program comprises an agent program and a management program; the agent program is deployed between the application program and the single-point service and used for routing the service request of the application program to the single-point service; the management program manages the proxy program address and the single-point service address through the control instruction; the agent address is used for positioning an agent; the single-point service address is used for positioning single-point service, and the agent program address and the single-point service address are both composed of a corresponding deployment machine room and a deployment address; the deployment room is represented by a room name; the deployment address is represented by a URL address; and 2, step: the application program requests to call the single-point service through the agent program; comprises the following steps: configuring the single point service address in the application program configuration file as an agent program address; the application program sends a single-point service calling request to the agent program according to the address in the configuration file; the proxy program analyzes the service name in the calling request; analyzing and acquiring the single-point service address according to the service name; the agent program positions the single-point service according to the single-point service address and routes the call request to the single-point service;
and 3, step 3: the single-point service returns a request result to the application program through the agent program; after the single-point service finishes processing the request, returning a result according to the request path in the step 2, specifically: the request result is returned to the agent program by the single-point service, and the request result is fed back to the application program by the agent program;
and 4, step 4: the management program controls and monitors the updating and switching of the single-point service address in the multiple machine rooms; the management program writes a control instruction according to the acquired new single-point service address, calls a corresponding agent program through the deployment address of the agent program of each machine room and sends the control instruction, the control agent program receives the new single-point service address storage replacement, and meanwhile, the management program judges whether the single-point service addresses in the agent programs of the machine rooms are consistent or not according to the address storage result and the address replacement result fed back by the agent programs of the machine rooms; if the result fed back by any machine room agent program is unsuccessful, the single-point service addresses in the agent programs of all the machine rooms are inconsistent, and the management program controls the agent programs of all the machine rooms to modify the single-point service addresses into the old addresses.
2. The method according to claim 1, wherein in step 1, the configuration service program comprises: 2 interfaces of external services are established for the agent program, wherein the first interface receives a single-point service calling request of the application program, and the second interface receives a control instruction of the management program; the management program receives a user request and generates a control instruction through a visual interface.
3. The method for calling a single point service across machine rooms according to claim 2, wherein in the step 1, the configuration agent specifically comprises: in a multi-machine room environment, selecting a machine room deployment management program; deploying an agent program for each machine room; the single-point service address is stored in a database of the agent program in a key-value pair mode, and the storage format is as follows: [ service name: machine room name + URL address ].
4. The cross-room single point service invocation method according to claim 3, wherein the specific step of requesting to invoke the single point service in the step 2 comprises:
when a first interface of the agent program receives a single-point service call request, the agent program extracts a service name of the single-point service from a request parameter; screening a corresponding single-point service address from a database according to the service name; if the machine room name is consistent with the machine room name of the agent program, the agent program uses the URL address to position the single-point service in the current machine room and routes the request to the single-point service; if the machine room name is not consistent with the machine room name of the agent program, the agent program and the called single-point service are different in one machine room, the machine room where the single-point service is deployed is taken as a target machine room, the agent program address of the target machine room is obtained according to the machine room name, the agent program of the current machine room forwards the calling request together with the agent program address and the URL address of the current machine room to the agent program of the target machine room, the agent program of the target machine room positions the single-point service in the target machine room according to the URL address, and the calling request is routed to the single-point service.
5. The cross-room single point service calling method according to claim 4, wherein in the step 3, the specific process of returning the result according to the request path of the step 2 includes:
step 3-1: the single-point service returns the request result to the agent program in the same computer room;
step 3-2: the agent program judges a sender of the call request; if the calling request in the step 2 contains the proxy program address of the computer room, the sender is the proxy program, and the step 3-3 is executed; if the calling request in the step 2 does not contain the proxy program address of the computer room, the sender is an application program, and the proxy program returns the request result to the application program;
step 3-3: and returning the request result to the agent programs of other computer rooms according to the agent program addresses of the computer rooms, and then returning the request result to the application program of the same computer room by the agent program.
6. The cross-room single point service calling method according to claim 5, wherein in the step 4, the control instruction includes an address storage instruction and an address switching instruction;
the step 4 specifically includes:
step 4-1: when the management program saves the new single point service address, the old single point service address is not deleted;
step 4-2: the management program calls a second external service interface of the agent program according to the agent program address of each machine room and sends an address storage instruction containing a new single-point service address; after the agent program receives the instruction, the new single-point service address is stored, information of successful receiving is fed back to the management program, and the step 4-3 is executed; if any computer room agent program does not feed back information of successful receiving, the management program feeds back address storage failure to the user;
4-3, the management program sends an address switching instruction to the agent programs of all the machine rooms, and after the agent programs receive the instruction, the agent programs modify the corresponding single-point service addresses into new addresses according to the service names and feed back information of successful switching to the management program; if any computer room agent program does not feed back the information of successful switching, executing the step 4-4;
step 4-4: and the management program calls a second external service interface of the agent program which successfully feeds back the address backspace instruction, the backspace instruction comprises an old single-point service address, and after the agent program receives the instruction, the agent program rolls back the updated single-point service address to the old single-point service address.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210973391.XA CN115396482B (en) | 2022-08-15 | 2022-08-15 | Cross-machine-room single-point service calling method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210973391.XA CN115396482B (en) | 2022-08-15 | 2022-08-15 | Cross-machine-room single-point service calling method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115396482A true CN115396482A (en) | 2022-11-25 |
CN115396482B CN115396482B (en) | 2024-05-28 |
Family
ID=84118886
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210973391.XA Active CN115396482B (en) | 2022-08-15 | 2022-08-15 | Cross-machine-room single-point service calling method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115396482B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019061720A1 (en) * | 2017-09-29 | 2019-04-04 | 网宿科技股份有限公司 | Data synchronization method and system |
WO2019104975A1 (en) * | 2017-11-30 | 2019-06-06 | 平安科技(深圳)有限公司 | Dubbo framework–based remote invoking method, server, and storage medium |
CN112052091A (en) * | 2020-09-04 | 2020-12-08 | 掌阅科技股份有限公司 | Processing method of service call request under multi-computer-room deployment and computing equipment |
CN113542244A (en) * | 2021-07-01 | 2021-10-22 | 京东科技控股股份有限公司 | Method, device, server and system for calling micro-service |
-
2022
- 2022-08-15 CN CN202210973391.XA patent/CN115396482B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019061720A1 (en) * | 2017-09-29 | 2019-04-04 | 网宿科技股份有限公司 | Data synchronization method and system |
WO2019104975A1 (en) * | 2017-11-30 | 2019-06-06 | 平安科技(深圳)有限公司 | Dubbo framework–based remote invoking method, server, and storage medium |
CN112052091A (en) * | 2020-09-04 | 2020-12-08 | 掌阅科技股份有限公司 | Processing method of service call request under multi-computer-room deployment and computing equipment |
CN113542244A (en) * | 2021-07-01 | 2021-10-22 | 京东科技控股股份有限公司 | Method, device, server and system for calling micro-service |
Non-Patent Citations (1)
Title |
---|
丁乙;李荣宽;汪敏;贲婷婷;朱勇;: "面向军用微服务的服务网格架构研究与设计", 指挥信息系统与技术, no. 01, 28 February 2020 (2020-02-28) * |
Also Published As
Publication number | Publication date |
---|---|
CN115396482B (en) | 2024-05-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20220094761A1 (en) | Server Invocation Method and Proxy Server | |
EP3813338A1 (en) | Method and system for scheduling edge cdn node | |
CN110351283B (en) | Data transmission method, device, equipment and storage medium | |
US7325047B2 (en) | Dynamic undeployment of services in a computing network | |
JP4698756B2 (en) | Offline execution of web-based applications | |
US9588854B2 (en) | Systems and methods for a secondary website with mirrored content for automatic failover | |
US20110004676A1 (en) | Virtual appliance deploying system | |
US20120110159A1 (en) | Managing cdn registration by a storage provider | |
US10972564B2 (en) | System and method for automating actions in distributed computing | |
US9785482B2 (en) | System and method for extending a web service environment to support scalable asynchronous clients | |
US20050108299A1 (en) | Real-time Web sharing system | |
US20150188999A1 (en) | System and method to extend the capabilities of a web browser to improve the web application performance | |
JP5197351B2 (en) | Information processing apparatus, information processing method, and program | |
CN110633175A (en) | Multi-computer-room data processing method based on micro-service, electronic equipment and storage medium | |
CN112015696B (en) | Data access method, data relationship setting method, data access device, data relationship setting device and storage medium | |
CN115086330A (en) | Cross-cluster load balancing system | |
US20150074290A1 (en) | Browser based hostname resolution for non-dns (domain name service) and/or different dns environments | |
CN114125051B (en) | Agent method and device for dynamic service discovery | |
CN113709247A (en) | Resource acquisition method, device, system, electronic equipment and storage medium | |
CN115396482B (en) | Cross-machine-room single-point service calling method | |
CN112052091A (en) | Processing method of service call request under multi-computer-room deployment and computing equipment | |
CN115103008B (en) | Service request forwarding system | |
EP2523423A1 (en) | Method and system for providing a distributed scalable hosting environment for web services | |
US20170195426A1 (en) | Maintaining session across plural providing devices | |
CN113542409B (en) | Management system and processing method for instances of RocktMQ message queues |
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 |