Storage object data access method, device, equipment and medium
By receiving object access requests, determining the target storage cluster and performing gRPC encapsulation or forwarding processing, the high coupling problem between the storage client and the cluster is solved, and efficient, convenient and flexible access to storage object data is achieved, improving performance and scalability.
Patent Information
- Application Number
- CN202210426052.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-22
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2042-04-22
AI Technical Summary
The high degree of coupling between the storage client and the storage cluster results in high storage client overhead, unstable performance, and difficulty in fully utilizing the performance of the object storage cluster.
By receiving object access requests, determining the target storage cluster, and using gRPC encapsulation or forwarding processing, a network access request is generated to access the storage object data in the target storage cluster, reducing the coupling between the storage client and the server.
It effectively reduces the storage client overhead, improves the versatility and convenience of accessing storage object data, and achieves single-cluster load balancing and multi-cluster high availability and dynamic expansion capabilities.
Smart Images

Figure CN114995746B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of storage technology, and in particular to a method, device, equipment and medium for accessing storage object data. Background Art
[0002] Object storage, also known as object-based storage, contains data, just like files. However, unlike files, objects are not hierarchical. Each object is located at the same level in a flat address space called a storage pool; one object cannot be located below another.
[0003] Object storage clusters are formed by grouping object storage software into clusters that provide read and write access. Object storage clusters are typically distributed clusters that provide storage services by adding new clusters on demand. Currently, the size of a single cluster is limited due to factors such as overall performance, stability, maintainability, and fault isolation. However, the growth of business has led to the continuous addition of new clusters.
[0004] To reduce the complexity of storage client access to storage resources, a unified access interface is provided for accessing object storage clusters. However, this access method prevents storage clients from fully utilizing the performance of the object storage cluster and even causes problems such as instability in storage client usage. Summary of the Invention
[0005] In view of the above-mentioned defects or deficiencies in the prior art, it is desirable to provide a storage object data access method, apparatus, device and medium to solve the problem caused by the high coupling between the storage client and the storage cluster.
[0006] In a first aspect, an embodiment of the present invention provides a method for accessing storage object data, the method comprising:
[0007] receiving an object access request, where the object access request includes an original object storage interface;
[0008] Determine the target storage cluster to be accessed based on the object storage interface;
[0009] Processing the object access request according to the target storage cluster to obtain a network access request;
[0010] Access the storage object data corresponding to the object storage interface in the target storage cluster through a network access request.
[0011] In a second aspect, an embodiment of the present invention further provides a storage object data access device, the device comprising:
[0012] A request receiving module, configured to receive an object access request, wherein the object access request includes an original object storage interface;
[0013] A target determination module, configured to determine a target storage cluster to be accessed according to an object storage interface;
[0014] A request processing module is used to process the object access request according to the target storage cluster to obtain a network access request;
[0015] The object access module is used to access the storage object data corresponding to the object storage interface in the target storage cluster through a network access request.
[0016] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the embodiment of the present invention when executing the program.
[0017] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which implements the method described in the embodiment of the present invention when the computer program is executed by a processor.
[0018] The beneficial effects brought about by the technical solution provided by the present invention are:
[0019] The present invention provides a method, apparatus, device, and medium for accessing storage object data. The method receives an object access request, which includes an original object storage interface; then determines a target storage cluster to be accessed based on the object storage interface; then processes the object access request based on the target storage cluster to obtain a network access request; and finally, accesses the storage object data corresponding to the object storage interface in the target storage cluster through the network access request. The storage object data access method provided in an embodiment of the present invention effectively resolves the high coupling problem between a storage client and a storage service end by processing the object access request, and reduces storage client overhead. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 A schematic diagram showing a flow chart of a method for accessing storage object data provided by an embodiment of the present invention is shown;
[0022] Figure 2A schematic diagram showing a flow chart of a method for accessing storage object data provided by an embodiment of the present invention is shown;
[0023] Figure 3 A schematic diagram of a scenario of accessing a single storage cluster provided by an embodiment of the present invention is shown;
[0024] Figure 4 A schematic diagram showing a flow chart of a storage object data access method provided by another embodiment of the present invention;
[0025] Figure 5 A schematic diagram of a scenario of accessing multiple storage clusters provided by an embodiment of the present invention is shown;
[0026] Figure 6 A schematic diagram of another scenario of accessing multiple storage clusters provided by an embodiment of the present invention is shown;
[0027] Figure 7 A schematic structural diagram of a storage object data access device provided by an embodiment of the present invention is shown;
[0028] Figure 8 A schematic structural diagram of an electronic device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0029] To make the objectives, technical solutions, and advantages of the present invention more apparent, embodiments of the present invention will be described in further detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are intended only to illustrate the relevant invention and are not intended to limit the invention. It should also be noted that, for ease of description, only portions relevant to the invention are shown in the accompanying drawings.
[0030] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments of the present invention can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0031] When accessing object data stored in a distributed object storage cluster, the storage client typically uses the original interface provided by the object storage cluster or other protocol interfaces it provides. A storage client can access an object storage cluster by directly connecting the storage client to all storage devices in the object storage cluster in advance. When there are multiple object storage clusters, the storage client needs to establish tens or even millions of direct connections. These direct connections lead to a high degree of coupling between the storage client and the storage service side, resulting in heavy overhead for the storage client and even serious performance issues. For example, if the backend storage cluster has problems such as adding a new cluster or replacing some storage devices in the cluster, a large amount of human and physical resources will be required to resolve compatibility issues between the storage client and the storage service side.
[0032] The present invention proposes a storage object data access method, which can effectively solve the high coupling problem between a storage client and a storage service end and reduce the overhead of the storage client.
[0033] In order to more clearly understand the inventive concept provided by the present invention, Figure 1-6 The storage object data access method proposed in the present invention is described.
[0034] Please refer to Figure 1 , Figure 1 The following is a flow chart of a method for accessing storage object data provided by an embodiment of the present invention. The method can be implemented by a storage object data access device configured in an electronic device. The method includes:
[0035] Step 101: Receive an object access request, wherein the object access request includes an original object storage interface.
[0036] Step 102: Determine the target storage cluster to be accessed according to the object storage interface.
[0037] Step 103: Process the object access request according to the target storage cluster to obtain a network access request.
[0038] Step 104: Access the storage object data corresponding to the object storage interface in the target storage cluster through a network access request.
[0039] In the above steps, the object access request is provided by the storage client. The object access request is processed to obtain the original object storage interface.
[0040] The target storage cluster to be accessed is determined based on the object storage interface. For example, the target storage cluster corresponding to the object storage interface may be one or more storage clusters.
[0041] The object access request is processed according to the target storage cluster, and can be processed according to the storage cluster status related to the object access request. The storage cluster status can be divided into a single cluster status and a multi-cluster status.
[0042] When the target storage cluster is a single cluster, the object access request is encapsulated; when the target storage cluster is multiple clusters, the object access request is forwarded and then encapsulated. The object access request is encapsulated to obtain a network access request.
[0043] The network access request is used to access the storage object data corresponding to the object storage interface in the target storage cluster.
[0044] Optionally, the encapsulation process may include, but is not limited to, encapsulation using gRPC, i.e., using a remote procedure call (RPC) approach. The original object storage interface contained in the object access request is extracted, the corresponding implementation process is called, the local object data in the storage cluster is read, and the data is filled into the buffer pointed to by the read function return value. The data in the buffer is then packaged into a response result and returned to the storage client, thereby enabling access to the stored object data through the network access request.
[0045] The storage object data access method provided by the present invention effectively resolves the high coupling problem between the storage client and the storage service by encapsulating object access requests. Furthermore, it enables access in multiple languages and formats. The storage service can provide multiple object storage services based on user needs, without the storage client being aware of them.
[0046] When the target storage cluster is a single cluster, the storage object data access method proposed in the present invention can be combined with Figure 2-3 understand.
[0047] Please refer to Figure 2 , Figure 2 The following is a flow chart of a method for accessing storage object data provided by an embodiment of the present invention. The method can be implemented by a storage object data access device configured in an electronic device. The method includes:
[0048] Step 201: receiving an object access request, wherein the object access request includes an original object storage interface;
[0049] Step 202: Determine the target storage cluster to be accessed according to the object storage interface.
[0050] Step 203: encapsulate the object access request to obtain a network access request.
[0051] Step 204: Access the storage object data corresponding to the object storage interface in the target storage cluster through a network access request.
[0052] In the above steps, the encapsulation process includes but is not limited to gRPC encapsulation. Encapsulating the original object storage interface through gRPC can make the interface more universal, achieve significant performance and storage space through a single connection, and reduce the complexity and cost of the storage client using the storage service.
[0053] Optionally, encapsulating the object access request may include:
[0054] When the target storage cluster corresponds to a single target proxy group, the proxy group identifier corresponding to the target proxy group is directly added to the object access request to obtain a network access request;
[0055] When the target storage cluster corresponds to multiple target proxy groups, the proxy group identifier corresponding to each target proxy group is added to the object access request to obtain multiple network access requests.
[0056] like Figure 3 As shown, Figure 3 A schematic diagram of a scenario for accessing a single storage cluster provided by an embodiment of the present invention is shown. After the storage client sends an object access request, it is processed by the proxy gateway, that is, the proxy gateway encapsulates the original storage interface in gRPC format. The proxy gateway includes but is not limited to one gateway and multiple gateways. The types of gateways can be the same or different, and the gateways can be encapsulated in the same language or in different languages. For example, the proxy gateway includes multiple proxy gateways, and the multiple proxy gateways can be divided into a proxy group, and the proxy group corresponds to a separate storage cluster. The proxy gateway can include multiple proxy gateways, and the multiple proxy gateways can be divided into multiple proxy groups, and the multiple proxies correspond to a separate storage cluster.
[0057] like Figure 3 As shown, in Figure 3 The left side shows that one proxy group corresponds to a separate storage cluster a. Figure 3 The right side shows that multiple proxy groups correspond to a single storage cluster, b. Assuming the target storage cluster corresponds to a single target proxy group, and the proxy group identifier for that target proxy group is Zone01, the proxy group identifier corresponding to the target proxy group is directly added to the object access request to obtain a network access request, which can be expressed as {Zone01} / {ResourceName}.
[0058] When the target storage cluster corresponds to multiple target proxy groups, the proxy group identifiers corresponding to the target proxy groups are Zone02 and Zone02 respectively. The proxy group identifiers corresponding to each target proxy group are added to the object access request respectively to obtain multiple network access requests, which can be expressed as {Zone02} / {ResourceName} and {Zone03} / {ResourceName}.
[0059] The storage object data access method provided by the embodiment of the present invention decouples the storage client and the storage service end by adding gRPC processing. The gRPC service capability can be quantified. With a single cluster as the backend, its overall service capability can be dynamically expanded as needed by simply adding gPRC nodes, which effectively improves the versatility and convenience of storage object data access.
[0060] When the target storage cluster is multiple clusters, the storage object data access method proposed in the present invention can be combined with Figure 4-6 understand.
[0061] Please refer to Figure 4 , Figure 4 A flow chart of a method for accessing storage object data provided by another embodiment of the present invention is shown. The method can be implemented by a storage object data access device configured in an electronic device. The method includes:
[0062] Step 401: receiving an object access request, wherein the object access request includes an original object storage interface;
[0063] Step 402: Determine the target storage cluster to be accessed according to the object storage interface;
[0064] Step 403: forward the object access request;
[0065] Step 404: encapsulate the object access request to obtain a network access request.
[0066] Step 405: Access the storage object data corresponding to the object storage interface in the target storage cluster through a network access request.
[0067] In the above steps, forwarding the object access request may include: forwarding the object access request to at least one target proxy group according to the forwarding group relationship corresponding to the object access request; and encapsulating the object access request according to the proxy group information corresponding to the target proxy group.
[0068] The forwarding group relationship corresponding to the access request can be obtained by processing the object storage access interface included in the access request, or the forwarding group relationship can be directly carried in the object access request. The forwarding group relationship can be determined based on the domain name corresponding to the target storage cluster accessed by the object access request.
[0069] Optionally, forwarding the object access request to at least one target proxy group according to the forwarding group relationship corresponding to the object access request includes: determining the forwarding group relationship corresponding to the object access request, wherein the forwarding group relationship includes at least one target proxy group and a forwarding method; forwarding the object access request to the at least one target proxy group according to the forwarding method contained in the forwarding group relationship.
[0070] Optionally, searching for the forwarding group relationship corresponding to the object access request may include: parsing the object access request to obtain an access domain name range; and determining the forwarding group relationship corresponding to the object access request according to the access domain name range.
[0071] like Figure 5 As shown, Figure 5 The schematic diagram of the scenario of accessing multiple storage clusters provided by an embodiment of the present invention is shown. After the storage client sends an object access request, the storage service receives the object access request and parses the object access request to obtain the storage clusters that the storage client wants to access. These storage clusters that want to be accessed are represented by domain names. Figure 5 As shown in the figure, the storage cluster that the storage client wants to access involves the entire storage cluster. Each storage cluster corresponds to one or more proxy groups. Zone01, Zone02, Zone03, and Zone04 each represent a proxy group. Each proxy group can include multiple gRPC gateways.
[0072] The forwarding group relationship may include a forwarding object and a forwarding method.
[0073] A forwarding target is the range of proxy groups corresponding to an object access request. A forwarding target can include one or more proxy groups. The forwarding target can be determined based on the access domain name, which includes but is not limited to the default domain name or a specified domain name.
[0074] For example, Figure 5 The access domain names shown include zone01.store.com, zone02.store.com, zone03.store.com, and zone04.store.com, and their corresponding forwarding objects include some proxy gateways in the proxy groups corresponding to the proxy group identifiers Zone01, Zone02, Zone03, and Zone04.
[0075] For example, Figure 6 A schematic diagram of another scenario of accessing multiple storage clusters provided by an embodiment of the present invention is shown. Figure 6 The access domain names shown may include zone01.zonegroup02.store.com and zone02.zonegroup02.store.com, and their corresponding forwarding objects include some proxy gateways in the proxy groups corresponding to the proxy group identifiers Zone01 and Zone02.
[0076] The access domain name may also include zone03.zonegroup03.store.com, and its corresponding forwarding object includes some proxy gateways in the proxy group corresponding to the proxy group identifier Zone03. Optionally, the proxy gateway is a gRPC gateway.
[0077] Forwarding method: when there are multiple domain names, forwarding can be done in round-robin mode. When there is a single domain name, forwarding is done directly.
[0078] Optionally, the forwarding group relationship corresponding to the object access request is determined based on the access domain name range, including: when the access domain name range includes a default domain name, determining that the forwarding group relationship includes multiple target proxy groups corresponding to the default domain name, and the forwarding method is polling forwarding; when the access domain name range includes a specified domain name, determining one or more target proxy groups corresponding to the specified domain name, and the forwarding method is direct forwarding or polling forwarding.
[0079] Optionally, the access domain name range can be represented by a third-level domain name or a fourth-level domain name. The default domain name can be a third-level wildcard domain name, such as *.store.com. Forwarding processing can be implemented by a forwarding gateway. The forwarding gateway can use, but is not limited to, Nginx. Using Nginx, object access requests can be forwarded to the corresponding backend gRPC gateway, which effectively achieves load balancing and high availability among multiple gRPC gateways.
[0080] Optionally, when the forwarding processing is implemented by a forwarding gateway, the forwarding gateway is, for example, an Nginx server, which can forward the access domain name in the object access request to the corresponding backend gRPC server through the Host field in the HTTP message header. Through the gRPC service, a single client can access data from multiple storage clusters.
[0081] The storage object data access method provided by the embodiment of the present invention can conveniently and quickly achieve load balancing and high availability of a single cluster through forwarding processing and encapsulation processing, and can also provide good cluster dynamic expansion capability for proxy groups of multiple clusters.
[0082] Optionally, when adding a new cluster, you can implement it in a bottom-up manner, determine the new independent physical storage cluster, then start multiple gRPC gateways, group the multiple gRPC gateways according to the configuration parameters, obtain one or more proxy groups (that is, a single zone or multiple zones), then add the backend configuration of the Nginx server and the DNS configuration, and finally notify the storage client of the newly added zone to complete the expansion of the new cluster.
[0083] The storage object data access method provided by the embodiment of the present invention encapsulates a layer of gRPC server on the basis of the original object storage interface, and uses the Nginx server for forwarding on top of the gRPC server, effectively realizing load balancing and high availability of storage clients accessing multiple storage clusters through a single entrance.
[0084] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.
[0085] Please refer to Figure 7 , Figure 7 The following is a schematic diagram showing the structure of a storage object data access device provided by an embodiment of the present invention. The device can be configured in an electronic device, which can be a server device. The device includes:
[0086] The request receiving module 701 is configured to receive an object access request, wherein the object access request includes an original object storage interface;
[0087] A target determination module 702 is configured to determine a target storage cluster to be accessed according to an object storage interface;
[0088] The request processing module 703 is used to process the object access request according to the target storage cluster to obtain a network access request;
[0089] The object access module 704 is configured to access the storage object data corresponding to the object storage interface in the target storage cluster through a network access request.
[0090] Optionally, the request processing module may include but is not limited to an Nginx server and a gRPC server, or a gRPC server.
[0091] Optionally, the request processing module 703 includes:
[0092] The encapsulation processing submodule is used to encapsulate the object access request when the target storage cluster is a single cluster; or
[0093] The forwarding and encapsulation processing submodule is used to forward and encapsulate the object access request when the target storage cluster is multiple clusters.
[0094] Optionally, the encapsulation processing submodule may include but is not limited to a gRPC server.
[0095] The forwarding encapsulation processing submodule may include but is not limited to an Nginx server and a gRPC server.
[0096] Optionally, the encapsulation processing submodule is further configured to:
[0097] When the target storage cluster corresponds to a single target proxy group, the proxy group identifier corresponding to the target proxy group is directly added to the object access request to obtain a network access request; or
[0098] When the target storage cluster corresponds to multiple target proxy groups, the proxy group identifier corresponding to each target proxy group is added to the object access request to obtain multiple network access requests.
[0099] Optionally, the forwarding encapsulation processing submodule is further configured to:
[0100] forwarding the object access request to at least one target proxy group according to the forwarding group relationship corresponding to the object access request;
[0101] The object access request is encapsulated and processed according to the proxy group information corresponding to the target proxy group.
[0102] Optionally, the forwarding encapsulation processing submodule is further configured to: determine a forwarding group relationship corresponding to the object access request, the forwarding group relationship including at least one target proxy group and a forwarding mode;
[0103] The object access request is forwarded to at least one target proxy group according to the forwarding manner included in the forwarding group relationship.
[0104] The forwarding encapsulation processing submodule is further used to: parse the object access request to obtain the access domain name range; and determine the forwarding grouping relationship corresponding to the object access request according to the access domain name range.
[0105] The forwarding encapsulation processing submodule is also used to: when the access domain name range includes the default domain name, determine that the forwarding group relationship includes multiple target proxy groups corresponding to the default domain name, and the forwarding method is polling forwarding; or, when the access domain name range includes the specified domain name, determine one or more target proxy groups corresponding to the specified domain name, and the forwarding method is direct forwarding or polling forwarding.
[0106] The storage object data access device provided by the embodiment of the present invention can conveniently and quickly achieve load balancing and high availability of a single cluster through forwarding processing and encapsulation processing, and can also provide good cluster dynamic expansion capability for proxy groups of multiple clusters.
[0107] Reference below Figure 8, Figure 8 The schematic diagram of the structure of an electronic device provided by an embodiment of the present invention is shown. The electronic device may be a computer device such as a server. Figure 8 It does not limit the structure of electronic equipment. Figure 8 As shown, the electronic device at least includes a memory 801 and a processor 802. For example, the electronic device may also include Figure 8 More or fewer components (such as network interfaces, display devices, etc.) may be shown.
[0108] In particular, according to the embodiment provided by the present invention, the above reference flow chart Figure 1-6 The described process can be implemented as a computer software program. For example, embodiments provided by the present invention include a computer program product comprising a computer program carried on a machine-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication portion and / or installed from a removable medium. When the computer program is executed by a central processing unit (CPU), the above-described functions defined in the system of the present invention are performed.
[0109] It should be noted that the computer-readable medium shown in the present disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. This propagated data signal can take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber cable, RF, or any suitable combination thereof.
[0110] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the methods and computer program products described in accordance with the various embodiments provided by the present invention. Each box in the flowchart or block diagram can represent a module, program segment, or part of the code, and the aforementioned module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.
[0111] The units or modules involved in the embodiments described in the present invention may be implemented in software or hardware. The units or modules described may also be provided in a processor. For example, they may be described as follows: a processor includes a request receiving module, a target determination module, a request processing module, and an object access module. The names of these units or modules do not, in some cases, constitute limitations on the units or modules themselves. For example, the request receiving module may also be described as a "module for receiving object access requests."
[0112] As another aspect, embodiments of the present invention further provide a computer-readable storage medium. This computer-readable storage medium may be included in the electronic device described in the above embodiments, or may exist independently and not incorporated into the electronic device. The computer-readable storage medium stores one or more programs, which, when used by one or more processors, execute the storage object data access method described in the present invention.
[0113] The above description is merely a preferred embodiment of the present invention and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the invention is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also encompasses other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the inventive concept. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in the present invention.
Claims
1. A method for accessing storage object data, characterized in that: The method includes: receiving an object access request, wherein the object access request includes an original object storage interface; Determining a target storage cluster to be accessed according to the object storage interface; Processing the object access request according to the target storage cluster to obtain a network access request; Accessing the storage object data corresponding to the object storage interface in the target storage cluster through the network access request; The processing of the object access request according to the target storage cluster includes: When the target storage cluster is a single cluster, the object access request is encapsulated by using a remote procedure call gRPC server to process the original object storage interface; or When the target storage cluster is multiple clusters, the object access request is forwarded by using an Nginx server and encapsulated by using a gRPC server; The encapsulating and processing the object access request includes: When the target storage cluster corresponds to a single target proxy group, directly adding the proxy group identifier corresponding to the target proxy group to the object access request to obtain the network access request; or When the target storage cluster corresponds to multiple target proxy groups, the proxy group identifier corresponding to each target proxy group is added to the object access request to obtain multiple network access requests; The forwarding process using the Nginx server is to forward the object access request to the corresponding gRPC server, specifically including: forwarding the object access request to at least one target proxy group according to a forwarding group relationship corresponding to the object access request; The object access request is encapsulated according to the proxy group information corresponding to the target proxy group.
2. The method according to claim 1, characterized in that Forwarding the object access request to at least one target proxy group according to the forwarding group relationship corresponding to the object access request includes: determining a forwarding group relationship corresponding to the object access request, the forwarding group relationship including at least one target proxy group and a forwarding mode; The object access request is forwarded to the at least one target proxy group according to the forwarding manner included in the forwarding group relationship.
3. The method according to claim 2, characterized in that The determining of the forwarding group relationship corresponding to the object access request includes: Parsing the object access request to obtain the access domain name range; A forwarding group relationship corresponding to the object access request is determined according to the access domain name range.
4. The method according to claim 3, characterized in that The determining, according to the access domain name range, a forwarding group relationship corresponding to the object access request includes: When the access domain name range includes a default domain name, determining that the forwarding group relationship includes multiple target proxy groups corresponding to the default domain name, and the forwarding mode is polling forwarding; or, When the access domain name range includes a designated domain name, one or more target proxy groups corresponding to the designated domain name are determined, and the forwarding mode is direct forwarding or round-robin forwarding.
5. A storage object data access device, characterized in that: The device includes: A request receiving module, configured to receive an object access request, wherein the object access request includes an original object storage interface; A target determination module, configured to determine a target storage cluster to be accessed according to the object storage interface; a request processing module, configured to process the object access request according to the target storage cluster to obtain a network access request; An object access module, configured to access the storage object data corresponding to the object storage interface in the target storage cluster through the network access request; The processing of the object access request according to the target storage cluster includes: When the target storage cluster is a single cluster, the object access request is encapsulated by using a remote procedure call gRPC server to process the original object storage interface; or When the target storage cluster is multiple clusters, the object access request is forwarded by using an Nginx server and encapsulated by using a gRPC server; The encapsulating and processing the object access request includes: When the target storage cluster corresponds to a single target proxy group, directly adding the proxy group identifier corresponding to the target proxy group to the object access request to obtain the network access request; or When the target storage cluster corresponds to multiple target proxy groups, the proxy group identifier corresponding to each target proxy group is added to the object access request to obtain multiple network access requests; The forwarding process using the Nginx server is to forward the object access request to the corresponding gRPC server, specifically including: forwarding the object access request to at least one target proxy group according to a forwarding group relationship corresponding to the object access request; The object access request is encapsulated according to the proxy group information corresponding to the target proxy group.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method according to any one of claims 1 to 4 is implemented.
7. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Object storage access method and device, equipment and computer storage medium
CN112583760A
Capacity expansion method for gigabit-level object storage bucket
CN112860186A