A response method, apparatus and electronic device

By forwarding operation requests asynchronously to multiple data centers in parallel on the server side and obtaining response information, the problem of data synchronization inconsistency in distributed object storage systems is solved, improving the response efficiency of operation requests and data consistency.

CN119814867BActive Publication Date: 2026-01-23INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411849514.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2026-01-23
Estimated Expiration
2044-12-13

AI Technical Summary

Technical Problem

In distributed object storage systems, data synchronization for multi-site disaster recovery is performed asynchronously, making it difficult to guarantee strong data consistency, potentially leading to data loss and reducing the response efficiency of operation requests.

Method used

After receiving the client's operation request, the server first sends the request to the first data center, and then forwards it asynchronously to other data centers in parallel according to the polling strategy. It obtains the response information from each data center, and then feeds back the execution result to the client based on this information to ensure data consistency.

Benefits of technology

By using parallel asynchronous forwarding and response management, the efficiency of data synchronization between data centers is improved, data consistency is ensured, and the server's response efficiency to operation requests is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814867B_ABST
    Figure CN119814867B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a response method, device and electronic equipment, the method is applied to a server, and the method comprises the following steps: receiving an operation request sent by a client; the operation request is used for requesting target data stored in a data center to operate; sending the operation request to a first data center; the operation request is used for instructing the first data center to forward the operation request to each data center other than the first data center according to a polling strategy; obtaining response information corresponding to each data center; the response information is used for indicating the execution of the operation request by the data center; and feeding back an execution result corresponding to the operation request to the client according to the response information of at least one data center. Embodiments of the present application improve the response efficiency of the server to the operation request.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of communication, and in particular to a response method, device and electronic equipment. BACKGROUND

[0002] With the development of distributed object storage systems, data synchronization functions between multiple sites have been supported. Objects uploaded on a site are automatically synchronized to other sites in the background, and disaster recovery between clusters has been achieved. Multi-site synchronization mainly includes metadata synchronization of users and buckets, and object data synchronization.

[0003] Currently, multi-site disaster recovery of distributed object storage systems is performed asynchronously in the background. That is, data can only be read on a site after other sites pull data from the server in the background. This cannot achieve strong consistency of data, and once a site fails, data loss may occur, which cannot meet the market demand for strong consistency of data, and thus reduces the response efficiency of the distributed object storage system to operation requests. SUMMARY

[0004] The present application provides a response method, device and electronic equipment, which can solve the problem of low response efficiency of the distributed object storage system to operation requests.

[0005] In a first aspect, the present application provides a response method applied to a server, the method comprising:

[0006] receiving an operation request sent by a client; the operation request being used to request target data stored in a data center to perform an operation;

[0007] sending the operation request to a first data center; the operation request being used to instruct the first data center to forward the operation request to other data centers except the first data center among the data centers in parallel and asynchronously according to a polling strategy;

[0008] obtaining response information corresponding to each data center; the response information being used to indicate the execution of the operation request by the data center;

[0009] feeding back an execution result corresponding to the operation request to the client according to the response information of at least one data center.

[0010] Optionally, before the operation request is sent to the first data center, the method further comprises:

[0011] determining a target node corresponding to each data center according to node identification information stored in each data center;

[0012] The operation request is sent to the first data center, comprising:

[0013] sending the operation request to a target node corresponding to the first data center to trigger the target node to forward the operation request to target nodes of other data centers except the first data center in the plurality of data centers according to a polling strategy in parallel and asynchronously;

[0014] the response information corresponding to each data center comprises:

[0015] for each data center, determining a target node in the data center that receives the operation request as a first target node;

[0016] obtaining first response information of the first target node;

[0017] if the first response information indicates that the first target node fails to respond, re-obtaining the first response information corresponding to the first target node until the first response information indicating successful execution is obtained, and stopping obtaining; or

[0018] if the number of retries is greater than or equal to a preset threshold, determining that the first target node fails to execute, stopping obtaining, sending the operation request to any target node in the data center except the first target node, and determining the target node as a new first target node, continuing to obtain first response information of the new first target node, and analyzing the obtained first response information.

[0019] Optionally, the sending of the operation request to the first data center comprises:

[0020] sending the operation request to the first data center;

[0021] calling a request parallel asynchronous forwarding management module to forward the operation request to other data centers except the first data center in the plurality of data centers in parallel and asynchronously;

[0022] The operation request comprises at least one of a metadata operation request and a data operation request.

[0023] The metadata operation request is used to request at least one of adding metadata operation, deleting metadata operation, and modifying metadata operation on target metadata stored in the data center.

[0024] The data operation request is used to request at least one of uploading processing operation, deleting processing operation, and modifying processing operation on target data stored in the data center.

[0025] Optionally, the feedback of the execution result corresponding to the operation request to the client according to the response information of at least one data center comprises:

[0026] In a case where the response information corresponding to each of the data centers indicates that the execution is successful, an execution result corresponding to the operation request is returned to the client.

[0027] Optionally, the feeding back of the execution result corresponding to the operation request to the client according to the response information of at least one data center comprises:

[0028] In a case where the response information of at least one data center indicates that the execution is successful, an execution result corresponding to the operation request is returned to the client.

[0029] According to the execution result of the data center in which the execution is successful, data synchronization processing is performed on other data centers.

[0030] Optionally, the determining of the target node corresponding to each data center according to the node identifier information stored in each data center comprises:

[0031] For each data center, a service node in the data center that matches the node identifier information stored in the data center is determined as a target node.

[0032] Each target node in each data center that meets the requirement is polled in turn, and when the last data center is polled, the next round of query is started, and each target node in each data center that meets the requirement is continuously polled.

[0033] Optionally, the sending of the operation request to the target node corresponding to the first data center comprises:

[0034] According to the type of the operation request, a message structure corresponding to the operation request is assembled.

[0035] The message structure is sent to the target node.

[0036] Optionally, the feeding back of the execution result corresponding to the operation request to the client according to the response information of at least one data center comprises:

[0037] In a case where the first response information of the first target node indicates that the first target node responds successfully, an execution result of the first target node for the operation request is fed back to the client.

[0038] In a second aspect, the present application provides a response method applied to a distributed storage system, wherein the distributed storage system comprises a server, a client and data centers, and the method comprises:

[0039] The client sends an operation request to the server.

[0040] The server receives an operation request sent by the client; the operation request is used to request target data stored in the data center; the operation request is sent to the first data center; the operation request is used to instruct the first data center to forward the operation request to other data centers in the plurality of data centers asynchronously and in parallel according to a polling strategy, except the first data center;

[0041] The data center forwards the operation request to other data centers asynchronously and in parallel based on the polling strategy; the other data centers receive the operation request and perform response processing based on the operation request;

[0042] The server obtains response information corresponding to each data center; the response information is used to indicate execution of the operation request by the data center; in the case that the execution of each data center is successful, the execution result of each data center is returned to the client;

[0043] The client receives the execution result returned by the server.

[0044] In a third aspect, the present application provides a server, which comprises the response method according to any one of the first aspect.

[0045] In a fourth aspect, the present application provides an electronic device, which comprises:

[0046] a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the response method according to the second aspect.

[0047] In a fifth aspect, the present application provides a readable storage medium, which, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform the response method according to the second aspect.

[0048] In a sixth aspect, the present application provides a computer program product, which comprises computer programs / instructions, and the computer programs / instructions, when executed by a processor, implement the response method according to the second aspect.

[0049] The response method provided by the embodiment of the present application is applied to a server, and the method comprises the following steps: receiving an operation request sent by a client; the operation request is used for requesting target data stored in a data center to perform an operation; sending the operation request to a first data center; the operation request is used for instructing the first data center to forward the operation request to other data centers except the first data center according to a polling strategy; obtaining response information corresponding to each data center; the response information is used for indicating the execution of the operation request by the data center; and feeding back an execution result corresponding to the operation request to the client according to the response information of at least one data center. In the embodiment of the present application, after the server receives the operation request of the client, the server sends the operation request to the first data center, and the first data center forwards the operation request to each data center according to the polling strategy based on the operation request, so that the consistency of data in each data center can be ensured, and finally the server can obtain the response information of each data center, and feed back the execution result corresponding to the operation request to the client according to the response information of at least one data center, thereby solving the problem that the data in each data center cannot be synchronized in time, and improving the response efficiency of the server to the operation request. BRIEF DESCRIPTION OF DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without any creative effort on the basis of these drawings.

[0051] Figure 1 is a step flow of a response method provided by the embodiment of the present application Figure One ;

[0052] Figure 2 is a step flow of a response method provided by the embodiment of the present application Figure Two ;

[0053] Figure 3 is a step flow of a response method provided by the embodiment of the present application Figure Three ;

[0054] Figure 4 is a step flow of a response method provided by the embodiment of the present application Figure Four ;

[0055] Figure 5 is a step flow of a response method provided by the embodiment of the present application Figure Five ;

[0056] Figure 6is a step flow chart of a site service IP load balancing management provided by the embodiment of the present application;

[0057] Figure 7 is a request and parallel asynchronous forwarding schematic diagram provided by the embodiment of the present application;

[0058] Figure 8 is a timing diagram of the request and parallel asynchronous forwarding provided by the embodiment of the present application;

[0059] Figure 9 is a step flow chart of the request and parallel asynchronous forwarding provided by the embodiment of the present application;

[0060] Figure 10 is a step flow chart of an operation scheduling process provided by the embodiment of the present application;

[0061] Figure 11 is an architecture schematic diagram of a distributed storage system provided by the embodiment of the present application;

[0062] Figure 12 is a response device schematic diagram provided by the embodiment of the present application;

[0063] Figure 13 is an electronic device schematic diagram provided by the embodiment of the present application. DETAILED DESCRIPTION

[0064] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.

[0065] Method embodiments

[0066] The response method provided by the embodiment of the present application can be applied to the server side as described above, and the step flow chart of the response method provided by the embodiment of the present application is shown in Figure 1 , which can include steps S101 to S104: Figure One

[0067] Step S101, receiving an operation request sent by a client; the operation request is used to request an operation on target data stored in a data center.

[0068] In the embodiment of the present application, in the response process of the server side, the server side will first receive an operation request sent by a client; wherein the operation request is used to request an operation on target data stored in a data center.

[0069] ​It should be noted that the data mentioned in the present application is processed after being authorized by the user or the data possession platform.

[0070] Exemplarily, the operation request can be used to request target data stored in the data center, that is, the operation request is used to access the target data.

[0071] Exemplarily, the operation request can include a data synchronization request; specifically, the data between multiple sites needs to be kept quasi-real-time synchronized to ensure the consistency and integrity of the data. This usually involves copying data from one site to another while ensuring the accuracy and integrity of the data during copying; synchronization progress query: users or administrators may need to query the progress of data synchronization to understand the synchronization status of data between different sites. This helps to monitor the performance of the system and discover potential problems in a timely manner.

[0072] Exemplarily, the operation request can also include a data write request; specifically, in a distributed object storage system, a data write request may involve multiple sites. The system needs to ensure that the data remains consistent during writing, even between multiple sites. This is usually achieved by adopting a strong consistency protocol such as Raft; some write requests may need to guarantee atomicity, that is, all write operations either succeed or fail entirely. This helps to ensure the consistency and integrity of the data.

[0073] Exemplarily, the operation request can also include a data read request, in a multi-site environment, users may need to read consistent data. The system needs to provide consistent read semantics to ensure that the data read by users is up-to-date and consistent; distributed consistent snapshot read allows users to read data snapshots before a certain point in time. This helps to ensure that when data changes, users can still access the previous data state.

[0074] Exemplarily, the operation request can also include a data deletion request, specifically, distributed deletion is similar to write request, data deletion request may also involve multiple sites. The system needs to ensure that the data remains consistent during deletion to avoid data loss or inconsistency; conditional deletion refers to certain deletion requests that may need to meet certain conditions to be executed. For example, only delete it when a certain key does not exist, or only delete it when a certain record is a certain version.

[0075] Exemplarily, the operation request can also include a disaster recovery switching request, specifically, fault detection and switching, that is, in a multi-site disaster recovery environment, the system needs to be able to detect the failure of a certain site and automatically switch to other normal sites to continue providing services. This usually involves fault detection mechanisms, switching strategies and fault recovery processes.

[0076] Exemplarily, the operation requests can also include data verification and recovery. Specifically, after switching to other sites, the system needs to verify the data to ensure the integrity and consistency of the data. If problems are found, the system needs to be able to automatically or manually recover the data.

[0077] Exemplarily, the operation requests can also include management requests, specifically, site management, that is, administrators may need to add, delete or modify site configurations. This includes setting up storage categories, access permissions, synchronization policies, etc. for sites.

[0078] Exemplarily, the operation requests can also include monitoring and alarm. Specifically, the system needs to provide monitoring and alarm functions, so that administrators can monitor the performance and status of the system in real time, and receive timely alarm notifications when problems occur.

[0079] Multi-site disaster recovery of data strong consistency in distributed object storage systems involves a variety of operation requests. These requests work together to ensure that data remains consistent and available between different sites, while providing disaster recovery capabilities to deal with possible site failures.

[0080] Exemplarily, a data center can be a set of storage systems, also known as a storage cluster, with corresponding storage gateways and storage pools. A data center can have multiple object storage gateway instances.

[0081] Exemplarily, multiple object storage gateway instances refer to the deployment of multiple object storage gateway entities or copies in a distributed storage system or cloud computing environment. These instances work together to provide efficient, reliable and scalable object storage services.

[0082] Exemplarily, an object storage gateway is a storage network device that connects multiple storage nodes and manages and coordinates data storage and access. Multiple object storage gateway instances mean that there are multiple such gateway devices or software copies in the system, which collectively handle storage requests and provide data access services. These instances usually support multiple storage protocols and can be flexibly configured to adapt to different storage needs.

[0083] Multiple object storage gateway instances play an important role in various application scenarios, including but not limited to: cloud computing environment, that is, in a cloud computing environment, multiple object storage gateway instances can provide efficient data storage and management services, support management and coordination of different storage nodes, and improve the reliability and performance of the system. Big data processing, that is, for big data processing tasks, multiple object storage gateway instances can optimize storage performance and network bandwidth, improve data processing efficiency and accuracy. Distributed storage system, that is, in a distributed storage system, multiple object storage gateway instances can support centralized management and sharing of data, while supporting multiple storage protocols and access control mechanisms to ensure data security and confidentiality.

[0084] Multiple object storage gateway instances can be backed up and fault-tolerant to each other to improve system availability; by multiple instances processing storage requests together, load balancing can be achieved to improve system throughput and response speed; as storage demand grows, more object storage gateway instances can be easily added to expand the storage capacity of the system.

[0085] Maintaining data consistency between multiple instances is a challenge, and appropriate data synchronization and consistency protocols need to be adopted; when a certain instance fails, it needs to be quickly switched to other normal instances and ensure data integrity and consistency; the resource usage of multiple instances needs to be effectively managed to avoid resource waste and performance bottlenecks.

[0086] Exemplarily, the target data can be data stored in a data center, multiple object storage gateway instances, etc., which are not limited in embodiments of the present application.

[0087] Further, in embodiments of the present application, the server can further determine the target node corresponding to each data center according to the node identification information stored in each data center before sending the operation request to the first data center.

[0088] The node identification information can be the obtained serviceable business address identifier, which can further indicate that the node can respond to the business request.

[0089] Exemplarily, determining the target node corresponding to each data center can be determining the serviceable target node from each data center according to the node identification information.

[0090] Further, in embodiments of the present application, when determining the target node corresponding to each data center according to the node identification information stored in each data center, the server can further call the load balancing management module to poll the target nodes meeting the requirements in each data center in turn, and when polling the last data center, start the next round of query to continue polling the target nodes meeting the requirements in each data center.

[0091] Exemplarily, the load balancing management module can be responsible for the load balancing management of the nodes in each site. According to the site information recorded in each data center, an Internet Protocol (IP) receiving service of each site is selected for use by the service request forwarding, and all the nodes in the default site are balanced in a round robin strategy.

[0092] Exemplarily, in the process of determining the target node, the service end needs to call the load balancing management module to poll the target nodes that can serve in each data center in turn, so that the target node that can serve can be quickly determined in the case of receiving an operation request, and the response efficiency is improved.

[0093] Exemplarily, the target node meeting the requirements can be a node that can respond to the operation request.

[0094] Exemplarily, the service end can call the load balancing management module to traverse the entire data center, that is, the last data center needs to be polled.

[0095] Exemplarily, after the service end polls the last data center, the service end can continue the next round of query.

[0096] Exemplarily, in the process of the new round of query, the service end needs to continue to poll the target nodes that can serve in each data center.

[0097] Exemplarily, the target node meeting the requirements in each data center is a target node that can provide service.

[0098] Further, in the embodiment of the application, when the service end determines the target node corresponding to each data center according to the node identification information stored in each data center, the service end can also determine, for each data center, a service node in the data center that matches the node identification information as the target node according to the node identification information stored in the data center.

[0099] Exemplarily, the node identification information stored in the data center can be a service identification identifying whether the node can serve the operation request.

[0100] Exemplarily, the service node in the data center that matches the node identification information can be a service node containing the node identification information determined from the data center.

[0101] Exemplarily, the target node can be a node providing service.

[0102] In step S102, the operation request is sent to the first data center; the operation request is used to instruct the first data center to forward the operation request to other data centers except the first data center in parallel and asynchronously according to a polling strategy.

[0103] In the embodiment of the present application, after receiving the operation request sent by the client, the server sends the operation request to the first data center; the operation request is used to instruct the first data center to forward the operation request to other data centers except the first data center in parallel and asynchronously according to a polling strategy.

[0104] For example, the first data center can be any one of the data centers, which is not limited in the embodiment of the present application.

[0105] For example, the polling strategy can be used to instruct the target node in each data center to perform load balancing.

[0106] For example, the parallel and asynchronous forwarding can be that, when receiving the operation request, the data center first locally and asynchronously processes the operation request, and then forwards the operation request to other data centers except the first data center in parallel and asynchronously.

[0107] For example, each data center can be any one of the data centers, which is not limited in the embodiment of the present application.

[0108] For example, the other data center can be any one of the data centers, which is not limited in the embodiment of the present application.

[0109] Further, in the embodiment of the present application, when sending the operation request to the first data center, the server can send the operation request to the target node corresponding to the first data center; the operation request is used to instruct the target node to forward the operation request to the target node of other data centers except the first data center in parallel and asynchronously according to a polling strategy.

[0110] For example, the target node corresponding to the first data center can be one or more, which is not limited in the embodiment of the present application.

[0111] For example, in the case that the response information of the target node corresponding to the first data center is execution success, the target node corresponding to the first data center can be one; in the case that the response information of the target node corresponding to the first data center is execution failure, it is necessary to find the multiple serviceable target nodes corresponding to the first data center, which is not limited in the embodiment of the present application.

[0112] For example, the target node of the other data center can be a serviceable target node in the other data center.

[0113] Further, in the embodiments of the application, when sending the operation request to the first data center, the service end can send the operation request to the first data center; call the request parallel asynchronous forwarding management module, and forward the operation request to each data center other than the first data center in parallel and asynchronously; wherein the operation request comprises at least one of a metadata operation request and a data operation request; the metadata operation request is used to request to perform at least one of an increase metadata operation, a delete metadata operation, and a modify metadata operation on the target metadata stored in the data center; and the data operation request is used to request to perform at least one of an upload processing operation, a delete processing operation, and a modify processing operation on the target data stored in the data center.

[0114] Exemplarily, the request parallel asynchronous forwarding management module can be responsible for scheduling inter-site parallel asynchronous forwarding of the operation request. After receiving the operation request, the site service IP load balancing management module is called to select IP nodes receiving services of each site, and a communication link is created with the selected service IP of each site, and then the request is locally asynchronously processed, and the operation request is forwarded to other site service IP nodes in parallel and asynchronously. In order to improve performance, all requests use asynchronous calls to avoid performance impact caused by synchronization. After all site requests return responses, the final response result is returned to the client. If all sites are successfully executed, success is returned. If a site fails to execute, the next IP node is selected for retry. If the retry fails 5 times, failure is returned, and the site that successfully executes is rolled back.

[0115] Exemplarily, the data center other than the first data center can be one or multiple, which is not limited in the embodiments of the application.

[0116] Exemplarily, the metadata operation request can be a metadata operation such as increase, delete, or modify of a user or a bucket at a node of a site, which calls the request parallel asynchronous forwarding management module to ensure consistency of metadata.

[0117] Exemplarily, the data operation request can be an upload, delete, or object metadata modification operation of an object at a node of a site, which calls the request parallel asynchronous forwarding management module to ensure consistency of object data.

[0118] Exemplarily, when performing an increase metadata operation on a bucket, a new bucket can be created in the object storage service for storing objects. When creating the bucket, the name, location (region), access permission, and other attributes of the bucket need to be specified. Some services also allow setting policies and lifecycle rules of the bucket and other advanced functions.

[0119] Exemplarily, when performing a delete metadata operation on metadata, a bucket and all objects contained therein can be removed. Deleting a bucket is a sensitive operation because once deleted, all data in the bucket will be lost. Therefore, before deleting a bucket, it is usually necessary to confirm that the bucket is empty or that important data has been backed up.

[0120] Exemplarily, when performing a modify metadata operation on metadata, the attributes of a bucket, such as access permissions, storage categories, lifecycle rules, etc., can be updated. When modifying a bucket, it is necessary to ensure that these changes do not violate existing data protection policies or cause data loss.

[0121] Exemplarily, the execution object can be object metadata, which is not limited in embodiments of the present application.

[0122] Exemplarily, the upload processing operation can be that when a client upload request is received, the request is called and the parallel asynchronous forwarding management module is called to write data in parallel to each site.

[0123] Exemplarily, the delete processing operation can be that when a client deletion request is received, the request is called and the parallel asynchronous forwarding management module is called to write data in parallel to each site.

[0124] Exemplarily, the modification processing operation can be that when a client modification request is received, the request is called and the parallel asynchronous forwarding management module is called to write data in parallel to each site.

[0125] Exemplarily, when different operation requests are received, the server can assemble a corresponding message structure according to different request types, and call the request parallel asynchronous forwarding management module to forward the request in parallel to other data centers.

[0126] Further, in embodiments of the present application, when sending an operation request to a target node corresponding to the first data center, the server can also assemble a message structure corresponding to the operation request according to the type of the operation request; and send the message structure to the target node.

[0127] Exemplarily, the message structure can include an operation request and a message, which is not limited in embodiments of the present application.

[0128] Step S103, obtaining response information corresponding to each data center; the response information is used to indicate the execution of the operation request by the data center.

[0129] In embodiments of the present application, after sending the operation request to the first data center, the server can obtain response information corresponding to each data center; the response information is used to indicate the execution of the operation request by the data center.

[0130] Exemplarily, the execution of the operation request can include success, failure, and non-execution, which are not limited in the embodiments of the present application.

[0131] Further, in the embodiments of the present application, when obtaining the response information corresponding to each data center, the server can determine a target node receiving the operation request in the data center as a first target node for each data center, obtain first response information of the first target node, in the case that the first response information indicates that the first target node fails to respond, re-obtain the first response information corresponding to the first target node until the first response information indicating success is obtained, stop obtaining, or in the case that the number of retries is greater than or equal to a preset threshold, determine that the first target node fails to execute, stop obtaining, send the operation request to any target node other than the first target node in the data center, and determine the target node as a new first target node, continue to obtain the first response information of the new first target node, and analyze the obtained first response information.

[0132] Exemplarily, the target node receiving the operation request can be a node responding to the operation request, i.e., a serviceable target node.

[0133] Exemplarily, the first target node can be any target node receiving the operation request in the data center, which is not limited in the embodiments of the present application.

[0134] Exemplarily, the first response information can be the response information corresponding to the first target node, or the response information corresponding to the new first target node, i.e., the response information determined by the first target node according to the operation request.

[0135] Exemplarily, in the case that the first target node does not respond to the operation request, i.e., the response information obtained according to the operation request is that the first target node fails to respond.

[0136] Exemplarily, in the case that the first target node fails to respond, the server needs to re-obtain the first response information corresponding to the first target node until the obtained first response information indicates success, and then stop obtaining the first response information.

[0137] Exemplarily, in the case that the first target node successfully executes the operation request, the first response information indicating success can be obtained.

[0138] Exemplarily, in the case that the first response information indicating success is obtained, the server can stop obtaining the first response information.

[0139] Exemplarily, the retry number can be the number of times that the server reacquires the response information from the first target node, the retry number can be any integer greater than or equal to zero, specifically, the retry number can be 1, 2, etc., which is not limited in the embodiment of the present application.

[0140] Exemplarily, the preset threshold can be the number of times that the server reacquires the response information from the first target node, the preset threshold can be any integer greater than or equal to zero, specifically, the preset threshold can be 5, 6, etc., which is not limited in the embodiment of the present application.

[0141] Exemplarily, in the case that the retry number of the first target node reaches the threshold on the server side, the acquired response information is all response failures, it can be determined that the first target node fails to execute.

[0142] Exemplarily, any target node can be a target node that can be served in the data center.

[0143] Exemplarily, in the case that the first target node fails to execute, the server will stop acquiring and send an operation request to any target node in the data center except the first target node, and determine the target node as a new first target node.

[0144] Exemplarily, the first response information of the new first target node can be response information determined by the new first target node according to the operation request.

[0145] Exemplarily, the first response information of the new first target node can be execution success, or execution failure, or no execution, etc., which is not limited in the embodiment of the present application.

[0146] Exemplarily, the acquired first response information is analyzed, if the response information of each target node indicates execution success, the server can return the response information of execution success to the client, which is not limited in the embodiment of the present application.

[0147] Further, in the embodiment of the present application, when the server acquires the response information corresponding to each data center, it can also acquire the response information corresponding to each data center; in the case that the response information corresponding to each data center indicates execution success, the execution result corresponding to the operation request is returned to the client.

[0148] Exemplarily, the response information corresponding to each data center can be the corresponding response information determined from each data center, specifically, the response information corresponding to each data center can all be execution success response information, or all be execution failure response information, or have both execution success response information and execution failure response information, which is not limited in the embodiment of the present application.

[0149] Exemplarily, in a case where the response information corresponding to each data center indicates that the execution is successful, the server returns the response information indicating that the execution is successful to the client.

[0150] Further, in the embodiment of the present application, when the server obtains the response information corresponding to each data center, the server can also obtain the response information corresponding to each data center; in a case where the response information of at least one data center indicates that the execution is successful, the server returns the execution result corresponding to the operation request to the client; and the server performs data synchronization processing on other data centers according to the execution result of the data center whose execution is successful.

[0151] Exemplarily, after the server returns the execution result corresponding to the operation request to the client, the server performs data synchronization processing on other data centers according to the execution result of the data center whose execution is successful, so as to ensure the consistency of data and improve the efficiency of the response of the server to the operation request.

[0152] Exemplarily, the data synchronization processing can be metadata addition, deletion or modification of a user or a bucket in one site, which is immediately effective in other sites; an object uploaded in one site can be immediately accessed in another site, so as to realize real-time consistency of data between sites, and further ensure the strong consistency of metadata and object data in each site.

[0153] In step S104, the server feeds back the execution result corresponding to the operation request to the client according to the response information of at least one data center.

[0154] In the embodiment of the present application, after obtaining the response information corresponding to each data center, the server can feed back the execution result corresponding to the operation request to the client according to the response information of at least one data center.

[0155] Exemplarily, in a case where the execution of the operation request in each data center is successful, the server can perform operation rollback on the data center whose execution is successful, so as to ensure the consistency of data.

[0156] Exemplarily, the execution result of each data center can be execution success, execution failure or no execution, which is not limited in the embodiment of the present application.

[0157] Exemplarily, the client refers to a program corresponding to the server, which provides local service for the client. Specifically, it usually refers to a software application installed on a user computer or other intelligent terminal device, which is used to access the server and obtain or send data.

[0158] Further, in the embodiment of the present application, when the execution result of the operation request corresponding to the client is fed back to the client according to the response information of at least one data center, the server can further feed back the execution result of the operation request of the first target node to the client in the case that the first response information of the first target node indicates that the first target node responds successfully.

[0159] To sum up, the response method provided by the embodiment of the present application is applied to the server, and the method comprises the following steps: receiving an operation request sent by a client; the operation request is used to request the target data stored in the data center to perform an operation; sending the operation request to a first data center; the operation request is used to instruct the first data center to forward the operation request to each data center other than the first data center according to a polling strategy; obtaining the response information corresponding to each data center; the response information is used to indicate the execution of the operation request by the data center; and feeding back the execution result corresponding to the operation request to the client according to the response information of at least one data center. In the embodiment of the present application, after the server receives the operation request sent by the client, the server sends the operation request to the first data center, and the first data center forwards the operation request to each data center according to the polling strategy based on the operation request, so as to ensure the consistency of the data in each data center. Finally, the server can feed back the execution result corresponding to the operation request to the client according to the response information of at least one data center, thereby solving the problem that the data in each data center cannot be synchronized in time, and improving the response efficiency of the server to the operation request.

[0160] The response method provided by the embodiment of the present application can be applied to the server as described above, and the steps of the response method provided by the embodiment of the present application are shown in Figure 2 , and the method can comprise the following steps S201 to S208: Figure Two

[0161] Step S201, receiving an operation request sent by a client; the operation request is used to request the target data stored in the data center to perform an operation.

[0162] In the embodiment of the present application, in the response process of the server, the server first receives the operation request sent by the client; wherein the operation request is used to request the target data stored in the data center to perform an operation.

[0163] For example, the operation request can be used to request the target data stored in the data center, that is, the operation request is used to access the target data.

[0164] ​For example, the operation request can include a data synchronization request; specifically, the data between multiple sites needs to be kept in quasi-real-time synchronization to ensure the consistency and integrity of the data. This usually involves copying data from one site to another while ensuring the accuracy and integrity of the data during the copying process; synchronization progress query: users or administrators may need to query the progress of data synchronization to understand the synchronization status of data between different sites. This helps monitor the performance of the system and timely discover potential problems.

[0165] For example, the operation request can also include a data write request; specifically, in a distributed object storage system, a data write request may involve multiple sites. The system needs to ensure that the data remains consistent during the writing process, even between multiple sites. This is usually achieved by adopting a strong consistency protocol such as Raft; some write requests may need to guarantee atomicity, i.e. all write operations either succeed or fail entirely. This helps ensure the consistency and integrity of the data.

[0166] For example, the operation request can also include a data read request, in a multi-site environment, users may need to read consistent data. The system needs to provide consistent read semantics to ensure that the data read by users is up-to-date and consistent; distributed consistent snapshot read allows users to read data snapshots before a certain point in time. This helps ensure that when data changes, users can still access the previous data state.

[0167] For example, the operation request can also include a data deletion request, specifically, distributed deletion is similar to write request, data deletion request may also involve multiple sites. The system needs to ensure that the data remains consistent during the deletion process to avoid data loss or inconsistency; conditional deletion refers to certain deletion requests that may need to meet certain conditions to be executed. For example, only delete it when a certain key does not exist, or only delete it when a certain record is a certain version.

[0168] For example, the operation request can also include a disaster recovery switching request, specifically, fault detection and switching, i.e. in a multi-site disaster recovery environment, the system needs to be able to detect the failure of a certain site and automatically switch to other normal sites to continue providing services. This usually involves fault detection mechanisms, switching strategies and fault recovery processes.

[0169] For example, the operation request can also include data verification and recovery, specifically, after switching to other sites, the system needs to verify the data to ensure the integrity and consistency of the data. If problems are found, the system needs to be able to automatically or manually recover the data.

[0170] Exemplarily, the operation requests can also include management requests, specifically, site management, i.e. the administrator may need to add, delete or modify the site configuration. This includes setting the storage class of the site, access rights, synchronization policy, etc.

[0171] Exemplarily, the operation requests can also include monitoring and alarm, specifically, the system needs to provide monitoring and alarm functions, so that the administrator can monitor the performance and status of the system in real time, and receive alarm notification in time when problems occur.

[0172] Multi-site disaster recovery of data strong consistency in distributed object storage system involves various operation requests. These requests work together to ensure data consistency and availability between different sites, while providing disaster recovery capabilities to deal with possible site failures.

[0173] Exemplarily, a data center can have a set of storage systems, also known as a storage cluster, with corresponding storage gateways and storage pools. A data center can have multiple object storage gateway instances.

[0174] Exemplarily, multiple object storage gateway instances refer to the deployment of multiple object storage gateway entities or copies in a distributed storage system or cloud computing environment. These instances work together to provide efficient, reliable and scalable object storage services.

[0175] Exemplarily, an object storage gateway is a storage network device that connects multiple storage nodes and manages and coordinates data storage and access. Multiple object storage gateway instances mean that there are multiple such gateway devices or software copies in the system, which collectively handle storage requests and provide data access services. These instances usually support multiple storage protocols and can be flexibly configured to adapt to different storage needs.

[0176] Multiple object storage gateway instances play an important role in various application scenarios, including but not limited to: cloud computing environment, i.e. in a cloud computing environment, multiple object storage gateway instances can provide efficient data storage and management services, support the management and coordination of different storage nodes, and improve the reliability and performance of the system. Big data processing, i.e. for big data processing tasks, multiple object storage gateway instances can optimize storage performance and network bandwidth, improve data processing efficiency and accuracy. Distributed storage system, i.e. in a distributed storage system, multiple object storage gateway instances can support centralized management and sharing of data, while supporting multiple storage protocols and access control mechanisms to ensure data security and confidentiality.

[0177] The plurality of object storage gateway instances can back up and fault-tolerate each other, improving the availability of the system; through the plurality of instances jointly processing storage requests, load balancing can be achieved, and the throughput and response speed of the system can be improved; as the storage demand grows, more object storage gateway instances can be conveniently added to expand the storage capacity of the system.

[0178] Maintaining data consistency among the plurality of instances is a challenge, and appropriate data synchronization and consistency protocols need to be adopted; when a certain instance fails, it needs to be quickly switched to other normal instances, and the integrity and consistency of the data need to be ensured; the resource usage of the plurality of instances needs to be effectively managed to avoid resource waste and performance bottlenecks.

[0179] Exemplarily, the target data can be data stored in a data center, and can be a plurality of object storage gateway instances, which are not limited in the embodiments of the present application.

[0180] In step S202, for each data center, a service node in the data center that matches the node identification information stored in the data center is determined as a target node according to the node identification information stored in the data center.

[0181] In the embodiments of the present application, after receiving the operation request sent by the client, the server can determine, for each data center, a service node in the data center that matches the node identification information stored in the data center as a target node according to the node identification information stored in the data center.

[0182] Exemplarily, the node identification information stored in the data center can be a service identifier that identifies whether the node can serve the operation request.

[0183] Exemplarily, the service node in the data center that matches the node identification information can be a service node in the data center that contains the node identification information.

[0184] Exemplarily, the target node can be a node that provides service.

[0185] In step S203, the target nodes in each data center that meet the requirements are polled in turn, and when the last data center is polled, the next round of polling is started, and the target nodes in each data center that meet the requirements are continued to be polled.

[0186] In the embodiments of the present application, after determining, for each data center, a service node in the data center that matches the node identification information stored in the data center as a target node according to the node identification information stored in the data center, the server can poll the target nodes in each data center that meet the requirements in turn, and when the last data center is polled, the next round of polling is started, and the target nodes in each data center that meet the requirements are continued to be polled.

[0187] Exemplarily, the load balancing management module can be responsible for load balancing management of nodes in each site. According to site information recorded in each data center, an IP of each site receiving service is selected for use by service request forwarding, and all nodes in the default site are balanced in a round robin strategy.

[0188] Exemplarily, in the process of determining the target node, the server needs to call the load balancing management module to poll the target nodes in each data center in turn, so that the target node that can be served can be quickly determined when an operation request is received, and the response efficiency is improved.

[0189] Exemplarily, the target node meeting the requirements can be a node that can respond to the operation request.

[0190] Exemplarily, the server can call the load balancing management module to traverse the entire data center, that is, the last data center needs to be polled.

[0191] Exemplarily, after the server polls the last data center, the server can continue the next round of query.

[0192] Exemplarily, in the new round of query process, the server needs to continue to poll the target nodes in each data center that can be served.

[0193] Exemplarily, the target node meeting the requirements in each data center is a target node that can provide service.

[0194] Step S204, send the operation request to the first data center.

[0195] In the embodiment of the application, after calling the load balancing management module, polling the target nodes meeting the requirements in each data center in turn, and starting the next round of query to continue polling the target nodes meeting the requirements in each data center, the server can send the operation request to the first data center.

[0196] Exemplarily, the first data center can be any one of the data centers, which is not limited in the embodiment of the application.

[0197] Exemplarily, the polling strategy can be used to indicate load balancing of the target nodes in each data center.

[0198] Exemplarily, parallel asynchronous forwarding can be that when the operation request is received, the data center first asynchronously processes the operation request locally, and then asynchronously forwards the operation request in parallel to other data centers except the first data center.

[0199] Exemplarily, each data center can be any data center, which is not limited in the embodiments of the present application.

[0200] Exemplarily, the other data center can be any data center, which is not limited in the embodiments of the present application.

[0201] Step S205, the operation request is forwarded to the other data centers in the data centers except the first data center in parallel and asynchronously.

[0202] In the embodiments of the present application, after the operation request is sent to the first data center, the server can forward the operation request to the other data centers in the data centers except the first data center in parallel and asynchronously.

[0203] Exemplarily, the request parallel asynchronous forwarding management module can be responsible for scheduling inter-site parallel asynchronous forwarding of the operation request. After receiving the operation request, the site service IP load balancing management module is called to select IP nodes receiving services of each site, and a communication link is created with the selected service IP of each site. Then, the request is locally asynchronously processed, and the operation request is forwarded to the service IP nodes of other sites in parallel and asynchronously. In order to improve performance, all requests use asynchronous calls to avoid performance impact caused by synchronization. After all the responses of the requests of all sites are returned, the final response result is returned to the client. If all sites are successfully executed, success is returned. If a site fails to execute, the next IP node is selected for retry. If the retry fails for 5 times, failure is returned, and the site that is successfully executed is rolled back.

[0204] Exemplarily, the other data center except the first data center can be one or more, which is not limited in the embodiments of the present application.

[0205] Exemplarily, the metadata operation request can be a metadata operation such as adding, deleting, or modifying a user or a bucket in a node of a site, which calls the request parallel asynchronous forwarding management module to ensure the consistency of metadata.

[0206] Exemplarily, the data operation request can be an operation such as uploading, deleting, or modifying metadata of an object in a node of a site, which calls the request parallel asynchronous forwarding management module to ensure the consistency of object data.

[0207] Exemplarily, when a metadata operation of adding a bucket is performed on metadata, a new bucket can be created in the object storage service for storing objects. When the bucket is created, the name, location (region), access permission, and other attributes of the bucket need to be specified. Some services also allow setting policies and lifecycle rules of the bucket and other advanced functions.

[0208] For example, when performing a bucket deletion operation on metadata, a bucket and all the objects it contains can be removed. Deleting a bucket is a sensitive operation because once deleted, all data in the bucket will be lost. Therefore, it is usually necessary to confirm that the bucket is empty or that important data has been backed up before deleting a bucket.

[0209] For example, when performing metadata modification operations on a bucket, the bucket's attributes, such as access permissions, storage category, and lifecycle rules, are updated. When modifying a bucket, it's essential to ensure that these changes do not violate existing data protection policies or result in data loss.

[0210] For example, the execution object can be object metadata, which is not limited in the embodiments of the present invention.

[0211] For example, the upload processing operation can be to call the request parallel asynchronous forwarding management module to write data to each site in parallel when a client upload request is received.

[0212] For example, the deletion processing operation can be to call the request parallel asynchronous forwarding management module to write data to each site in parallel when a client's deletion request is received.

[0213] For example, the modification processing operation could be to call the request parallel asynchronous forwarding management module to write data to each site in parallel when a client modification request is received.

[0214] Step S206: For each data center, determine the target node in the data center that receives the operation request as the first target node.

[0215] In this embodiment of the invention, after the request parallel asynchronous forwarding management module is invoked to forward the operation request to other data centers in each data center in parallel asynchronously except for the first data center, the server can determine the target node receiving the operation request in each data center as the first target node.

[0216] For example, the target node receiving the operation request can be a node that responds to the operation request, i.e., a target node that can be served.

[0217] For example, the first target node can be any target node in the data center that receives the operation request, and is not limited in the embodiments of the present invention.

[0218] Step S207: Obtain the first response information of the first target node.

[0219] In this embodiment of the invention, after determining the target node in each data center that receives the operation request as the first target node, the server can obtain the first response information of the first target node.

[0220] For example, the first response information can be the response information corresponding to the first target node, or it can be the response information corresponding to a new first target node, that is, the response information determined by the first target node according to the operation request.

[0221] Step S208: If the first response information indicates that the first target node failed to respond, reacquire the first response information corresponding to the first target node until the first response information indicating successful execution is obtained, then stop acquiring the information.

[0222] In this embodiment of the invention, after obtaining the first response information of the first target node, the server can re-obtain the first response information corresponding to the first target node if the first response information indicates that the first target node failed to respond, until it obtains the first response information indicating that the execution was successful, and then stops obtaining the first response information.

[0223] For example, the first target node does not respond to the operation request, that is, the response information obtained from the operation request indicates that the first target node failed to respond.

[0224] For example, if the first target node fails to respond, the server needs to re-acquire the first response information corresponding to the first target node until the acquired first response information indicates that the execution was successful, and then it will stop acquiring the first response information.

[0225] For example, if the operation request is successfully executed on the first target node, the first response information of successful execution can be obtained.

[0226] For example, once the server receives the first response information indicating successful execution, it can stop receiving the first response information.

[0227] Reference Figure 3 The flowchart illustrates the steps of a response method provided by an embodiment of the present invention. Figure Three The method may further include steps S209 to S210:

[0228] Step S209: If the first response information indicates that the first target node has failed to respond, reacquire the first response information corresponding to the first target node and determine whether the number of retries is greater than or equal to a preset threshold.

[0229] In this embodiment of the invention, after the first response information indicates that the first target node has failed to respond and the first response information corresponding to the first target node is re-acquired, it is determined whether the number of retries is greater than or equal to a preset threshold.

[0230] For example, the number of retries can be the number of times the server re-acquires the response information at the first target node. The number of retries can be any integer greater than or equal to zero. Specifically, the number of retries can be 1 time, 2 times, etc., and is not limited in the embodiments of the present invention.

[0231] For example, the preset threshold can be the number of times the server is allowed to re-acquire response information at the first target node. The preset threshold can be any integer greater than or equal to zero. Specifically, the preset threshold can be 5 times, 6 times, etc., and is not limited in the embodiments of the present invention.

[0232] In this embodiment of the invention, if the condition is met, step S210 is executed; otherwise, step S208 is executed.

[0233] Step S210: If the first target node fails to execute, stop acquiring information, send an operation request to any target node in the data center other than the first target node, and designate the target node as the new first target node. Continue to acquire the first response information of the new first target node and analyze the acquired first response information.

[0234] In this embodiment of the invention, if the number of retries is greater than or equal to a preset threshold, the server can determine that the first target node has failed to execute, stop acquiring, send an operation request to any target node in the data center other than the first target node, determine the target node as the new first target node, continue to acquire the first response information of the new first target node, and analyze the acquired first response information.

[0235] For example, if the number of retries made by the server to the first target node reaches a threshold and all the response information obtained is a failure response, then it can be determined that the first target node has failed to execute.

[0236] For example, any target node can be a serviceable target node in a data center.

[0237] For example, if the first target node fails to execute, the server will stop acquiring data and send an operation request to any target node in the data center other than the first target node, and identify the target node as the new first target node.

[0238] For example, the first response information of the new first target node can be the response information determined by the new first target node based on the operation request.

[0239] For example, the first response information of the new first target node may be execution success, execution failure, or no execution, etc., and is not limited in the embodiments of the present invention.

[0240] For example, the first response information obtained is analyzed. If the response information of each target node indicates successful execution, the server can return a successful execution response information to the client. This is not limited in the embodiments of this application.

[0241] Reference Figure 4 The flowchart illustrates the steps of a response method provided by an embodiment of the present invention. Figure Four The method may further include steps S211 to S212:

[0242] Step S211: Obtain the response information corresponding to each data center.

[0243] In this embodiment of the invention, after sending the operation request to the first data center, the server can also obtain the response information corresponding to each data center.

[0244] For example, the response information corresponding to each data center can be the corresponding response information determined from each data center. Specifically, the response information corresponding to each data center can all be response information of successful execution, or all be response information of failed execution, or have both response information of successful execution and response information of failed execution. This is not limited in the embodiments of the present invention.

[0245] Step S212: If the response information from each data center indicates successful execution, return the execution result corresponding to the operation request to the client.

[0246] In this embodiment of the invention, after obtaining the response information corresponding to each data center, if the response information corresponding to each data center indicates that the execution was successful, the execution result corresponding to the operation request is returned to the client.

[0247] For example, if the response information for each data center indicates successful execution, the server will return a successful execution response to the client.

[0248] Reference Figure 5 The flowchart illustrates the steps of a response method provided by an embodiment of the present invention. Figure Five The method may further include steps S213 to S214:

[0249] Step S213: If the response information from at least one data center indicates successful execution, return the execution result corresponding to the operation request to the client.

[0250] In this embodiment of the invention, after obtaining the response information corresponding to each data center, the server can also return the execution result corresponding to the operation request to the client if the response information of at least one data center indicates that the execution was successful.

[0251] For example, after the server returns the execution result corresponding to the operation request to the client, it will also perform data synchronization processing on other data centers based on the execution result of the successfully executed data center to ensure data consistency and thus improve the efficiency of the server's response to the operation request.

[0252] Step S214: Perform data synchronization processing on other data centers based on the execution results of the successfully executed data center.

[0253] In this embodiment of the invention, the response information from at least one data center indicates successful execution. After returning the execution result corresponding to the operation request to the client, the server can also perform data synchronization processing on other data centers based on the execution result of the successfully executed data center.

[0254] For example, data synchronization processing can add, delete, or modify metadata for users or buckets on one site, and the changes will immediately take effect on other sites; objects uploaded on one site can be accessed on another site immediately, truly achieving real-time data consistency between sites, thereby ensuring strong consistency of metadata and object data across sites.

[0255] In some embodiments, the site service IP load balancing management module is responsible for load balancing management of nodes within each site. Based on the site information recorded in the zonegroup, it selects the IP address for each site to receive services for use in forwarding service requests. By default, all nodes within a site use a round-robin strategy for load balancing.

[0256] Reference Figure 6 The diagram illustrates a flowchart of the steps for site service IP load balancing management provided by an embodiment of the present invention. The method may further include steps S301 to S303:

[0257] When the service starts, the business IPs of each site are obtained from the zonegroup information, and the first one is used as the current address curl_ip. This information is stored in memory.

[0258] Step S301: Receive a request to query the site's business IP.

[0259] Step S302: The site service IP load balancing management module starts looping through each site, obtaining the curl_ip of each site, and updating the curl_ip to the next service IP. If it reaches the last one, it loops back to the first one.

[0260] Step S303: Return the query results to the query module.

[0261] The parallel asynchronous forwarding management module is responsible for scheduling parallel asynchronous forwarding of operation requests between sites. Upon receiving an operation request, it calls the site service IP load balancing management module to select the IP nodes for receiving services at each site and establishes communication links with the selected site service IPs. Then, it first processes the request asynchronously locally, and then forwards the operation request asynchronously to the service IP nodes of other sites in parallel. To improve performance, all requests use asynchronous calls to avoid the performance impact of synchronous calls. After all requests from all sites have returned responses, the final response result is returned to the client. If all sites execute successfully, a success message is returned. If a site fails, the next IP node is selected for retry. If the retry fails after 5 attempts, a failure message is returned, and the operation is rolled back for the successfully executed sites.

[0262] Reference Figure 7 The figure illustrates a schematic diagram of a parallel asynchronous request forwarding method provided by an embodiment of the present invention.

[0263] The client sends an operation request to site 1; site 1 processes the request asynchronously locally and forwards it asynchronously to site 2 and site 3; site 2 and site 3 return the response information corresponding to the operation request to site 1; site 1 waits for all sites to return responses, processes the responses, obtains the final response, and returns the final response to the client.

[0264] Reference Figure 8 The figure shows a timing diagram of a request parallel asynchronous forwarding method provided by an embodiment of the present invention:

[0265] The client sends the operation request to site 1, where the request can be processed asynchronously locally. At the same time, site 1 can asynchronously forward the operation request to site 2 and site 3. After receiving the asynchronous forwarding request, site 2 and site 3 will return the corresponding response results to site 1. Site 1 will centrally process all the returned response results and wait for all sites to return responses before processing the responses to obtain the final response, which will then be returned to the client.

[0266] Reference Figure 9 The diagram illustrates a flowchart of a request for parallel asynchronous forwarding provided by an embodiment of the present invention. The method may further include steps S501 to S513:

[0267] Step S501: Received operation request;

[0268] Step S502: Call the site service IP load balancing management module to select the service IPs of each site;

[0269] Step S503: Establish links with the business IPs of each site;

[0270] Step S504: Call the asynchronous interface to process the business request of this node;

[0271] Step S505: Forward the request asynchronously and in parallel to the business IP nodes of each site through the created link;

[0272] Step S506: Loop through and query each forwarding node to see if it has returned a response, and process the returned results;

[0273] Step S507: Has the node being looped through responded?

[0274] If the condition is met, proceed to step S508; otherwise, proceed to step S506.

[0275] Step S508: Determine whether the returned result is successful;

[0276] If the condition is met, proceed to step S510; otherwise, proceed to step S509.

[0277] Step S509: Determine if the number of retries exceeds 5;

[0278] If the condition is met, proceed to step S512; otherwise, proceed to step S513.

[0279] Step S510: Have all sites returned a response?

[0280] If the condition is met, proceed to step S511; otherwise, proceed to step S512.

[0281] Step S511: Return a response to the client;

[0282] Step S512: The operation was rolled back to other sites, and the final response was failure;

[0283] Step S513: Obtain the IP address of the next business node for this site and re-forward the request.

[0284] When the business operation scheduling module receives metadata or data operation requests, it assembles the corresponding message structure according to different request types, calls the request parallel asynchronous forwarding management module to forward the requests to other sites in parallel, and returns the execution results.

[0285] When the operation request is a metadata operation, such as adding, deleting, or modifying users or buckets on a certain node of a certain site, the request parallel asynchronous forwarding management module is invoked to ensure the consistency of metadata.

[0286] When an operation request involves data manipulation, such as uploading, deleting, or modifying object metadata at a specific node on a certain site, the request parallel asynchronous forwarding management module is invoked to ensure the consistency of object data. Taking object upload as an example, upon receiving an upload request from a client, the request parallel asynchronous forwarding management module is invoked to write the data to each site in parallel. Only after all sites have successfully written the data is a success message returned to the client.

[0287] Reference Figure 10 The diagram illustrates a step flowchart of an operation scheduling process provided by an embodiment of the present invention. The method may further include steps S601 to S604:

[0288] Step S601: Receive client operation request;

[0289] Step S602: Assemble the corresponding message structure according to the operation type;

[0290] Step S603: Call the request parallel asynchronous forwarding management module to forward the request to other sites in parallel;

[0291] Step S604: After the parallel asynchronous forwarding management module returns a response, return a response to the client;

[0292] In summary, this invention proposes a multi-site disaster recovery scheme for strong data consistency in distributed object storage. It achieves strong consistency between metadata and object data across all sites. Metadata addition, deletion, and modification operations performed on one site for users or buckets immediately take effect on other sites; objects uploaded to one site are immediately accessible on another, truly achieving real-time data consistency across sites. Furthermore, in the event of a site failure, the recovery probability (RPO) is 0, ensuring no data loss and improving multi-site disaster recovery capabilities. This not only provides customers with a superior user experience but also enriches the functionality of object storage and enhances the market competitiveness of distributed object storage products.

[0293] In the embodiments of the present invention, a method for managing the IP load balancing of site services is proposed to achieve load balancing of services within each site and improve service processing capabilities.

[0294] In embodiments of this invention, a method for strong data consistency between sites is proposed: upon receiving an operation request, the request can be asynchronously forwarded to the business IP nodes of other sites in parallel. This not only does not affect overall performance but also achieves strong consistency of element and object data across sites. An operation at one site immediately takes effect on another, truly achieving real-time data consistency between sites. Furthermore, in the event of a site failure, a fault recovery RPO of 0 is achieved, ensuring no data loss and improving multi-site disaster recovery capabilities.

[0295] In embodiments of the present invention, a method for unified scheduling and forwarding of metadata and data operations is proposed, which simplifies the operation processing flow.

[0296] Reference Figure 11 The diagram illustrates an architecture of a distributed storage system provided by an embodiment of the present invention, such as... Figure 11 As shown, the distributed storage system 600 includes a server 601, a client 602, and a data center 603.

[0297] The client sends an operation request to the server;

[0298] The server is used to receive operation requests sent by clients; the operation requests are used to request target data stored in the data center; the operation requests are sent to the first data center; the operation requests are used to instruct the first data center to forward the operation requests in parallel and asynchronously to other data centers among the data centers other than the first data center according to a polling strategy;

[0299] The data center is configured to forward the operation request to other data centers in parallel and asynchronously based on the polling strategy; the other data centers receive the operation request and perform response processing based on the operation request;

[0300] The server is used to obtain response information corresponding to each data center; the response information is used to indicate the execution status of the data center in response to the operation request; if the execution status of each data center indicates successful execution, the server returns the execution results of each data center to the client.

[0301] The client is used to receive the execution result returned by the server.

[0302] Optionally, the server is further configured to perform the following steps:

[0303] Based on the node identification information stored in each data center, determine the target node corresponding to each data center;

[0304] Sending the operation request to the first data center includes:

[0305] The operation request is sent to the target node corresponding to the first data center, so that the target node will forward the operation request in parallel and asynchronously to the target nodes of other data centers in each data center other than the first data center according to the polling strategy;

[0306] The process of obtaining the response information corresponding to each data center includes:

[0307] For each data center, the target node in the data center that receives the operation request is determined as the first target node;

[0308] Obtain the first response information of the first target node;

[0309] If the first response information indicates that the first target node's response has failed, the first response information corresponding to the first target node is retrieved again until a first response information indicating successful execution is retrieved, at which point the retrieval stops; or...

[0310] If the number of retries is greater than or equal to a preset threshold, it is determined that the first target node has failed to execute, the acquisition is stopped, the operation request is sent to any target node in the data center other than the first target node, the target node is determined as the new first target node, the first response information of the new first target node is acquired, and the acquired first response information is analyzed.

[0311] Optionally, the server is further configured to perform the following steps:

[0312] The operation request is sent to the first data center;

[0313] The request parallel asynchronous forwarding management module is invoked to forward the operation request in parallel and asynchronously to other data centers in the data centers other than the first data center;

[0314] The operation request includes at least one of a metadata operation request and a data operation request;

[0315] The metadata operation request is used to request at least one of the following operations to be performed on the target metadata stored in the data center: add metadata operation, delete metadata operation, and modify metadata operation.

[0316] The data operation request is used to request at least one of the following operations: upload processing, deletion processing, and modification processing of target data stored in the data center.

[0317] Optionally, the server is further configured to perform the following steps:

[0318] Obtain the response information corresponding to each data center;

[0319] If the response information corresponding to each of the data centers indicates that the execution was successful, the execution result corresponding to the operation request will be returned to the client.

[0320] Optionally, the server is further configured to perform the following steps:

[0321] Obtain the response information corresponding to each data center;

[0322] If the response information from at least one data center indicates that the operation was successful, the execution result corresponding to the operation request will be returned to the client.

[0323] Based on the execution results of the successfully executed data center, perform data synchronization processing on other data centers.

[0324] Optionally, the server is further configured to perform the following steps:

[0325] The load balancing management module is invoked to sequentially poll the target nodes that meet the requirements in each data center until the last data center is polled. Then, the next round of querying is initiated to continue polling the target nodes that meet the requirements in each data center.

[0326] Optionally, the server is further configured to perform the following steps:

[0327] For each data center, the service node in the data center that matches the node identification information stored in the data center is determined as the target node.

[0328] Reference Figure 12 The diagram illustrates a response device 800 provided in an embodiment of the present invention, the response device 800 comprising:

[0329] The first receiving unit 801 is used to receive an operation request sent by the client; the operation request is used to request the target data stored in the data center to perform an operation.

[0330] The first sending unit 802 is used to send an operation request to the first data center; the operation request is used to instruct the first data center to forward the operation request in parallel and asynchronously to other data centers other than the first data center according to a polling strategy;

[0331] The acquisition unit 803 is used to acquire response information corresponding to each data center; the response information is used to indicate the data center's execution status of the operation request.

[0332] The return unit 804 is used to return the execution result corresponding to the operation request to the client based on the response information from at least one data center.

[0333] Optionally, the target node corresponding to each data center can be determined based on the node identification information stored in each data center;

[0334] Optionally, the operation request is sent to the target node corresponding to the first data center; the operation request is used to instruct the target node to forward the operation request in parallel and asynchronously to the target nodes of other data centers in each data center other than the first data center according to the polling strategy;

[0335] Optionally, for each data center, the target node receiving the operation request in the data center is determined as the first target node; the first response information of the first target node is obtained; if the first response information indicates that the first target node failed to respond, the first response information corresponding to the first target node is obtained again until the first response information indicating successful execution is obtained, and then the acquisition stops; or, if the number of retries is greater than or equal to a preset threshold, it is determined that the first target node has failed to execute, the acquisition stops, an operation request is sent to any target node in the data center other than the first target node, and the target node is determined as the new first target node, the first response information of the new first target node is obtained, and the obtained first response information is analyzed.

[0336] Optionally, the operation request is sent to the first data center; the request parallel asynchronous forwarding management module is invoked to forward the operation request in parallel and asynchronously to other data centers besides the first data center; wherein, the operation request includes at least one of metadata operation request and data operation request; the metadata operation request is used to request to perform at least one of add metadata operation, delete metadata operation, and modify metadata operation on the target metadata stored in the data center; the data operation request is used to request to perform at least one of upload processing operation, delete processing operation, and modify processing operation on the target data stored in the data center.

[0337] Optionally, if the response information corresponding to each of the data centers indicates successful execution, the execution result corresponding to the operation request is returned to the client.

[0338] Optionally, if the response information from at least one data center indicates successful execution, the execution result corresponding to the operation request is returned to the client; and data synchronization processing is performed on other data centers based on the execution result from the successfully executed data center.

[0339] Optionally, for each data center, based on the node identification information stored in the data center, the service node in the data center that matches the node identification information is determined as the target node; the target nodes that meet the requirements in each data center are polled in turn until the last data center is polled, then the next round of query is started, and the target nodes that meet the requirements in each data center are polled in turn.

[0340] Optionally, based on the type of the operation request, a message structure corresponding to the operation request is assembled; and the message structure is sent to the target node.

[0341] Optionally, if the first response information of the first target node indicates that the first target node has responded successfully, the execution result of the first target node in response to the operation request is fed back to the client.

[0342] The present invention also provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the response method of the foregoing embodiments.

[0343] The present invention also provides an electronic device 900, see below. Figure 13 It includes: a processor 901, a memory 902, and a computer program 9021 stored in the memory and executable on the processor, wherein the processor executes the program to implement the response method of the foregoing embodiments.

[0344] The present invention also provides a readable storage medium that, when the instructions in the storage medium are executed by the processor of an electronic device, enables the electronic device to perform the response method of the foregoing embodiments.

[0345] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0346] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, this invention is not directed to any particular programming language. It should be understood that the contents of the invention described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of the invention.

Claims

1. A response method, characterized in that, Applied to the server side, the method includes: Receive an operation request sent by the client; the operation request is used to request operation on target data stored in the data center. The operation request is sent to the first data center; the operation request is used to instruct the first data center to forward the operation request in parallel and asynchronously to other data centers other than the first data center according to the polling strategy; wherein, the parallel and asynchronous forwarding means that when the operation request is received, the data center first processes the operation request locally and asynchronously, and then forwards the operation request in parallel and asynchronously to other data centers other than the first data center. Obtain response information corresponding to each data center; the response information is used to indicate the execution status of the data center in response to the operation request; Based on the response information from at least one data center, the execution result corresponding to the operation request is fed back to the client; If all data centers execute successfully, a success response is returned to the client; If any data center fails to execute, a retry will be performed. If the number of retries exceeds a preset threshold and still fails, the operation will be rolled back for the data centers that have already succeeded, and a failure response will be returned to the client.

2. The method according to claim 1, characterized in that, Sending the operation request to the first data center includes: The operation request is sent to the first data center; The operation request is forwarded asynchronously and in parallel to the other data centers in the data centers, excluding the first data center. The operation request includes at least one of a metadata operation request and a data operation request; The metadata operation request is used to request at least one of the following operations to be performed on the target metadata stored in the data center: add metadata operation, delete metadata operation, and modify metadata operation. The data operation request is used to request at least one of the following operations: upload processing, deletion processing, and modification processing of target data stored in the data center.

3. The method according to claim 1, characterized in that, The step of feeding back the execution result corresponding to the operation request to the client based on the response information from at least one data center includes: If the response information corresponding to each of the data centers indicates that the execution was successful, the execution result corresponding to the operation request will be returned to the client.

4. The method according to claim 1, characterized in that, The step of feeding back the execution result corresponding to the operation request to the client based on the response information from at least one data center includes: If the response information from at least one data center indicates that the operation was successful, the execution result corresponding to the operation request will be returned to the client. Based on the execution results of the successfully executed data center, perform data synchronization processing on other data centers.

5. The method according to claim 1, characterized in that, Before sending the operation request to the first data center, the method further includes: Based on the node identification information stored in each data center, determine the target node corresponding to each data center; Sending the operation request to the first data center includes: The operation request is sent to the target node corresponding to the first data center, so that the target node will forward the operation request in parallel and asynchronously to the target nodes of other data centers in each data center other than the first data center according to the polling strategy; The process of obtaining the response information corresponding to each data center includes: For each data center, the target node in the data center that receives the operation request is determined as the first target node; Obtain the first response information of the first target node; If the first response information indicates that the first target node's response has failed, the first response information corresponding to the first target node is retrieved again until a first response information indicating successful execution is retrieved, at which point the retrieval stops; or... If the number of retries is greater than or equal to a preset threshold, it is determined that the first target node has failed to execute, the acquisition is stopped, the operation request is sent to any target node in the data center other than the first target node, the target node is determined as the new first target node, the first response information of the new first target node is acquired, and the acquired first response information is analyzed.

6. The method according to claim 5, characterized in that, The step of determining the target node corresponding to each data center based on the node identification information stored in each data center includes: For each data center, based on the node identification information stored in the data center, the service node in the data center that matches the node identification information is determined as the target node; The system polls the target nodes that meet the requirements in each data center in turn until the last data center is polled. Then, the next round of querying begins, and the system continues to poll the target nodes that meet the requirements in each data center.

7. The method according to claim 5, characterized in that, Sending the operation request to the target node corresponding to the first data center includes: Based on the type of the operation request, assemble the message structure corresponding to the operation request; Send the message structure to the target node.

8. The method according to any one of claims 5 to 7, characterized in that, The step of feeding back the execution result corresponding to the operation request to the client based on the response information from at least one data center includes: If the first response information from the first target node indicates that the first target node has responded successfully, the execution result of the first target node in response to the operation request is fed back to the client.

9. A response method, characterized in that, Applied to a distributed storage system, which includes a server, a client, and a data center, the method includes: The client sends an operation request to the server; The server receives an operation request sent by the client; the operation request is used to request target data stored in the data center; the operation request is sent to the first data center; the operation request is used to instruct the first data center to forward the operation request in parallel and asynchronously to other data centers other than the first data center according to a polling strategy; wherein, the parallel and asynchronous forwarding means that when the operation request is received, the data center first processes the operation request locally and asynchronously, and then forwards the operation request in parallel and asynchronously to other data centers other than the first data center. The data center, based on the polling strategy, forwards the operation request to other data centers in parallel and asynchronously; the other data centers receive the operation request and perform response processing based on the operation request. The server obtains response information corresponding to each data center; the response information is used to indicate the execution status of the data center for the operation request; if the execution status of each data center indicates successful execution, the execution result of each data center is returned to the client; if all data centers execute successfully, a success response is returned to the client; if any data center fails, a retry is performed; if the number of retries exceeds a preset threshold and still fails, the operation of the successfully executed data centers is rolled back, and a failure response is returned to the client. The client receives the execution result returned by the server.

10. An electronic device, characterized in that, The electronic device includes a memory and one or more programs, wherein one or more programs are stored in the memory and configured to be executed by one or more processors using the response method as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Disaster tolerant method and system of configuration file management system

    CN107729176A

  • Request processing method, device, equipment and system for multiple data centers

    CN117240924A