Object storage network resource allocation method and apparatus, device, and medium

By managing operands and bandwidth token buckets through a token controller, the problem of uneven distribution of network resources in object storage is solved, improving user experience and service availability, preventing malicious access, and achieving high-efficiency object storage quality services.

CN119011488BActive Publication Date: 2026-01-23SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411002572.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2026-01-23
Estimated Expiration
2044-07-25

AI Technical Summary

Technical Problem

In existing object storage architectures, uneven distribution of network resources leads to poor user experience and a lack of quality service features, making it impossible to restrict malicious access and affecting data security and service availability.

Method used

The token controller manages operands and bandwidth token buckets, allocates resources according to request type to achieve even distribution of network resources, and dynamically adjusts resource allocation through token bucket switching and update mechanisms to prevent memory overload and malicious access.

Benefits of technology

It achieves uniform distribution of object storage network resources, improves user experience, ensures service availability and security, prevents malicious attacks, and enhances the performance and reliability of object storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119011488B_ABST
    Figure CN119011488B_ABST
Patent Text Reader

Abstract

The application provides an object storage network resource allocation method and device, equipment and medium, when a service request of a user is received, the request type of the service request is determined; based on the request type, a token corresponding to the request type is allocated to the service request by a preset token controller, the token represents the resource allocation amount of the service request under the request type; and the service request is executed based on the token. The scheme of the embodiment of the application realizes the uniform allocation of object storage network resources by different users through the token controller, and realizes efficient object storage quality service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cloud computing technology, and in particular to object storage network resource allocation methods, apparatus, devices and media. Background Technology

[0002] Object storage is a storage method that uses objects as the basic unit of storage. It uses the object's unique identifier as an index to store the object as a whole. An object can consist of multiple files or be a complex data structure containing multiple data types. Object storage has been widely adopted due to its scalability and reliability.

[0003] Existing object storage architectures generally lack Quality of Service (QoS) features, resulting in uneven distribution of network resources among different users. In extreme cases, users closer to the object storage server room or who access the object storage earlier to pull or push large amounts of data may strain the network resources of users farther away or who access the object storage later to pull or push small amounts of data. This can cause the latter to be unable to connect to the object storage service or experience slow upload and download speeds, thus impacting customer experience. The lack of QoS features also prevents object storage from restricting malicious access. Once malicious access penetrates network layer monitoring and interception, it can directly attack the object storage service, causing it to crash and resulting in data loss. This makes it impossible to ensure user data security and service availability at the service level. Summary of the Invention

[0004] The embodiments of the present invention provide a method, apparatus, device and medium for allocating object storage network resources, which can achieve uniform allocation of object storage network resources to different users.

[0005] According to one aspect of the present invention, a method for allocating object storage network resources is provided, comprising:

[0006] Upon receiving a user's business request, determine the request type of the business request;

[0007] Based on the request type, a token corresponding to the request type is allocated to the service request through a preset token controller. The token represents the amount of resources allocated for the service request to perform the service under the request type.

[0008] The business request is executed based on the token.

[0009] Optionally, the token controller includes a first token bucket and a second token bucket, the request type includes operands and bandwidth, and correspondingly, the tokens include operand tokens and bandwidth tokens.

[0010] Optionally, the step of allocating a token corresponding to the request type to the service request through a preset token controller based on the request type includes:

[0011] Load the user's operand quota or bandwidth quota into the currently running first or second token bucket;

[0012] The number of operand tokens or bandwidth tokens for the user is determined based on the time interval between the current time and the user's last service request, and the operand quota or bandwidth quota.

[0013] Optionally, the method further includes:

[0014] The number of detection object storage gateway instances;

[0015] During the check, a signal is sent to the backend storage monitor to query the object storage service status;

[0016] The operand tokens and bandwidth tokens in the token bucket are reduced proportionally to the number of object storage gateway instances.

[0017] Optionally, the method further includes:

[0018] Detect the amount of memory used by the first or second token bucket that is in operation;

[0019] When the amount of memory exceeds a preset threshold, the memory of the first token bucket or the second token bucket that is in the running state is released and switched to the non-running state, and the first token bucket or the second token bucket that is in the non-running state is switched to the running state.

[0020] Optionally, when the request type is the operand, executing the business request based on the token includes:

[0021] The type of the business request is determined. The operand request type includes read requests and write requests. Correspondingly, the operand token includes read operand tokens and write operand tokens.

[0022] If the request type is a read request, read the read operand token from the first or second token bucket that is in the running state. If the read operand token is greater than 0, process the request and decrement the read operand token by 1; otherwise, end the processing of the request.

[0023] If the request type is a write request, read the write operand token from the first or second token bucket that is in the running state. If the write operand token is greater than 0, process the request and decrement the write operand token by 1; otherwise, end the processing of the request.

[0024] Optionally, when the request type is the bandwidth, executing the service request based on the token includes:

[0025] The type of the service request is determined. The broadband request type includes read requests and write requests. Correspondingly, the broadband token includes read broadband tokens and write broadband tokens.

[0026] If the request type is a read request, read the read bandwidth token from the first or second token bucket that is in the running state. If the read bandwidth token is greater than 0, process the request and decrement the read bandwidth token by 1; otherwise, end the processing of the request.

[0027] If the request type is a write request, read the write broadband token from the first or second token bucket that is in the running state. If the write broadband token is greater than 0, process the request and decrement the write broadband token by 1; otherwise, end the processing of the request.

[0028] According to another aspect of the present invention, an object storage network resource allocation apparatus is provided, comprising:

[0029] The determining unit is used to determine the request type of the service request when it receives a user's service request;

[0030] The allocation unit is used to allocate a token corresponding to the request type to the service request through a preset token controller based on the request type. The token represents the amount of resource allocation for the service request to perform the service under the request type.

[0031] An execution unit is provided for executing the service request based on the token. According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0032] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the object storage network resource allocation method according to any embodiment of the present invention.

[0033] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions, the computer instructions being configured to cause a processor to execute and implement the object storage network resource allocation method according to any embodiment of the present invention.

[0034] This invention provides a method, apparatus, device, and medium for allocating object storage network resources. Upon receiving a user's service request, the method determines the request type. Based on the request type, a preset token controller allocates a token corresponding to the request type to the service request. The token represents the resource allocation amount for the service request to execute the service under the specified request type. The service request is then executed based on the token. This invention's solution achieves a uniform allocation of object storage network resources among different users through a token controller, thus realizing efficient object storage quality of service.

[0035] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0037] Figure 1 This is a flowchart of an object storage network resource allocation method provided in an embodiment of the present invention;

[0038] Figure 2 This is a diagram of an object storage quality service architecture provided in an embodiment of the present invention;

[0039] Figure 3 This is a schematic diagram of the structure of an object storage network resource allocation device according to an embodiment of the present invention;

[0040] Figure 4 This is a schematic diagram of the structure of an electronic device that implements the object storage network resource allocation method of this invention. Detailed Implementation

[0041] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0042] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0043] Figure 1 This is a flowchart of an object storage network resource allocation method provided in an embodiment of the present invention, as follows: Figure 1 As shown, the method includes:

[0044] S110. Upon receiving a user's service request, determine the request type of the service request.

[0045] In this embodiment of the invention, the token controller includes a first token bucket and a second token bucket, the request type includes operands and bandwidth, and correspondingly, the tokens include operand tokens and bandwidth tokens.

[0046] The design includes a token controller that tracks operand tokens and bandwidth tokens. The token controller comprises two token buckets (positive token bucket, first token bucket) and a negative token bucket (second token bucket), and two asynchronous threads: a switching thread and an update thread. The positive and negative token buckets share the same token bucket functionality, managing operand tokens and bandwidth tokens.

[0047] S120. Based on the request type, a token corresponding to the request type is allocated to the service request through a preset token controller. The token represents the resource allocation amount for the service request to perform the service under the request type.

[0048] In this embodiment of the invention, the step of allocating a token corresponding to the request type to the service request through a preset token controller based on the request type includes:

[0049] Load the user's operand quota or bandwidth quota into the currently running first or second token bucket;

[0050] The number of operand tokens or bandwidth tokens for the user is determined based on the time interval between the current time and the user's last service request, and the operand quota or bandwidth quota.

[0051] Object storage administrators set user operand quotas via command-line tools or the administrator interface. Read and write operand quotas can be set separately. Optionally, object storage stores these operand quotas in the user's metadata attributes. The token bucket is initialized by reading the user's metadata attributes and loading the user's operand quota into the running token bucket. Before processing a client request from that user, the operand token is populated. The operand quota is scaled down and added to the operand token using a ratio of the duration from the current time to the time of the user's most recent request to the operand quota duration. The incremented operand token cannot exceed the operand quota.

[0052] Similarly, object storage administrators set user bandwidth quotas via command-line tools or an administrator interface, allowing separate settings for read and write bandwidth quotas. Optionally, object storage stores these operand quotas in the user's metadata attributes. The token bucket is initialized by reading the user's metadata attributes and loading the user's bandwidth quota into the running token bucket. Before processing a client request from that user, a bandwidth token is populated. The bandwidth quota is scaled down and added to the bandwidth token using a ratio of the duration from the current time to the user's most recent request time to the bandwidth quota duration. The incremented bandwidth token cannot exceed the bandwidth quota.

[0053] In this embodiment of the invention, the method further includes:

[0054] The number of detection object storage gateway instances;

[0055] During the check, a signal is sent to the backend storage monitor to query the object storage service status;

[0056] The operand tokens and bandwidth tokens in the token bucket are reduced proportionally to the number of object storage gateway instances.

[0057] The update thread asynchronously checks the number of object storage gateway instances. Specifically, during the check, a signal querying the object storage service status is sent to the backend storage monitor. The number of registered object storage gateways is then filtered from the monitor's returned information. The operand tokens and bandwidth tokens in the token bucket are proportionally reduced based on the number of object storage gateway instances. The preferred interval for this check is 1800 seconds. It should be noted that the accuracy of this proportional token reduction operation depends on the effectiveness of the load balancing of the object storage service's network layer reverse proxy. If the reverse proxy evenly distributes client requests to each object storage gateway, the proportional token reduction operation is accurate; otherwise, errors will occur.

[0058] In this embodiment of the invention, the method further includes:

[0059] Detect the amount of memory used by the first or second token bucket that is in operation;

[0060] When the amount of memory exceeds a preset threshold, the memory of the first token bucket or the second token bucket that is in the running state is released and switched to the non-running state, and the first token bucket or the second token bucket that is in the non-running state is switched to the running state.

[0061] The switching thread asynchronously detects the amount of memory occupied by the token bucket in the running state. When it exceeds a preset threshold, it switches the running state of the two token buckets. It releases the memory allocated to the token bucket in the running state and puts it into the non-running state, and puts the token bucket in the non-running state into the running state, which is responsible for the subsequent statistics of operand tokens and bandwidth tokens.

[0062] S130. Execute the service request based on the token.

[0063] In this embodiment of the invention, when the request type is the operand, executing the business request based on the token includes:

[0064] The type of the business request is determined. The operand request type includes read requests and write requests. Correspondingly, the operand token includes read operand tokens and write operand tokens.

[0065] If the request type is a read request, read the read operand token from the first or second token bucket that is in the running state. If the read operand token is greater than 0, process the request and decrement the read operand token by 1; otherwise, end the processing of the request.

[0066] If the request type is a write request, read the write operand token from the first or second token bucket that is in the running state. If the write operand token is greater than 0, process the request and decrement the write operand token by 1; otherwise, end the processing of the request.

[0067] d) Identify the request type. If the request type is a read request, read the read operand token from the running token bucket. If the read operand token is greater than 0, process the request normally and decrement the read operand token by 1; otherwise, terminate the request processing and return a "503" error code and the error message "Requests are too frequent, this request is restricted" to the client. If the request type is a write request, read the write operand token from the running token bucket. If the write operand token is greater than 0, process the request normally and decrement the write operand token by 1; otherwise, terminate the request processing and return a "503" error code and the error message "Requests are too frequent, this request is restricted" to the client.

[0068] In this embodiment of the invention, when the request type is the bandwidth, executing the service request based on the token includes:

[0069] The type of the service request is determined. The broadband request type includes read requests and write requests. Correspondingly, the broadband token includes read broadband tokens and write broadband tokens.

[0070] If the request type is a read request, read the read bandwidth token from the first or second token bucket that is in the running state. If the read bandwidth token is greater than 0, process the request and decrement the read bandwidth token by 1; otherwise, end the processing of the request.

[0071] If the request type is a write request, read the write broadband token from the first or second token bucket that is in the running state. If the write broadband token is greater than 0, process the request and decrement the write broadband token by 1; otherwise, end the processing of the request.

[0072] The system identifies the request type. If the request is a read request, it reads the read bandwidth token from the running token bucket. If the read bandwidth token is greater than 0, the request is processed normally, and the read bandwidth token is decremented by the request return body size. Otherwise, the processing of the request ends, and the client is returned a "503" error code and the error message "Requests are too frequent, this request is restricted". If the request is a write request, it reads the write bandwidth token from the running token bucket. If the write bandwidth token is greater than 0, the request is processed normally, and the write operand token is decremented by the request body size. Otherwise, the processing of the request ends, and the client is returned a "503" error code and the error message "Requests are too frequent, this request is restricted".

[0073] Check if the bandwidth token is in a debt state. A debt state is when the bandwidth token is decremented and becomes negative. If it is in a debt state, subsequent user requests must resume normal access when the bandwidth token is populated with a positive value again. Otherwise, return the error code "503" and the error message "Requests are too frequent and the request is restricted" and populate the bandwidth token.

[0074] Figure 2 This is a diagram of an object storage quality of service architecture provided in an embodiment of the present invention, such as... Figure 2As shown, a token controller is designed to manage operand tokens and bandwidth tokens, comprising three parts: two token buckets (positive and negative), and two asynchronous threads (switching and updating). The positive and negative token buckets have the same token bucket functionality, managing operand tokens and bandwidth tokens. Operand tokens include read and write operand tokens, and bandwidth tokens include read and write bandwidth tokens. The management process for operand tokens is as follows: after identifying the client request type, read / write operand tokens are replenished, and it is determined whether the request should be processed normally. Then, it is determined whether to decrement the read / write operand tokens by 1. The management process for bandwidth tokens is as follows: after identifying the client request type, read / write bandwidth tokens are replenished, and it is determined whether the request should be processed normally. Then, it is determined whether to decrement the read / write bandwidth tokens by the request body or return body size. A debt mechanism is designed for bandwidth tokens, allowing client requests to temporarily exceed the bandwidth quota preset by the object storage administrator. Client access is restored when the bandwidth tokens are replenished to a positive value. The switching thread asynchronously monitors the memory usage of the token controller. When it exceeds a preset threshold, it switches the running state of the two token buckets, releasing the memory allocated to the running token bucket and placing it in a non-running state, while putting the non-running token bucket into a running state. The update thread asynchronously monitors the number of object storage gateway instances. During the check, it sends a signal to the backend storage monitor querying the object storage service status, and proportionally reduces the number of operand tokens and bandwidth tokens in the token bucket based on the number of object storage gateway instances. The update thread triggers a check on the number of object storage gateway instances every 1800 seconds.

[0075] In this invention, the token controller includes two token buckets, one positive and one negative, which manage operand tokens and bandwidth tokens in memory. The memory usage of the token controller is controlled by switching the running states of the two token buckets, avoiding the need for a separate memory data eviction algorithm and achieving simple and effective token control. A debt mechanism is designed for bandwidth tokens, allowing client requests to temporarily exceed the bandwidth quota preset by the object storage administrator. Client access is restored when the bandwidth token is replenished to a positive value, ensuring the availability and performance of the object storage service while improving the user experience. An update thread asynchronously counts the number of object storage gateway instances, evenly distributing the network resource quota preset by the object storage administrator to each object storage gateway. This avoids coupling quality of service with object storage business, ensuring that the read and write performance of object storage is not affected.

[0076] The token controller counts and manages operand tokens and bandwidth tokens in memory. Object storage administrators set network resource quotas for users via command-line tools or an administrator interface. Object storage stores these quotas in the user's metadata attributes. During token controller initialization, the network resource quotas are loaded as operand tokens and bandwidth tokens. This loading operation only occurs during token controller initialization or when switching between two token buckets. Object storage does not perform this loading operation when processing user services, ensuring the efficiency of object storage quality of service and achieving isolation from object storage services. The token controller asynchronously counts the number of object storage gateway instances and evenly distributes the network resource quotas set by the administrator to the token manager of each object storage gateway. This achieves efficient object storage quality of service in multi-gateway instance scenarios, avoiding inter-process communication, synchronization processor and network overhead, and further improving the efficiency of object storage quality of service. In summary, the token controller design can achieve even distribution of object storage network resources among different users, improving user experience.

[0077] Figure 3 This is a schematic diagram of the structure of an object storage network resource allocation device according to an embodiment of the present invention, as shown below. Figure 3 As shown, the device includes:

[0078] The determining unit 310 is used to determine the request type of the service request when it receives a user's service request;

[0079] The allocation unit 320 is used to allocate a token corresponding to the request type to the service request through a preset token controller based on the request type. The token represents the resource allocation amount for the service request to perform the service under the request type.

[0080] Execution unit 330 is used to execute the business request based on the token.

[0081] Optionally, the token controller includes a first token bucket and a second token bucket, the request type includes operands and bandwidth, and correspondingly, the tokens include operand tokens and bandwidth tokens.

[0082] Optionally, allocation unit 320 is specifically used for:

[0083] Load the user's operand quota or bandwidth quota into the currently running first or second token bucket;

[0084] The number of operand tokens or bandwidth tokens for the user is determined based on the time interval between the current time and the user's last service request, and the operand quota or bandwidth quota.

[0085] Optionally, the allocation unit 320 is also used for:

[0086] The number of detection object storage gateway instances;

[0087] During the check, a signal is sent to the backend storage monitor to query the object storage service status;

[0088] The operand tokens and bandwidth tokens in the token bucket are reduced proportionally to the number of object storage gateway instances.

[0089] Optionally, the allocation unit 320 is also used for:

[0090] Detect the amount of memory used by the first or second token bucket that is in operation;

[0091] When the amount of memory exceeds a preset threshold, the memory of the first token bucket or the second token bucket that is in the running state is released and switched to the non-running state, and the first token bucket or the second token bucket that is in the non-running state is switched to the running state.

[0092] Optionally, execution unit 330 is specifically used to execute:

[0093] The type of the business request is determined. The operand request type includes read requests and write requests. Correspondingly, the operand token includes read operand tokens and write operand tokens.

[0094] If the request type is a read request, read the read operand token from the first or second token bucket that is in the running state. If the read operand token is greater than 0, process the request and decrement the read operand token by 1; otherwise, end the processing of the request.

[0095] If the request type is a write request, read the write operand token from the first or second token bucket that is in the running state. If the write operand token is greater than 0, process the request and decrement the write operand token by 1; otherwise, end the processing of the request.

[0096] Optionally, execution unit 330 is specifically used to execute:

[0097] The type of the service request is determined. The broadband request type includes read requests and write requests. Correspondingly, the broadband token includes read broadband tokens and write broadband tokens.

[0098] If the request type is a read request, read the read bandwidth token from the first or second token bucket that is in the running state. If the read bandwidth token is greater than 0, process the request and decrement the read bandwidth token by 1; otherwise, end the processing of the request.

[0099] If the request type is a write request, read the write broadband token from the first or second token bucket that is in the running state. If the write broadband token is greater than 0, process the request and decrement the write broadband token by 1; otherwise, end the processing of the request.

[0100] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the object storage network resource allocation device. In other embodiments of the present invention, the object storage network resource allocation device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0101] The information interaction and execution process between the various units in the above-mentioned device are based on the same concept as the method embodiment of the present invention, and the specific details can be found in the description of the method embodiment of the present invention, and will not be repeated here.

[0102] Figure 4 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0103] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0104] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0105] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as object storage network resource allocation methods.

[0106] In some embodiments, the object storage network resource allocation method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the object storage network resource allocation method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the object storage network resource allocation method by any other suitable means (e.g., by means of firmware).

[0107] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0108] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0109] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0110] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0111] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0112] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0113] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0114] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for allocating network resources for object storage, characterized in that, include: Upon receiving a user's business request, determine the request type of the business request; Based on the request type, a token corresponding to the request type is allocated to the service request through a preset token controller. The token represents the amount of resources allocated for the service request to perform the service under the request type. The service request is executed based on the token. The token controller includes a first token bucket and a second token bucket; the request type includes operands and bandwidth; and correspondingly, the tokens include operand tokens and bandwidth tokens. The step of allocating a token corresponding to the request type to the service request through a preset token controller based on the request type includes: Load the user's operand quota or bandwidth quota into the currently running first or second token bucket; The number of operand tokens or bandwidth tokens for the user is determined based on the time interval between the current time and the user's last service request, and the operand quota or bandwidth quota. Its characteristic is that it further includes: The number of detection object storage gateway instances; During the check, a signal is sent to the backend storage monitor to query the object storage service status; The operand tokens and bandwidth tokens in the token bucket are reduced proportionally to the number of object storage gateway instances. Also includes: Detect the amount of memory used by the first or second token bucket that is in operation; When the amount of memory exceeds a preset threshold, the memory of the first token bucket or the second token bucket that is in the running state is released and switched to the non-running state, and the first token bucket or the second token bucket that is in the non-running state is switched to the running state.

2. The method according to claim 1, characterized in that, When the request type is the operand, executing the business request based on the token includes: The type of the business request is determined. The operand request type includes read requests and write requests. Correspondingly, the operand token includes read operand tokens and write operand tokens. If the request type is a read request, read the read operand token from the first or second token bucket that is in the running state. If the read operand token is greater than 0, process the request and decrement the read operand token by 1; otherwise, end the processing of the request. If the request type is a write request, read the write operand token from the first or second token bucket that is in the running state. If the write operand token is greater than 0, process the request and decrement the write operand token by 1; otherwise, end the processing of the request.

3. The method according to claim 2, characterized in that, When the request type is the bandwidth, executing the service request based on the token includes: The type of the service request is determined. The bandwidth request type includes read requests and write requests. Correspondingly, the bandwidth token includes read bandwidth tokens and write bandwidth tokens. If the request type is a read request, read the read bandwidth token from the first or second token bucket that is in the running state. If the read bandwidth token is greater than 0, process the request and decrement the read bandwidth token by 1; otherwise, end the processing of the request. If the request type is a write request, read the write bandwidth token from the first or second token bucket that is in the running state. If the write bandwidth token is greater than 0, process the request and decrement the write bandwidth token by 1; otherwise, end the processing of the request.

Citation Information

Patent Citations

  • Qos realization method and device in distributed storage system

    CN107276827A

  • Service request flow limiting method and device and storage medium

    CN116095013A