Object storage cluster fault processing method and device, electronic equipment, computer readable storage medium and computer program product
By bypassing the faulty object storage service through the emergency object gateway, data can be retrieved directly on the physical machine, solving the data loss problem caused by Ceph cluster failure. This enables data retrieval in failure situations, reducing repair costs and difficulties.
Patent Information
- Application Number
- CN202510698061.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2026-11-27
AI Technical Summary
Ceph clusters are prone to metadata corruption in case of failure, which can cause object storage services to fail to start, resulting in data loss or inability to read or write data. Existing technologies are difficult and costly to repair.
When the object storage cluster fails, the emergency object gateway receives client requests, determines the placement group where the object storage service is located, and sends requests to the proxy service on the physical machine to directly search for and return data in the physical machine, bypassing the failed object storage service.
It enables data to be read normally even when the object storage cluster fails, avoiding the high-cost professional repair process and improving the reliability and efficiency of data access.
Smart Images

Figure CN123185052A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technology, and in particular to a fault handling method, apparatus, electronic device, computer-readable storage medium, and computer program product for an object storage cluster. Background Technology
[0002] While Ceph clusters are generally stable in daily use, they are prone to failure in certain scenarios. For example, a power outage in the data center can corrupt metadata on a large number of disks (such as PG metadata). This corruption can prevent the Object Storage Service (OSD) from starting. If more than three OSDs in a three-replica cluster fail to start, data loss will occur. In severe cases, if the object storage metadata pool is damaged, the entire cluster will become inaccessible, resulting in significant data loss. Furthermore, in some poorly optimized Ceph clusters, uneven distribution of cluster metadata due to improper use can easily lead to cluster failures, rendering the cluster unable to provide read / write (IO) operations for anywhere from a few hours to several days or even weeks. During this time, the Ceph cluster will be unable to read or write data, severely impacting business operations.
[0003] Invention Data
[0004] This application provides a fault handling method, apparatus, electronic device, computer-readable storage medium, and computer program product for an object storage cluster, which can normally read object data when the object storage cluster fails.
[0005] The technical solution of this application embodiment is implemented as follows:
[0006] This application provides a fault handling method for an object storage cluster, including:
[0007] In the event of a failure of the object storage service in the first object storage cluster, a first request is received from the client, the first request being used to read data of the first object from the first object storage cluster;
[0008] Based on the information carried by the first request, the first object storage service in the first object storage cluster where the first placement group is located is determined. The first placement group is the placement group in the first object storage cluster that corresponds to the first object.
[0009] Determine the physical machine where the first object storage service is located in the first object storage cluster, and send a second request to the proxy service on the physical machine. The second request is used to trigger the proxy service to search for the data of the first object on the physical machine.
[0010] The system receives the data of the first object returned by the proxy service and sends the data of the first object to the client.
[0011] This application provides a fault handling device for an object storage cluster, including:
[0012] The receiving module is configured to receive a first request sent by a client in the event of a failure in the object storage service in the first object storage cluster, wherein the first request is used to read data of a first object from the first object storage cluster.
[0013] The determination module is used to determine, based on the information carried by the first request, the first object storage service in the first object storage cluster where the first placement group is located, wherein the first placement group is the placement group in the first object storage cluster corresponding to the first object;
[0014] The determining module is further configured to determine the physical machine in which the first object storage service is located within the first object storage cluster;
[0015] The sending module is used to send a second request to the proxy service on the physical machine, the second request being used to trigger the proxy service to search for the data of the first object in the physical machine;
[0016] A receiving module is used to receive data of the first object returned by the proxy service;
[0017] The sending module is also used to send the data of the first object to the client.
[0018] This application provides an electronic device, including:
[0019] Memory is used to store executable instructions for a computer;
[0020] The processor, when executing computer-executable instructions stored in the memory, implements the fault handling method for the object storage cluster provided in the embodiments of this application.
[0021] This application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the fault handling method for the object storage cluster provided in this application.
[0022] This application provides a computer program product, including a computer program or computer executable instructions, which, when executed by a processor, implements the fault handling method for the object storage cluster provided in this application.
[0023] The embodiments of this application have the following beneficial effects:
[0024] When an object storage service in an object storage cluster fails, the corresponding object storage service is first determined based on the information carried in the read request sent by the client. Then, a read request is sent to the proxy service corresponding to the determined object storage service so that the proxy service can directly find the object data in the physical machine. Finally, the data returned by the proxy service can be sent to the client. In this way, when the object storage cluster fails, the object storage service protocol of the object storage cluster can be bypassed, and the corresponding proxy service can directly find the object data in the physical machine and return it to the client (that is, the proxy service on the physical machine can replace the failed object storage service to read the data). This ensures that the object data can still be read normally even when the object storage service in the object storage cluster fails. Attached Figure Description
[0025] Figure 1 This is a schematic diagram illustrating how objects are stored in a Ceph cluster according to embodiments of this application;
[0026] Figure 2 This is a schematic diagram of the S3 protocol read / write process when the Ceph cluster is not experiencing a failure, provided in an embodiment of this application.
[0027] Figure 3 This is a schematic diagram of the S3 protocol read / write process when a Ceph cluster fails, provided in an embodiment of this application.
[0028] Figure 4 This is a schematic diagram of the architecture of the object storage cluster fault handling system 100 provided in the embodiments of this application;
[0029] Figure 5 This is a schematic diagram of the structure of the electronic device 500 provided in the embodiments of this application;
[0030] Figure 6 This is a first flowchart illustrating the fault handling method for an object storage cluster provided in an embodiment of this application;
[0031] Figure 7 This is a second flowchart illustrating the fault handling method for an object storage cluster provided in this application embodiment;
[0032] Figure 8 This is a schematic diagram of the architecture of the fault handling system for the object storage cluster provided in the embodiments of this application;
[0033] Figure 9 This is a schematic diagram illustrating the process of saving the filename of the object assembled according to the S3 request in the RADOS layer of the Ceph cluster, as provided in the embodiments of this application.
[0034] Figure 10This is a schematic diagram illustrating the process of converting the filename of an object stored in the RADOS layer into a hash value using a hash algorithm, as provided in an embodiment of this application.
[0035] Figure 11 This is a schematic diagram illustrating the process of determining the PG_ID actually stored in the object according to an embodiment of this application;
[0036] Figure 12 This is a schematic diagram illustrating the process of mapping PG_ID to a combination of corresponding OSDs using the CRUSH algorithm, as provided in an embodiment of this application.
[0037] Figure 13 This is a schematic diagram illustrating the process of assembling the actual path of an object on the disk according to the naming rules of the Ceph cluster, as provided in the embodiments of this application. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0039] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0040] It is understood that in the embodiments of this application, data such as user information are involved. When the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with relevant laws, regulations and standards.
[0041] In the following description, the terms “first, second, ...” are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that “first, second, ...” may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0042] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0043] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.
[0044] 1) Object storage cluster: also known as Ceph cluster. Ceph cluster is an open-source distributed storage system designed to provide object storage, block device and file system services. It achieves high availability, high scalability and high performance by dividing data into fixed-size objects and distributing them across a storage cluster consisting of multiple storage hosts.
[0045] 2) Simple Storage Service (S3): This is an object storage service protocol proposed by Amazon. Ceph clusters provide object storage services that are compatible with the S3 protocol.
[0046] 3) Basic Storage System (RADOS, Reliable Autonomic Distributed Object Store) Protocol: A unified storage protocol provided by Ceph clusters, offering basic file read and write capabilities and supporting common read and write interfaces such as PUT / GET. It is not an S3 protocol.
[0047] 4) Object Storage Gateway (RGW, Rados Gateway): In a Ceph cluster, an RGW needs to be deployed to provide S3 services in order to support the S3 protocol. Clients can communicate with the RGW via the S3 protocol, and the RGW then reads and writes data to the Ceph cluster via the RADOS protocol.
[0048] 5) Object Storage Service (OSD): In a Ceph cluster, the OSD is a crucial component responsible for storing data objects and providing services. Typically, one OSD process manages a single disk. Clients communicate with the OSD via the RADOS protocol, and the OSD reads and writes the data required by the client to the corresponding disk. A Ceph cluster usually consists of dozens or hundreds of OSDs forming a large distributed cluster. Each OSD has its own unique identifier (ID), which can be a positive integer starting from 0.
[0049] 6) Storage Pool: To group multiple OSDs into a unified namespace, Ceph clusters introduce the concept of a storage pool. Data for objects that clients need to save is stored in a specific storage pool. This pool consists of several OSDs, but from the client's perspective, only one large storage pool is visible. In a Ceph cluster, each storage pool has a unique identifier (Pool_ID), starting from 0 and numbered 1, 2, 3, and so on.
[0050] 7) Placement Group (PG): This is a logical concept in a Ceph cluster used to allocate objects to physical storage devices. A placement group acts similarly to an index in a database, helping the Ceph cluster quickly locate and manage objects. In a Ceph cluster, each object is mapped to a specific placement group. The placement group itself does not store data but contains references to OSDs (On-Site Controllers) that actually store the data. For example, a Ceph cluster can divide a storage pool into several PGs, and each PG will be mapped to an OSD. Assuming there are 10 OSDs and a storage pool has 200 PGs, then each OSD will be distributed across approximately 20 PGs.
[0051] 8) Placement Group Identifier (PG_ID): This is the placement group number (ID). The Ceph cluster assigns hexadecimal numbers to all PGs. For example, assuming there are 128 PGs, the PG numbers will start from 0, i.e., 0x0, 0x1, ..., 0xe, 0xf, 0x10, 0x11...0x1f...0x7f. Assuming the storage pool identifier (Pool_ID) is 6, then all PG_IDs within this storage pool are:<Pool_ID> . <pg>That is: 6.0, 6.1, 6, 2…6.e, 6.f, 6.10, 6.11…6.1f, 6.20…6.7e, 6.7f.
[0052] 9) CRUSH Algorithm: This is a pseudo-random algorithm in Ceph clusters used to map PG_IDs to object storage service identifiers (OSD_IDs). It can be represented as CRUSH(PG_ID)->[OSD_ID1, OSD_ID2, OSD_ID3]. These three OSD_IDs typically indicate that the Ceph cluster uses a 3-replica mechanism to store data, thus mapping to three OSDs. Assuming PG_ID is 6.20, the CRUSH algorithm can calculate CRUSH(6.20)->[3,8,21], meaning PG 6.20 will be mapped to OSD.3, OSD.8, and OSD.21. In other words, this mapping relationship can be calculated anywhere with very little information. The CRUSH algorithm guarantees that the calculated result is consistent everywhere.
[0053] 10) Bucket: A bucket is a logical unit used to organize and manage data stored in a Ceph cluster. It's essentially a highly configurable and scalable "folder" with more metadata and access control policies. Each bucket has a globally unique name and is typically used to store a set of related data. In other words, in a Ceph cluster, a bucket acts as a logical container for data, similar to a folder in a file system, used to organize and manage stored data (i.e., objects).
[0054] 11) Object: In object storage, objects, like files, are the basic units for storing data. Every file uploaded by a user (including documents, images, videos, etc.) is saved as an object in a storage bucket for easy management later. Like files, objects contain data, but unlike files, objects do not have a hierarchical structure within a single layer. Each object exists at the same level in a flat address space called a storage pool, and one object does not belong to the next level of another object.
[0055] 12) Bucket ID: The Ceph cluster will convert the bucket name in S3 into a string similar to a universally unique identifier (UUID), such as: 9e01e23c-f9cf-48d6-9209-158f0aaa5986.3554288.277. When actually writing to disk, this string will replace the actual bucket name to save the object.
[0056] 13) Hash Algorithm: Ceph clusters provide a fixed hash algorithm to convert the filename of an object stored in the RADOS layer into an 8-bit hexadecimal hash value. Then, by taking the remainder of the hash value with the total number of PGs, the hexadecimal number of the corresponding PG is obtained. This hexadecimal number is then combined with the pool identifier (Pool_ID) to obtain the placement group identifier PG_ID.<Pool_ID> .<PG_ID> Finally, the mapped OSD combination is calculated using CRUSH(PG_ID). For example... Figure 1 As shown, objects are stored in the Ceph cluster as follows: assuming an object is mapped to PG6.20 on OSD.3, OSD.3 will create a subdirectory named 6.20_head on its own disk and then save the object's data to this subdirectory.
[0057] Ceph is an open-source distributed storage system that provides object storage, block storage, and file system storage. Ceph is designed to offer highly reliable, scalable, and high-performance storage solutions. Figure 2 As shown, when the Ceph cluster is functioning correctly, the client sends an S3 request. For example, the client can calculate its own signature and send it to the object storage gateway (RGW). Upon receiving the request, the object storage gateway reads the relevant metadata from the Ceph cluster using the RADOS protocol, recalculates the signature, and verifies it. If verification fails, it returns a 403 error to the client; if verification succeeds, it continues to read or save the corresponding data from the Ceph cluster. Subsequently, the Ceph cluster, based on the data read / save requests from the object storage gateway, either saves the data to disk or reads the information from disk and returns the read data to the object storage gateway. After a successful request, the object storage gateway returns the information to the client, thus completing a full S3 request.
[0058] The above describes the normal S3 request process. However, in some failure scenarios, such as mass disk failure, numerous OSDs failing to start, or startup stalling for several hours, almost all I / O will be blocked. For example, abnormal failures in a Ceph cluster include: power outages causing partial disk metadata corruption, improper use leading to OSDs failing to start or timeouts. If the disks cannot be repaired after a prolonged period and the OSDs remain unable to start, some or all data may become inaccessible through RADOS. Figure 3 As shown, when a Ceph cluster fails, a client initiates an S3 request. Upon receiving the request, the object storage gateway needs to read some metadata from the Ceph cluster. However, because some OSDs cannot start, read and write requests are completely blocked, I / O times out, and service is unavailable. In other words, when the PG three-replica in the metadata storage pool is damaged, authentication will be blocked, thus blocking all subsequent requests. Data cannot be read from the Ceph cluster, resulting in significant data loss.
[0059] It can be seen that OSDs have a high probability of data corruption after an abnormal power outage. If the PG's metadata is corrupted, the OSD will fail to start. If many OSDs experience this issue, the Ceph cluster will likely be unable to provide read and write services, and the entire cluster's data will be logically considered lost. Furthermore, after initiating certain changes (such as sharding a bucket with many files), some OSDs may become stuck for extended periods or time out, causing their processes to terminate. In this case, the data on these OSDs will be unreadable and unwriteable, preventing the cluster from providing normal I / O and thus blocking most client requests. Additionally, repairing OSDs is extremely difficult, requiring not only highly specialized Ceph source code understanding but also frequent repackaging and recompiling of the Ceph cluster code, resulting in very low efficiency. Some companies offer technical support, charging over ten thousand yuan per instance, which is also very costly. Of course, some operational errors, such as deleting the metadata pool of object storage, can directly cause S3 authentication to fail, resulting in the failure of all S3 requests. This means that even if the cluster data exists, it cannot be read through the RADOS protocol of a normal Ceph cluster.
[0060] In view of this, embodiments of this application provide a fault handling method, apparatus, electronic device, computer-readable storage medium, and computer program product for an object storage cluster, capable of reading object data when an object storage cluster fails. The electronic device provided in the embodiments of this application will be described below; the electronic device provided in the embodiments of this application can be implemented as a terminal device (e.g., an emergency object gateway).
[0061] For example, see Figure 4 , Figure 4 This is a schematic diagram of the architecture of the object storage cluster fault handling system 100 provided in this application embodiment, as shown below. Figure 4 As shown, the fault handling system 100 for an object storage cluster provided in this application embodiment includes: a client 200, an emergency object gateway 300, and a first object storage cluster 400 (e.g., a Ceph fault cluster, i.e., a Ceph cluster that has failed). When the first object storage cluster 400 fails (e.g., some OSDs in the first object storage cluster 400 fail), the emergency object gateway 300 can receive a first request (i.e., a read request) sent by the client 200. The first request is used to read data of a first object (e.g., Object1) from the first object storage cluster 400. After receiving the first request from client 200, emergency object gateway 300 can first determine the placement group identifier (PG_ID) of the placement group corresponding to the first object in the storage pool of the first object storage cluster 400 based on the first bucket identifier (e.g., the ID of bucket 1) and the object identifier of the first object (e.g., the ID of object 1) carried in the first request. Then, based on the placement group identifier, emergency object gateway 300 can determine the object storage service (e.g., OSD.4) in the first object storage cluster 400 where the placement group resides. Subsequently, emergency object gateway 300 can send a second request to the agent service corresponding to the object storage service (e.g., the agent service on physical machine 2). Upon receiving the second request from emergency object gateway 300, the agent service on physical machine 2 can assemble the storage path of the first object on the disk of physical machine 2 based on the information carried in the second request, read the data of the first object according to the storage path, and return the read data to emergency object gateway 300. After receiving the data returned by the proxy service on physical machine 2, the emergency object gateway 300 can send the data to client 200, thus enabling normal reading of object data even if the object storage cluster fails.
[0062] The structure of the electronic device provided in the embodiments of this application will be further described below. Taking the electronic device as a terminal device (e.g., an emergency target gateway) as an example, see... Figure 5 , Figure 5 This is a schematic diagram of the structure of the electronic device 500 provided in the embodiments of this application. Figure 5 The illustrated electronic device 500 includes at least one processor 510, a memory 550, at least one network interface 520, and a user interface 530. The various components in the electronic device 500 are coupled together via a bus system 540. It is understood that the bus system 540 is used to implement communication between these components. In addition to a data bus, the bus system 540 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 5 The general labeled all buses as Bus System 540.
[0063] The processor 510 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0064] User interface 530 includes one or more output devices 531 that enable the presentation of media data, including one or more speakers and / or one or more visual displays. User interface 530 also includes one or more input devices 532, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0065] The memory 550 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 550 may optionally include one or more storage devices physically located away from the processor 510.
[0066] The memory 550 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 550 described in this application embodiment is intended to include any suitable type of memory.
[0067] In some embodiments, memory 550 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.
[0068] Operating system 551 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks;
[0069] The network communication module 552 is used to reach other computing devices via one or more (wired or wireless) network interfaces 520, exemplary network interfaces 520 including: Bluetooth, WiFi, and Universal Serial Bus (USB), etc.
[0070] Presentation module 553 is configured to enable the presentation of information (e.g., a user interface for operating peripheral devices and displaying data and information) via one or more output devices 531 (e.g., a display screen, a speaker, etc.) associated with user interface 530;
[0071] The input processing module 554 is used to detect and translate one or more user inputs or interactions from one or more input devices 532.
[0072] In some embodiments, the apparatus provided in this application can be implemented in software. Figure 5 A fault handling device 555 for an object storage cluster stored in memory 550 is shown. This device can be software in the form of programs and plug-ins, and includes the following software modules: a receiving module 5551, a determining module 5552, a sending module 5553, an extracting module 5554, a generating module 5555, a comparing module 5556, a transfer module 5557, and a filtering module 5558. These modules are logically connected and can therefore be arbitrarily combined or further split according to the functions implemented. It should be noted that... Figure 5 For ease of explanation, all the above modules are shown at once, but this should not be considered as an exclusion of the implementation of the fault handling device 555 in the object storage cluster, which may only include the receiving module 5551, the determining module 5552, and the sending module 5553. The functions of each module will be described below.
[0073] The following will describe in detail the fault handling method for the object storage cluster provided in this application embodiment, in conjunction with the exemplary application and implementation of the terminal device (e.g., emergency object gateway) provided in the embodiments of this application.
[0074] For example, see Figure 6 , Figure 6 This is a first flowchart illustrating the fault handling method for an object storage cluster provided in this application embodiment, which will be combined with... Figure 6 The steps shown are explained.
[0075] It should be noted that, Figure 3 The steps of the method shown can be performed by an emergency object gateway.
[0076] In step 101, in the event of a failure of the object storage service in the first object storage cluster, a first request sent by the client is received.
[0077] Here, the first request (i.e., the read request) is used to read data of the first object from the first object storage cluster.
[0078] In some embodiments, taking Ceph cluster 1 as an example, when Ceph cluster 1 is found to be in a critical failure and unable to provide service (e.g., some or all OSDs in Ceph cluster 1 fail, resulting in the inability to provide data reading services), the emergency object gateway and the agent services of all nodes (i.e., physical machines) can be started. The backend of the front-end Nginx (a web server that can be used for load balancing and reverse proxying) is changed from the object storage gateway (RGW) of Ceph cluster 1 to the emergency object gateway. The emergency object gateway then officially takes over the traffic, that is, it receives the first request (e.g., an S3 read request) sent by the client. In other words, when Ceph cluster 1 fails, the S3 read request sent by the client will reach the emergency object gateway. The S3 read request can carry information such as the bucket identifier of the bucket being accessed (e.g., the first bucket identifier), the object identifier of the object being accessed (e.g., the first object), the access key, and the S3 signature.
[0079] In other words, when a failure is detected in the object storage service in the first object storage cluster, a corresponding proxy service can be deployed on multiple physical machines included in the first object storage cluster. In this way, the proxy service can replace the failed object storage service for reading data.
[0080] In step 102, based on the information carried in the first request, the first object storage service in the first object storage cluster where the first placement group is located is determined.
[0081] Here, the first placement group is the placement group corresponding to the first object in the first object storage cluster.
[0082] In some embodiments, see Figure 7 , Figure 7 This is a schematic diagram of the second process of the fault handling method for object storage clusters provided in the embodiments of this application, as shown below. Figure 7 As shown, Figure 6 Step 102 shown can be achieved through Figure 7 Steps 1021 to 1022 shown are implemented by combining Figure 7 The steps shown are explained.
[0083] In step 1021, based on the first bucket identifier and the object identifier of the first object carried in the first request, the placement group identifier of the first placement group corresponding to the first object in the storage pool of the first object storage cluster is determined.
[0084] In some embodiments, step 1021 can be implemented as follows: based on the first bucket identifier and the object identifier of the first object carried in the first request, determine the file name of the first object stored in the basic storage system layer of the first object storage cluster; perform hash processing on the file name to obtain a first hash value; based on the first hash value, determine the placement group identifier of the first placement group corresponding to the first object in the storage pool of the first object storage cluster.
[0085] For example, the above-mentioned method of determining the filename of the first object stored in the basic storage system layer of the first object storage cluster based on the first bucket identifier and the object identifier of the first object carried in the first request can be achieved in the following way: extract the metadata of the first object storage cluster from the metadata database, wherein the metadata includes the mapping relationship between the bucket identifiers of different buckets in the first object storage cluster and different strings; determine the first string corresponding to the first bucket identifier based on the first bucket identifier and the mapping relationship carried in the first request; combine the first string and the object identifier of the first object, and use the combination result as the filename of the first object stored in the basic storage system layer of the first object storage cluster.
[0086] In other embodiments, following the examples above, before determining the first string corresponding to the first bucket identifier based on the first bucket identifier and mapping relationship carried in the first request, the following processing may also be performed: extracting the secret key (i.e., secret_key) corresponding to the access key (i.e., access_key) in the first request from the metadata database; generating a first signature based on the secret key, and comparing the first signature with the second signature carried in the first request; when the first signature matches the second signature, proceeding to the processing of determining the first string corresponding to the first bucket identifier based on the first bucket identifier and mapping relationship carried in the first request.
[0087] For example, taking Ceph cluster 1 as the first object storage cluster, after receiving an S3 read request from a client, the emergency object gateway can first read the secret key (i.e., access_key) corresponding to the access key carried in the S3 read request, and the UUID information corresponding to the bucket name carried in the S3 read request, from the metadata database (DB). After obtaining the secret_key, the emergency object gateway can verify the signature of the S3 read request link sent by the client using the S3 signature algorithm. That is, it can compare whether the signature sent by the client is consistent with the signature generated based on the secret_key. If they are inconsistent, the emergency object gateway can return a 403 error message to the client; if they are consistent, it means that the authentication is successful, and the emergency object gateway can start assembling the filename of the first object (i.e., the object accessed in this instance) stored in the RADOS layer of Ceph cluster 1. For example, assuming the first bucket identifier (e.g., bucket name) carried in the S3 read request is Bucket_1 and the first object identifier is Object_1, this information can be obtained from the request address of the first request sent by the client in step 101 (https: / / s3-domain / Bucket_1 / Object_1). Also, assuming the UUID corresponding to Bucket_1 is 9e01e23c-f9cf-48d6-9209-158f0aaa5986.3554288.277, then the filename of the first object stored in the RADOS layer of Ceph cluster 1 is the UUID corresponding to the bucket name + the object name, i.e., 9e01e23c-f9cf-48d6-9209-158f0aaa5986.3554288.277_Object_1.
[0088] In other embodiments, following the above example, taking the file name 9e01e23c-f9cf-48d6-9209-158f0aaa5986.3554288.277_Object_1 as an example, after the emergency object gateway assembles the file name of the first object stored in the RADOS layer of Ceph cluster 1, it can perform hash processing on the file name. For example, a fixed SHA-1 hash algorithm can be used to convert the file name into an 8-bit hexadecimal hash value, for example, assuming it is 38D9DDA2.
[0089] In some embodiments, the above-mentioned determination of the placement group identifier of the first placement group corresponding to the first object in the storage pool of the first object storage cluster based on the first hash value can be achieved in the following manner: determining the storage pool in the first object storage cluster used to store the data of the first object; taking the remainder by dividing the first hash value by the number of placement groups included in the storage pool; combining the storage pool identifier of the storage pool and the remainder, and using the combination result as the placement group identifier of the placement group (i.e., the first placement group) corresponding to the first object in the storage pool of the first object storage cluster.
[0090] For example, continuing from the previous example, taking Ceph cluster 1 as the first object storage cluster, after the emergency object gateway uses a hash algorithm to convert the filename into the corresponding first hash value (e.g., 38D9DDA2), it can first filter from the multiple storage pools (i.e., Pools) included in Ceph cluster 1 to select the storage pool for storing the data of the first object (e.g., storage pool 6, corresponding Pool_ID = 6). Then, it can take the remainder between the first hash value and the number of all placement groups (i.e., PGs) included in storage pool 6 (e.g., 256, meaning there are 256 PGs in storage pool 6), where the remainder is in hexadecimal, for example, a2. Finally, based on the ID of storage pool 6 and the remainder, it can obtain the PG_ID of the PG used to store the data of the first object, i.e., PG_ID = 6.a2. In other words, the ID of the PG actually stored for the first object is the combination of the ID of storage pool 6 and the remainder.
[0091] In step 1022, the first object storage service in the first object storage cluster where the first placement group is located is determined based on the placement group identifier.
[0092] In some embodiments, step 1022 can be implemented as follows: For each object storage service in the first object storage cluster, hash the identifier (i.e., OSD_ID), placement group identifier (i.e., PG_ID), and a constant (let's say r) of the object storage service to obtain a second hash value, and multiply the second hash value by the first weight of the object storage service (wherein the value of the first weight can be positively correlated with the capacity of the object storage service, i.e., the larger the capacity of the object storage service, the larger the corresponding weight value) to obtain the second weight (i.e., signature length) of the object storage service; determine the object storage service corresponding to the largest second weight as the object storage service in which the placement group is located in the first object storage cluster.
[0093] For example, continuing with Ceph cluster 1 as the first object storage cluster, after the emergency object gateway obtains the ID of the PG (assuming it's 6.a2) where the first object is actually stored, it can map this PG_ID to the corresponding OSD using the CRUSH algorithm. The CRUSH algorithm is a hash-based data distribution algorithm used to map data across all storage devices in a Ceph cluster. It determines how to store and retrieve data by calculating the data storage location, thereby achieving decentralization and high concurrency. For example, for each OSD in Ceph cluster 1, its initial weight can be defined based on its capacity. For instance, the initial weight of a 4T OSD can be set to 4, and the initial weight of an 800G OSD can be set to 0.8. Then, the Straw lottery algorithm in the CRUSH algorithm can be used to map PGs to OSDs with different weights. For example, PG_ID, OSD_ID, and a constant r can be used as input to obtain a hash value. Then, the calculated hash value can be placed together with the initial weight of the OSD to obtain the final weight (i.e., the signature length) of each OSD. Finally, the multiple OSDs included in Ceph cluster 1 can be traversed, and the OSD corresponding to the largest final weight can be used as the OSD mapped to PG_ID (for example, OSD.5).
[0094] It's important to note that the random numbers calculated by CRUSH are obtained through hashing, ensuring that the same input will produce the same output. Therefore, CRUSH is not a true random algorithm, but rather a pseudo-random algorithm. Furthermore, if multiple replicas exist in the Ceph cluster, the previous constant r can be incremented by 1, and the calculation repeated. If the result is different from the previous OSD number, that OSD is selected; if it's the same, r is incremented by 2, and the calculation continues until three different OSDs are selected.
[0095] In step 103, the physical machine where the first object storage service is located in the first object storage cluster is determined, and a second request is sent to the proxy service on the physical machine.
[0096] Here, the second request is used to trigger the proxy service to look up the data of the first object in the physical machine (specifically, on the physical machine's disk).
[0097] In some embodiments, after receiving a second request from the emergency object gateway, the proxy service can assemble the storage path of the first object on the disk of the physical machine based on the information carried in the second request, and read the first object according to the storage path.
[0098] For example, taking the object storage service OSD.5 as an example, the emergency object gateway can find the agent service on the physical machine where OSD.5 is located and send five parameters to the agent service: the object storage service identifier (OSD_ID), the placement group identifier (PG_ID), the first string corresponding to the first bucket identifier (Bucket_UUID), the object identifier (Object_name), and the first hash value. After receiving these five parameters, the agent service can assemble the actual path where the first object is stored on the physical machine's disk according to the naming rules of the Ceph cluster. Then, the agent service can read the first object at that path using a read function and return the data of the first object to the emergency object gateway. The emergency object gateway then returns the data to the client, thus completing a data read without going through the RADOS layer of the Ceph cluster.
[0099] In step 104, the data of the first object returned by the proxy service is received, and the data of the first object is sent to the client.
[0100] In some embodiments, after receiving the data of the first object returned by the proxy service, the emergency object gateway can return the received data of the first object to the client, thereby enabling normal reading of object data in the event of a Ceph cluster failure.
[0101] In other embodiments, in the event of a failure in the first object storage cluster, the emergency object gateway may also perform the following processing when it receives a third request (e.g., a write request) from a client: select a second object storage cluster (e.g., a Ceph backup cluster) from a plurality of pre-created object storage clusters, wherein the second object storage cluster is an object storage cluster that has not failed; and forward the third request to the second object storage cluster.
[0102] For example, taking Ceph cluster 2 as the second object storage cluster, when the application object gateway receives a write request from a client, it can select a Ceph cluster that has not experienced a failure (such as Ceph cluster 2) from the multiple pre-created Ceph clusters. Then, it can forward the write request sent by the client to Ceph cluster 2. In other words, Ceph cluster 2 can be used as a backup for data writing during the failure of Ceph cluster 1.
[0103] In other words, the fault handling method for object storage clusters provided in this application embodiment can solve the following problems existing in related technologies:
[0104] 1) In extreme data center conditions, such as frequent power outages, OSD metadata can become heavily corrupted, preventing OSDs from starting and the Ceph cluster from providing S3 services. In this situation, the emergency object gateway can still receive S3 read requests from clients, bypassing the Ceph cluster's RADOS protocol to directly locate and read the relevant data from the disk and return it to the client.
[0105] 2) When Ceph cluster read / write (IO) is stuck due to certain changes, OSDs frequently start and stop oscillate, and PG status is down, stale, peering, or other states that cannot provide normal IO, the emergency object gateway can still read data from the Ceph cluster and is not affected by the Ceph cluster status.
[0106] 3) Even if all OSDs fail to start, normal S3 services can still be provided, such as data reading and data storage.
[0107] 4) Even if all object storage metadata storage pools are deleted, the Ceph cluster will not be able to provide S3 services in this scenario. However, the data of objects in the Ceph cluster can still be read from the disk using the technical solution provided in the embodiments of this application.
[0108] 5) If all storage pools in a Ceph cluster are deleted due to accidental operation, the Ceph cluster will be unable to read any data. However, if the OSD is stopped in time to stop the data deletion, the emergency object gateway can still read the undeleted data, thereby reducing data loss.
[0109] The following will describe an exemplary application of the embodiments of this application in a real-world application scenario.
[0110] In some embodiments, see Figure 8 , Figure 8 This is a schematic diagram of the architecture of the fault handling system for the object storage cluster provided in the embodiments of this application, such as... Figure 8 As shown, the object storage cluster fault handling system provided in this application embodiment includes: a client, an emergency object gateway, a metadata DB, a Ceph fault cluster (i.e., the Ceph cluster that has failed), and a Ceph backup cluster, etc. Among them, the metadata DB can periodically synchronize a small amount of metadata of S3 users from the Ceph cluster that is running normally (i.e., before the Ceph fault cluster fails), such as: 1) S3 account information access_key, secret_key; 2) the mapping relationship between the storage bucket names and their corresponding UUIDs of different storage buckets in the Ceph cluster. Since this part of the data rarely changes and is not modified after creation, the metadata DB itself has a small data volume and light load. The emergency object gateway is responsible for continuing to provide S3 services after the Ceph cluster becomes unusable. It retrieves the corresponding metadata from the metadata database based on S3 read requests from clients, and performs S3 signature authentication. Once authenticated, it sends the read request to the corresponding agent in the failed Ceph cluster. The agent locates the corresponding file on the disk, reads it, and returns it to the emergency object gateway, which then returns the data to the client. The agent in the failed Ceph cluster receives read file requests from the emergency object gateway, reads the data directly from the disk, and returns it. Furthermore, since the old Ceph cluster has failed and cannot provide write services, the emergency object gateway can forward write requests received from clients to the Ceph backup cluster to continue handling data writing.
[0111] The following will continue to combine Figure 8 This section describes how this system provides normal read and write services when a Ceph cluster fails.
[0112] In some embodiments, when a Ceph cluster is found to be experiencing a severe failure and unable to provide service, the Emergency Object Gateway and the Agent services of all nodes can be started. Simultaneously, the backend of the front-end Nginx can be changed from the Ceph cluster's Object Storage Gateway (RGW) to the Emergency Object Gateway, which then formally takes over the traffic. The Emergency Object Gateway receives S3 read requests from clients, which may include information such as the bucket name, object name, access_key, and S3 signature for the accessed data. After receiving the S3 read request from the client, the Emergency Object Gateway first reads the secret_key corresponding to the access_key and the UUID information corresponding to the bucket name from the metadata database. After obtaining the secret_key, the Emergency Object Gateway verifies the client's request link using the S3 signature algorithm, comparing the signature sent by the client. If the signatures do not match, a 403 error message is returned; if the signatures match, authentication is successful, and data can be read. Specifically, after successful authentication, the Emergency Object Gateway can begin assembling the filename of the accessed object stored in the Ceph cluster's RADOS layer, such as... Figure 9 As shown, for example, assuming the storage bucket name is Bucket_1 and the object name is Object_1, this information can be obtained from the request address of the S3 read request sent by the client (https: / / s3-domain / Bucket_1 / Object_1). Also, assuming the UUID corresponding to Bucket_1 is 9e01e23c-f9cf-48d6-9209-158f0aaa5986.3554288.277, the filename stored in the RADOS layer for the accessed object is a combination of the UUID and the object name, i.e., 9e01e23c-f9cf-48d6-9209-158f0aaa5986.3554288.277_Object_1.
[0113] In other embodiments, continuing from the above, such as Figure 10 As shown, after obtaining the filename of the accessed object stored in the RADOS layer, the emergency object gateway can hash the filename. For example, a fixed SHA-1 hash algorithm can be used to convert the filename into an 8-bit hexadecimal hash value (e.g., 38D9DDA2). This process has fixed code implementation in the Ceph cluster and can be reused. Then, as... Figure 11 As shown, the emergency object gateway can take the remainder by dividing the hash value by the number of PGs (PGs) in the storage pool used to store the object's data in the Ceph cluster (e.g., 256). The remainder is in hexadecimal (e.g., a2). Then, combined with the storage pool identifier (Pool_ID, e.g., Pool_ID = 6), the actual PG_ID where the object is stored can be obtained (e.g., 6.a2). Subsequently, as... Figure 12 As shown, the emergency object gateway can use the CRUSH algorithm (a pseudo-random algorithm in Ceph clusters) to calculate several OSD combinations mapped to the PG_ID (e.g., OSD.5, OSD.1, OSD.8). This algorithm is a fixed hash algorithm, and this process has fixed code implementation in Ceph clusters and can be reused.
[0114] In some embodiments, following the preceding text, such as Figure 13 As shown, after obtaining several OSD combinations mapped to PG_ID, the emergency object gateway can first find the corresponding Agent on the physical machine where OSD.5 resides, and send five parameters—OSD_ID, PG_ID, Bucket_UUID, Object_name, and HASH value—to the Agent. Upon receiving these parameters, the Agent can assemble the actual path and filename of the object file on disk according to the Ceph cluster's naming rules. The last 22 in the path is rarely used; it represents the snap_id. Object storage generally doesn't take snapshots, so this value is usually a fixed value for all objects in the storage pool, making it easy to find. In addition, the actual file storage path can be assembled from the parameters sent by the emergency object gateway. Subsequently, the Agent can read the file at this path using Linux file read functions and return the content to the emergency object gateway. The emergency object gateway then returns the data to the client, thus completing a data read process that does not go through the Ceph cluster's RADOS layer.
[0115] It should be noted that if data reading on OSD.5 fails, the emergency object gateway can also try to read data from the Agent on OSD.1 and OSD.8 in turn. The reading process is the same as that of OSD.5, and will not be described again in this embodiment.
[0116] Furthermore, if the client sends a write request, the emergency object gateway can forward the request to a normal Ceph cluster (e.g., Figure 8 In the Ceph backup cluster shown, this cluster is used for data write backup during failures.
[0117] In summary, the technical solutions provided by the embodiments of this application have the following beneficial effects:
[0118] 1) No matter how much metadata of a PG is damaged, it will not affect the reading of the data.
[0119] 2) Even if all OSDs fail to start and the Ceph cluster becomes unusable, it can still provide normal S3 data reading without requiring any business modifications.
[0120] 3) If a Ceph cluster becomes stuck due to certain changes and is unable to provide IO, the normal read and write of business data can be guaranteed by enabling the emergency object gateway.
[0121] 4) Unless the hard drives where the three replicas are located are all damaged and cannot read any information, the technical solution provided in this application embodiment can ensure that all data in the Ceph cluster can be read normally and will not cause data loss.
[0122] The following description continues to illustrate the exemplary structure of the object storage cluster fault handling device 555 provided in the embodiments of this application as a software module. In some embodiments, such as Figure 5 As shown, the software modules in the fault handling device 555 of the object storage cluster stored in the memory 550 may include: a receiving module 5551, a determining module 5552, and a sending module 5553.
[0123] The receiving module 5551 is configured to receive a first request sent by a client in the event of a failure in the object storage service in the first object storage cluster, the first request being used to read data of a first object from the first object storage cluster; the determining module 5552 is configured to determine, based on the information carried in the first request, the first placement group being the first object storage service in the first object storage cluster corresponding to the first object; and to determine the physical machine in the first object storage cluster where the first object storage service is located; the sending module 5553 is configured to send a second request to a proxy service on the physical machine, the second request being used to trigger the proxy service to search for the data of the first object on the physical machine; the receiving module 5551 is further configured to receive the data of the first object returned by the proxy service; and the sending module 5553 is further configured to send the data of the first object to the client.
[0124] In some embodiments, the first object storage cluster includes multiple physical machines, and a corresponding proxy service is deployed on each physical machine. The proxy service is used to read object data on behalf of the object storage service when the object storage service on the physical machine fails.
[0125] In some embodiments, the sending module 5553 is further configured to send a second request to the proxy service on the physical machine, wherein the second request is configured to trigger the proxy service to obtain the storage path of the first object in the physical machine and read the data of the first object according to the storage path, wherein the storage path is assembled by the proxy service according to the information carried by the second request.
[0126] In some embodiments, the determining module 5552 is further configured to determine, based on the first bucket identifier carried in the first request and the object identifier of the first object, the placement group identifier of the first placement group corresponding to the first object in the storage pool of the first object storage cluster; and based on the placement group identifier, determine the first object storage service in the first object storage cluster where the first placement group is located.
[0127] In some embodiments, the determining module 5552 is further configured to determine the filename of the first object stored in the basic storage system layer of the first object storage cluster based on the first bucket identifier carried in the first request and the object identifier of the first object; perform hash processing on the filename to obtain a first hash value; and determine the placement group identifier of the first placement group corresponding to the first object in the storage pool of the first object storage cluster based on the first hash value.
[0128] In some embodiments, the fault handling device 555 for the object storage cluster further includes an extraction module 5554, configured to extract metadata of the first object storage cluster from a metadata database, the metadata including a mapping relationship between bucket identifiers of different buckets in the first object storage cluster and different strings; and a determination module 5552, configured to determine a first string corresponding to the first bucket identifier based on the first bucket identifier carried in the first request and the mapping relationship; combine the first string and the object identifier of the first object, and use the combination result as the file name.
[0129] In some embodiments, the extraction module 5554 is further configured to extract a secret key corresponding to the access key in the first request from the metadata database; the fault handling device 555 of the object storage cluster further includes a generation module 5555, a comparison module 5556, and a transfer module 5557, wherein the generation module 5555 is configured to generate a first signature based on the secret key; the comparison module 5556 is configured to compare the first signature with the second signature carried in the first request; and the transfer module 5557 is configured to, when the first signature matches the second signature, transfer to the process of determining the first string corresponding to the first bucket identifier based on the first bucket identifier carried in the first request and the mapping relationship.
[0130] In some embodiments, the determining module 5552 is further configured to determine a storage pool in the first object storage cluster for storing data of the first object; to obtain a remainder by taking the remainder between the first hash value and the number of placement groups included in the storage pool; to combine the storage pool identifier of the storage pool and the remainder, and to use the combination result as the placement group identifier.
[0131] In some embodiments, the determining module 5552 is further configured to perform hash processing on the identifier of the object storage service, the placement group identifier, and a constant for each object storage service in the first object storage cluster to obtain a second hash value, and multiply the second hash value and the first weight of the object storage service to obtain a second weight of the object storage service; and determine the object storage service corresponding to the largest second weight as the object storage service in which the placement group is located in the first object storage cluster.
[0132] In some embodiments, the receiving module 5551 is further configured to receive a third request sent by the client, the third request carrying data of a second object to be written; the fault handling device 555 of the object storage cluster further includes a filtering module 5558, configured to filter out a second object storage cluster from a plurality of pre-created object storage clusters, the second object storage cluster being an object storage cluster that has not experienced a fault; the sending module 5553 is further configured to forward the third request to the second object storage cluster.
[0133] It should be noted that the description of the apparatus in this application embodiment is similar to the description of the method embodiment above, and has similar beneficial effects as the method embodiment, therefore it will not be repeated. For any technical details not covered in the object storage cluster fault handling apparatus provided in this application embodiment, please refer to... Figure 6 ,or Figure 7 The meaning is understood in accordance with the description of any of the accompanying drawings.
[0134] This application provides a computer program product comprising a computer program or computer-executable instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, causing the computer device to perform the fault handling method for the object storage cluster described in this application embodiment.
[0135] This application provides a computer-readable storage medium storing computer-executable instructions. When these computer-executable instructions are executed by a processor, they cause the processor to execute the fault handling method for the object storage cluster provided in this application. For example, ... Figure 6 ,or Figure 7 The fault handling method for the object storage cluster is shown.
[0136] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.
[0137] In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0138] As an example, executable instructions can be deployed to execute on a single electronic device, or on multiple electronic devices located in one location, or on multiple electronic devices distributed across multiple locations and interconnected via a communication network.
[0139] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.< / pg>
Claims
1. A fault handling method for an object storage cluster, characterized in that, The method includes: In the event of a failure of the object storage service in the first object storage cluster, a first request is received from the client, the first request being used to read data of the first object from the first object storage cluster; Based on the information carried by the first request, the first object storage service in the first object storage cluster where the first placement group is located is determined. The first placement group is the placement group in the first object storage cluster that corresponds to the first object. Determine the physical machine where the first object storage service is located in the first object storage cluster, and send a second request to the proxy service on the physical machine. The second request is used to trigger the proxy service to search for the data of the first object on the physical machine. The system receives the data of the first object returned by the proxy service and sends the data of the first object to the client.
2. The method according to claim 1, characterized in that, The first object storage cluster includes multiple physical machines, and a corresponding proxy service is deployed on each physical machine. The proxy service is used to read object data on behalf of the object storage service when the object storage service on the physical machine fails.
3. The method according to claim 1, characterized in that, Sending the second request to the proxy service on the physical machine includes: A second request is sent to the proxy service on the physical machine, wherein the second request is used to trigger the proxy service to obtain the storage path of the first object on the physical machine and read the data of the first object according to the storage path, wherein the storage path is assembled by the proxy service according to the information carried in the second request.
4. The method according to claim 1, characterized in that, The step of determining the first object storage service in the first object storage cluster where the first placement group is located based on the information carried in the first request includes: Based on the first bucket identifier and the object identifier of the first object carried in the first request, the placement group identifier of the first placement group corresponding to the first object in the storage pool of the first object storage cluster is determined. Based on the placement group identifier, the first object storage service in the first object storage cluster where the first placement group is located is determined.
5. The method according to claim 4, characterized in that, The step of determining the placement group identifier of the first placement group corresponding to the first object in the storage pool of the first object storage cluster based on the first bucket identifier carried in the first request and the object identifier of the first object includes: Based on the first bucket identifier and the object identifier of the first object carried in the first request, the file name of the first object is determined in the basic storage system layer of the first object storage cluster; The filename is hashed to obtain a first hash value; Based on the first hash value, the placement group identifier of the first placement group corresponding to the first object in the storage pool of the first object storage cluster is determined.
6. The method according to claim 5, characterized in that, The step of determining the filename of the first object stored in the basic storage system layer of the first object storage cluster based on the first bucket identifier carried in the first request and the object identifier of the first object includes: Extract metadata of the first object storage cluster from the metadata database. The metadata includes the mapping relationship between bucket identifiers and different strings for different buckets in the first object storage cluster. Based on the first bucket identifier carried in the first request and the mapping relationship, determine the first string corresponding to the first bucket identifier; The first string and the object identifier of the first object are combined, and the combined result is used as the file name.
7. The method according to claim 6, characterized in that, Before determining the first string corresponding to the first bucket identifier based on the first bucket identifier carried in the first request and the mapping relationship, the method further includes: Extract the secret key corresponding to the access key in the first request from the metadata database; A first signature is generated based on the secret key, and the first signature is compared with the second signature carried in the first request; When the first signature matches the second signature, the process proceeds to determine the first string corresponding to the first bucket identifier based on the first bucket identifier carried in the first request and the mapping relationship.
8. The method according to claim 5, characterized in that, The step of determining the placement group identifier of the first placement group corresponding to the first object in the storage pool of the first object storage cluster based on the first hash value includes: Determine the storage pool in the first object storage cluster used to store the data of the first object; The remainder is obtained by taking the remainder between the first hash value and the number of placement groups included in the storage pool; The storage pool identifier and the remainder are combined, and the combination result is used as the placement group identifier of the first placement group.
9. The method according to claim 4, characterized in that, The step of determining the first object storage service in the first object storage cluster where the first placement group is located based on the placement group identifier includes: For each object storage service in the first object storage cluster, the identifier of the object storage service, the placement group identifier, and a constant are hashed to obtain a second hash value. The second hash value is then multiplied by the first weight of the object storage service to obtain the second weight of the object storage service. The object storage service corresponding to the largest second weight is determined as the first object storage service in the first object storage cluster where the first placement group is located.
10. The method according to any one of claims 1 to 9, characterized in that, The method further includes: Receive a third request sent by the client, the third request carrying data of the second object to be written; A second object storage cluster is selected from multiple pre-created object storage clusters. The second object storage cluster is an object storage cluster that has not experienced any failures. The third request is forwarded to the second object storage cluster.
11. A fault handling device for an object storage cluster, characterized in that, The device includes: The receiving module is configured to receive a first request sent by a client in the event of a failure in the object storage service in the first object storage cluster, wherein the first request is used to read data of a first object from the first object storage cluster. The determination module is used to determine, based on the information carried by the first request, the first object storage service in the first object storage cluster where the first placement group is located, wherein the first placement group is the placement group in the first object storage cluster corresponding to the first object; The determining module is further configured to determine the physical machine in which the first object storage service is located within the first object storage cluster; The sending module is used to send a second request to the proxy service on the physical machine, the second request being used to trigger the proxy service to search for the data of the first object in the physical machine; A receiving module is used to receive data of the first object returned by the proxy service; The sending module is also used to send the data of the first object to the client.
12. An electronic device, characterized in that, include: Memory is used to store executable instructions for a computer; A processor, when executing computer-executable instructions stored in the memory, implements the fault handling method for the object storage cluster according to any one of claims 1 to 10.
13. A computer-readable storage medium storing computer-executable instructions, characterized in that, When the computer-executable instructions are executed by the processor, they implement the fault handling method for the object storage cluster according to any one of claims 1 to 10.
14. A computer program product comprising a computer program or computer-executable instructions, characterized in that, When the computer program or computer-executable instructions are executed by the processor, the fault handling method for the object storage cluster according to any one of claims 1 to 10 is implemented.
