[go: up one dir, main page]

CN111181791A - A quota management method, device, equipment and storage medium - Google Patents

A quota management method, device, equipment and storage medium Download PDF

Info

Publication number
CN111181791A
CN111181791A CN201911420122.5A CN201911420122A CN111181791A CN 111181791 A CN111181791 A CN 111181791A CN 201911420122 A CN201911420122 A CN 201911420122A CN 111181791 A CN111181791 A CN 111181791A
Authority
CN
China
Prior art keywords
quota
user
service gateway
information
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911420122.5A
Other languages
Chinese (zh)
Inventor
胡永刚
陈二涛
白学余
翟亚永
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
IEIT Systems Co Ltd
Original Assignee
Inspur Electronic Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201911420122.5A priority Critical patent/CN111181791A/en
Publication of CN111181791A publication Critical patent/CN111181791A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/04Network management architectures or arrangements
    • H04L41/042Network management architectures or arrangements comprising distributed management centres cooperatively managing the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0893Assignment of logical groups to network elements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请公开了一种配额管理方法,应用于配额管理设备,该方法包括:接收分布式对象存储系统的第一服务网关发送的第一配额变化请求;根据总配额信息,确定第一配额变化请求是否超出第一用户的配额;如果确定第一配额变化请求未超出第一用户的配额,则修改总配额信息,并向第一服务网关返回第一确认应答消息,以使第一服务网关在接收到第一确认应答消息时,响应第一用户的上传请求。应用本申请实施例所提供的技术方案,可以避免出现用户对于对象的操作混乱问题,降低了配额管理对系统性能的影响。本申请还公开了一种配额管理装置、设备及存储介质,具有相应技术效果。

Figure 201911420122

The present application discloses a quota management method, which is applied to a quota management device, and the method includes: receiving a first quota change request sent by a first service gateway of a distributed object storage system; determining whether the first quota change request exceeds the quota of the first user based on the total quota information; if it is determined that the first quota change request does not exceed the quota of the first user, modifying the total quota information, and returning a first confirmation response message to the first service gateway, so that the first service gateway responds to the first user's upload request when receiving the first confirmation response message. The application of the technical solution provided in the embodiment of the present application can avoid the problem of user confusion in object operations and reduce the impact of quota management on system performance. The present application also discloses a quota management device, equipment and storage medium, which have corresponding technical effects.

Figure 201911420122

Description

Quota management method, device, equipment and storage medium
Technical Field
The present application relates to the field of computer application technologies, and in particular, to a quota management method, apparatus, device, and storage medium.
Background
In a distributed object storage system, an access interface is provided for a user through a service Gateway (RGW), while a quota management function is provided for the user. Through quota management, the number of objects and the size of space which are allowed to be uploaded by each user can be managed, and the number of objects and the size of space which are allowed to be uploaded by the user under a certain bucket can also be managed. When the service gateway needs to realize quota management, quota information of a user needs to be counted in real time, and then whether the object is allowed to be uploaded or not is determined according to the quota information.
In the existing quota management implementation scheme, when a service gateway is started, quota information is loaded from a storage pool and cached in a memory, when a user uploads, deletes and copies an object, whether quota information cached in the memory exceeds a period or not is judged, if the quota information exceeds the period, the quota information is reloaded from the storage pool, whether the user operation is allowed or not is determined by using the quota information, and if the quota information does not exceed the period, whether the user operation is allowed or not is determined by directly using the quota information in the memory. And if the user operation is allowed, further updating the quota information, and writing the updated quota information into the storage pool when a set time interval is reached.
This approach is not problematic in the case where only one service gateway is deployed in a distributed object storage system. However, problems arise if multiple service gateways are deployed in a distributed object storage system. For example, when one service gateway updates quota information and a timing time interval does not arrive and a storage pool is not written yet, other service gateways do not know the change of quota information, which causes inconsistency of quota information used by different service gateways, thereby causing confusion of user operations on objects and affecting system performance.
Disclosure of Invention
The application aims to provide a quota management method, a quota management device, quota management equipment and a quota management storage medium, so that the problem of operation confusion of a user on an object is avoided, and the system performance is improved.
In order to solve the technical problem, the application provides the following technical scheme:
a quota management method is applied to quota management equipment and comprises the following steps:
receiving a first quota change request sent by a first service gateway of a distributed object storage system, where the first quota change request is: when the first service gateway receives an uploading request of a first user to a first object, the uploading request is sent out under the condition that the uploading request does not exceed the quota of the first user according to local quota information;
determining whether the first quota change request exceeds a quota of the first user according to total quota information, wherein the total quota information is the most complete and latest quota information in the distributed object storage system maintained by the quota management device;
if the first quota change request is determined not to exceed the quota of the first user, modifying the total quota information, and returning a first confirmation response message to the first service gateway, so that the first service gateway responds to the upload request of the first user when receiving the first confirmation response message.
In a specific embodiment of the present application, in a case that it is determined that the first quota change request exceeds the quota of the first user, the method further includes:
and returning a refusal response message to the first service gateway, so that the first service gateway refuses the uploading request of the first user when receiving the refusal response message.
In one embodiment of the present application, the method further includes:
receiving a second quota change request sent by the first service gateway, where the second quota change request is: the first service gateway sends out when receiving a deletion request of the first user for the second object;
and modifying the total quota information according to the second quota change request, and returning a second confirmation response message to the first service gateway, so that the first service gateway responds to the deletion request of the first user when receiving the second confirmation response message.
In one embodiment of the present application, the method further includes:
and when a set time interval is reached, sending the total quota information to each service gateway of the distributed object storage system, so that each service gateway takes the received total quota information as local quota information for determining whether to respond to an operation request of a user.
In one embodiment of the present application, the method further includes:
and according to the total quota information, if the quota of the second user is determined to be used up, respectively sending an over-quota notification aiming at the second user to each service gateway of the distributed object storage system.
A quota management apparatus applied to a quota management device, the apparatus comprising:
a receiving module, configured to receive a first quota change request sent by a first service gateway of a distributed object storage system, where the first quota change request is: when the first service gateway receives an uploading request of a first user to a first object, the uploading request is sent out under the condition that the uploading request does not exceed the quota of the first user according to local quota information;
a determining module, configured to determine whether the first quota change request exceeds a quota of the first user according to total quota information, where the total quota information is the most complete and latest quota information in the distributed object storage system maintained by the quota management device;
and the response module is configured to modify the total quota information and return a first acknowledgement message to the first service gateway if it is determined that the first quota change request does not exceed the quota of the first user, so that the first service gateway responds to the upload request of the first user when receiving the first acknowledgement message.
In a specific embodiment of the present application, the system further includes an information sending module, configured to:
and when a set time interval is reached, sending the total quota information to each service gateway of the distributed object storage system, so that each service gateway takes the received total quota information as local quota information for determining whether to respond to an operation request of a user.
In a specific embodiment of the present application, the apparatus further includes a notification sending module, configured to:
and according to the total quota information, if the quota of the second user is determined to be used up, respectively sending an over-quota notification aiming at the second user to each service gateway of the distributed object storage system.
A quota management apparatus, comprising:
a memory for storing a computer program;
a processor configured to implement the steps of the quota management method of any of the above when executing the computer program.
A computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the quota management method of any of the above.
By applying the technical scheme provided by the embodiment of the application, when receiving a quota change request sent by any one service gateway of the distributed object storage system, the quota management device modifies the total quota information according to the total quota information when determining that the quota change request does not exceed the quota of the corresponding user, and returns a confirmation response message to the service gateway, so that the service gateway can correspond to the operation request of the user when receiving the confirmation response message. The total quota information is maintained in the quota management device, the service gateway is communicated with the quota management device, the legality of the operation request of the user can be accurately determined based on the total quota information, the problem that the operation of the user on the object is disordered can be avoided, and the influence of quota management on the system performance is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart illustrating an implementation of a quota management method in the prior art;
fig. 2 is a flowchart of an implementation of a quota management method in an embodiment of the present application;
fig. 3 is a flowchart of another implementation of a quota management method in an embodiment of the present application;
fig. 4 is a schematic structural diagram of a quota management apparatus in an embodiment of the present application;
fig. 5 is a schematic structural diagram of a quota management device in an embodiment of the present application.
Detailed Description
In the prior art, in order to solve the problem of inconsistency of quota information cached in a memory by different service gateways, the quota information of one service gateway is changed, and a notification message is sent to other service gateways.
As shown in fig. 1, the distributed object storage system simultaneously supports three service gateways, namely, RGW1, RGW2, and RGW3, a user initiates a request for uploading an object to RGW1, after receiving the request, RGW1 determines whether a quota of the user exceeds, if the quota exceeds, an operation failure (not shown in the figure) is directly returned to the user, if the quota does not exceed, local quota information is modified, then quota change is notified to other service gateways, that is, RGW2 and RGW3, RGW2 and RGW3 receive a quota change notification of RGW1, update respective local quota information, return a notification response to RGW1, and after receiving the notification responses of RGW2 and RGW3, RGW1 returns a request response to the user, and successfully replies an upload response.
That is, when the quota information of one service gateway changes, all other service gateways need to be notified, and the processing can not be continued until notification responses returned by all other service gateways are received. In this way, when the number of service gateways is small and the service load pressure is low, quota information is synchronized quickly and quota control is also accurate. However, when the number of service gateways is large, especially when the service load is heavy, the waiting time is long due to waiting for the responses of all other service gateways, and the system performance is greatly affected.
In view of this, the present application provides a quota management method, which may be applied to a quota management device. The quota management device can be deployed in a distributed object storage system, the distributed object storage system can simultaneously support a plurality of service gateways, the service gateway of the distributed object storage system is an RESTful object storage cluster access interface, converts a RESTful access request of a user into access to an object storage cluster, and returns an access result to the user. The quota management device may be in communication with each service gateway. When receiving a quota change request sent by any one service gateway of the distributed object storage system, the quota management device modifies the total quota information according to the total quota information when determining that the quota change request does not exceed the quota of the corresponding user, and returns a confirmation response message to the service gateway, so that the service gateway can correspond to the operation request of the user when receiving the confirmation response message. The quota management device maintains the total quota information, and the service gateway can communicate with the quota management device, so that quota change notification and waiting delay between the service gateways are reduced, the problem of operation confusion of a user on an object can be avoided, and the influence of quota management on system performance is reduced.
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 2, an implementation flowchart of a quota management method provided in an embodiment of the present application is shown, where the method may include the following steps:
s210: a first quota change request sent by a first service gateway of a distributed object storage system is received.
The first quota change request is: and the first service gateway sends the uploading request under the condition that the uploading request does not exceed the quota of the first user according to the local quota information when receiving the uploading request of the first user to the first object.
In this embodiment of the present application, the first service gateway is any one of a plurality of service gateways that are simultaneously supported by the distributed object storage system. Each service gateway of the distributed object storage system can obtain quota information in advance and store the quota information, that is, each service gateway maintains local quota information. The quota information may include, for each user, the number of objects and the occupied space size currently allowed to be uploaded by the user, and/or the number of objects and the occupied space size allowed to be uploaded by the user under each bucket, and may further include the total number of objects and the occupied space size allowed to be uploaded by the user, and/or the total number of objects and the occupied space size allowed to be uploaded by the user under each bucket.
When the first service gateway receives an upload request of a first user for the first object, whether the upload request exceeds a quota of the first user may be determined according to the local quota information. For example, the size of a space that a first object to be uploaded by a first user needs to occupy is 50M, the first service gateway indicates, according to the local quota information, that the upload request exceeds the quota of the first user if it is determined that the size of the space currently allowed to occupy by the first user is 40M or the number of objects currently allowed to be uploaded by the first user is 0, and indicates that the upload request does not exceed the quota of the first user if it is determined that the size of the space allowed to occupy by the first user is 100M and the number of objects currently allowed to be uploaded by the first user is not 0. For another example, if the first user wants to upload the first object to the first bucket, and if it is determined that the number of objects currently allowed to be uploaded to the first bucket by the first user is 0, it indicates that the upload request exceeds the quota of the first user.
When the first service gateway determines that the upload request exceeds the quota of the first user, upload failure information can be directly returned to the first user.
The first service gateway may send a first quota change request to the quota management device when determining that the upload request does not exceed the quota of the first user, where the first quota change request may carry quota information to be modified.
It is understood that in practical applications, the user's copy request for the object may also be a special case of the upload request, since all of them need to continuously occupy space.
When receiving the first quota change request sent by the first service gateway, the quota management device may continue to perform the operation of step S220.
S220: and determining whether the first quota change request exceeds the quota of the first user according to the total quota information.
In this embodiment of the present application, the quota management device may maintain a total quota information, and may modify the total quota information according to a quota change request sent by each service gateway, that is, the total quota information is the most complete and latest quota information in the distributed object storage system.
When receiving the first quota change request sent by the first service gateway, the quota management device further determines whether the first quota change request exceeds the quota of the first user according to the total quota information. The specific determination method may be performed by referring to a manner in which the first service gateway determines whether the upload request exceeds the quota of the first user according to the local quota information, which is not described in this embodiment of the present application again.
S230: and if the first quota change request is determined not to exceed the quota of the first user, modifying the total quota information, and returning a first confirmation response message to the first service gateway, so that the first service gateway responds to the uploading request of the first user when receiving the first confirmation response message.
When receiving the first quota change request sent by the first service gateway, the quota management device further determines whether the first quota change request exceeds the quota of the first user according to the total quota information. If it is determined that the first quota change request does not exceed the quota of the first user, it indicates that the upload request of the first user to the first object is legal, and in this case, the quota management device may modify the total quota information based on the quota information to be modified carried by the first quota change request.
For example, the size of the first object is 50M, the quota information to be modified is the number of objects allowed to be uploaded by the first user minus 1, the size of the space occupied by the first user is allowed to be reduced by 50M, the number of objects allowed to be uploaded by the first user is reduced by 1 in the current total quota information, and the size of the space occupied by the first user is allowed to be reduced by 50M.
Meanwhile, if the quota management device determines that the first quota change request does not exceed the quota of the first user, a first confirmation response message may be returned to the first service gateway, so that the first service gateway may respond to the upload request of the first user and may return a corresponding response message such as upload success to the first user when receiving the first confirmation response message.
The first service gateway is any one of a plurality of service gateways simultaneously supported by the distributed object storage system, namely, any one service gateway of the distributed object storage system can send a quota change request to the quota management device when quota changes, and the quota management device determines whether quota is exceeded or not according to the maintained total quota information.
By applying the method provided by the embodiment of the application, when receiving a quota change request sent by any one service gateway of the distributed object storage system, the quota management device modifies the total quota information according to the total quota information when determining that the quota change request does not exceed the quota of the corresponding user, and returns a confirmation response message to the service gateway, so that the service gateway can correspond to the operation request of the user when receiving the confirmation response message. The total quota information is maintained in the quota management device, the service gateway is communicated with the quota management device, the legality of the operation request of the user can be accurately determined based on the total quota information, the problem that the operation of the user on the object is disordered can be avoided, and the influence of quota management on the system performance is reduced.
In an embodiment of the present application, in a case that it is determined that the first quota change request exceeds the quota of the first user, the method may further include the following steps:
and returning a refusal response message to the first service gateway so that the first service gateway refuses the uploading request of the first user when receiving the refusal response message.
It can be understood that, in this embodiment of the present application, any one of the service gateways of the distributed object storage system may send a quota change request to the quota management device when there is a quota change, so that the total quota information maintained by the quota management device is always the latest and the most complete.
After receiving a first quota change request sent by a first service gateway, the quota management device determines whether the first quota change request exceeds a quota of a first user according to the total quota information. If it is determined that the first quota change request exceeds the quota of the first user, indicating that the upload request of the first user for the first object is illegal, a rejection response message may be returned to the first service gateway, so that the first service gateway may reject the upload request of the first user when receiving the rejection response message, for example, return the rejection message to the first user.
Therefore, whether the operation of the user on the object is legal or not can be accurately determined according to the total quota information, and illegal operation is timely avoided.
In one embodiment of the present application, the method may further comprise the steps of:
the method comprises the following steps: receiving a second quota change request sent by the first service gateway, wherein the second quota change request is as follows: the first service gateway sends out when receiving a deletion request of a first user for a second object;
step two: and according to the second quota change request, modifying the total quota information, and returning a second confirmation response message to the first service gateway, so that the first service gateway responds to the deletion request of the first user when receiving the second confirmation response message.
For convenience of description, the above two steps are combined for illustration.
In practical application, a user can delete an object in the distributed object storage system or an object under a certain bucket as required. The first service gateway may send a second quota change request to the quota management device when receiving a deletion request of the first user for the second object, because if the user wants to delete a certain object, the change of the quota information corresponding to the user is necessarily caused.
When receiving the second quota change request sent by the first service gateway, the quota management device may modify the total quota information according to the second quota change request. Specifically, the total quota information may be modified based on the quota information to be modified carried by the second quota change request.
For example, the size of the second object is 50M, the quota information to be modified is the number of objects allowed to be uploaded by the first user plus 1, the size of the space allowed to be occupied by the first user plus 50M, the number of objects allowed to be uploaded by the first user plus 1 in the current total quota information, and the size of the space allowed to be occupied by the first user plus 50M.
When receiving the second quota change request sent by the first service gateway, the quota management device may also return a second confirmation response message to the first service gateway. Thus, when receiving the second acknowledgement message, the first service gateway may respond to the deletion request of the first user to delete the second object, and may return a deletion success message to the first user at the same time.
When quota changes, each service gateway of the distributed object storage system can send a quota change request to the quota management device, so that the total quota information maintained by the quota management device is always up-to-date and most complete. The validity of the operation request of the user can be accurately confirmed based on the total quota information.
In one embodiment of the present application, the method may further comprise the steps of:
and when the set time interval is reached, sending the total quota information to each service gateway of the distributed object storage system, so that each service gateway takes the received total quota information as local quota information for determining whether to respond to an operation request of a user.
In the embodiment of the present application, a time interval may be preset. When the set time interval is reached, the quota management device may send the total quota information to each service gateway of the distributed object storage system, so that each service gateway may receive the current most complete and latest total quota information, store the total quota information as local quota information, and determine whether to respond to an operation request of a user based on the current most complete and latest total quota information. The consistency of the local quota information of different service gateways is ensured, and the problem of quota control failure is avoided.
In one embodiment of the present application, the method may further comprise the steps of:
and according to the total quota information, if the quota of the second user is determined to be used up, respectively sending an over-quota notification aiming at the second user to each service gateway of the distributed object storage system.
In this embodiment of the present application, the quota management device maintains the total quota information, and may monitor quota information of each user in the total quota information. And according to the total quota information, if the quota of the second user is determined to be used up, the second user is indicated to be unable to upload the object at present. In the event that the quota of the second user is determined to be exhausted, an over quota notification for the second user may be sent to each service gateway of the distributed object storage system, respectively. After receiving the over quota notification, each service gateway may directly refuse when receiving the upload request of the second user for the object again. The processing efficiency is improved.
The quota of the second user may include the number of objects and the size of occupied space that the second user is allowed to upload, and may further include the number of objects and the size of occupied space that the second user is allowed to upload under a certain bucket. Whenever one of the second user's quotas is exhausted, a corresponding over quota notification for the second user may be sent to each service gateway.
In this embodiment of the present application, the service gateway may locally accumulate relevant quota changes. The service gateway locally accumulates relevant quota changes in two cases:
the first method comprises the following steps: when the service gateway receives an upload request of a user for a certain object, if the upload request does not exceed the quota of the user according to the local quota information, the local quota information may be modified first, and then a quota change request is sent to the quota management device. And when the service gateway receives a confirmation response message returned by the quota management equipment, responding to the uploading request of the user. When the service gateway receives the refusal response message returned by the quota management device, the modified local quota information can be restored.
And the second method comprises the following steps: when receiving an upload request of a user for a certain object, the service gateway may send a quota change request to the quota management device if it is determined that the upload request does not exceed the quota of the user according to the local quota information. When the service gateway receives the confirmation response message returned by the quota management device, the service gateway may modify the local quota information and respond to the upload request of the user. When the service gateway receives the response rejection message returned by the quota management device, the upload request of the user can be directly rejected.
For convenience of understanding, the following describes an embodiment of the present application by taking the quota management process shown in fig. 3 as an example. Likewise, the distributed object storage system supports three service gateways, RGW1, RGW2, RGW3, simultaneously.
A user sends a request for uploading objects to the RGW1, and the RGW1 receives the request for uploading the objects and judges whether the request exceeds the quota of the user or not according to the local quota information. If so, an upload failure message (not shown) is returned directly to the user. If not, the local quota information is updated, and then a quota change request is sent to the quota management device.
And after receiving the quota change request, the quota management device updates the statistics of the related quota and then judges whether the quota exceeds the quota of the user or not according to the total quota information. If so, a reject response message is returned to RGW1, and RGW1 rejects the user's upload request and restores the modified local quota information (not shown). And if the total quota information is not exceeded, updating the total quota information, returning a confirmation response message to the RGW1, and further returning a request response to the user by the RGW1 to respond to the uploading request of the user.
And if the quota management device determines that the quota of the user is exhausted according to the total quota information, the quota management device sends an over quota notification to the RGW1, the RGW2 and the RGW3 respectively, and the RGW1, the RGW2 and the RGW3 do not process the related upload request of the user any more.
Through comparison between the quota management processes in fig. 1 and fig. 3, it can be seen that, after the quota management device is introduced in the embodiment of the present application, the number of notifications that need to be sent when a quota changes each time is reduced, and only the quota management device needs to be notified without sending a notification to other service gateways.
When the quota management device judges that the quota of a certain user is used up, the quota management device notifies all service gateways, so that the service gateways receiving the notification no longer process the related upload requests. The whole process reduces quota change notification and waiting time delay among the service gateways, and reduces the influence of quota management on system performance. That is to say, in the embodiment of the present application, quota changes of each service gateway are counted in real time by the quota management device, and the uploading operation of the user is controlled in time, and when one service gateway has a quota change, only the quota management device needs to be notified without notifying and waiting for feedback of other service gateways. When the quota management device judges that the quota of a certain user or a storage bucket exceeds the limit, all service gateways are notified. By the technical scheme provided by the embodiment of the application, the influence of distributed quota management on the performance of each service gateway can be effectively reduced, and the real-time effective control of quota can be realized.
In the embodiment of the application, the service gateways of the distributed object storage system belong to the service end, local quota information at each service gateway may not be accurate, and total quota information maintained by the quota management device is the most complete and latest quota information in the distributed object storage system and is accurate information. Each service gateway is responsible for reporting quota change to quota management equipment, then the quota management equipment carries out statistics, and once quota is exceeded, quota exceeding notification can be sent to all service gateways.
Corresponding to the above method embodiment, an embodiment of the present application further provides a quota management apparatus, which is applied to a quota management device, and a quota management apparatus described below and a quota management method described above may be referred to in a corresponding manner.
Referring to fig. 4, the apparatus includes the following modules:
a receiving module 410, configured to receive a first quota change request sent by a first service gateway of the distributed object storage system, where the first quota change request is: when receiving an uploading request of a first user to a first object, a first service gateway sends the uploading request under the condition that the uploading request does not exceed the quota of the first user according to local quota information;
a determining module 420, configured to determine whether the first quota change request exceeds a quota of the first user according to total quota information, where the total quota information is the most complete and latest quota information in a distributed object storage system maintained by a quota management device;
the response module 430 is configured to modify the total quota information and return a first acknowledgement message to the first service gateway if it is determined that the first quota change request does not exceed the quota of the first user, so that the first service gateway responds to the upload request of the first user when receiving the first acknowledgement message.
By applying the device provided by the embodiment of the application, when receiving a quota change request sent by any one service gateway of the distributed object storage system, the quota management device modifies the total quota information according to the total quota information when determining that the quota change request does not exceed the quota of the corresponding user, and returns a confirmation response message to the service gateway, so that the service gateway can correspond to the operation request of the user when receiving the confirmation response message. The total quota information is maintained in the quota management device, the service gateway is communicated with the quota management device, the legality of the operation request of the user can be accurately determined based on the total quota information, the problem that the operation of the user on the object is disordered can be avoided, and the influence of quota management on the system performance is reduced.
In one embodiment of the present application, the response module 430 is further configured to:
and under the condition that the first quota change request exceeds the quota of the first user, returning a refusal response message to the first service gateway, so that the first service gateway refuses the uploading request of the first user when receiving the refusal response message.
In one embodiment of the present application,
the receiving module 410 is further configured to receive a second quota change request sent by the first service gateway, where the second quota change request is: the first service gateway sends out when receiving a deletion request of a first user for a second object;
the response module 430 is further configured to modify the total quota information according to the second quota change request, and return a second acknowledgement response message to the first service gateway, so that the first service gateway responds to the deletion request of the first user when receiving the second acknowledgement response message.
In a specific embodiment of the present application, the system further includes an information sending module, configured to:
and when the set time interval is reached, sending the total quota information to each service gateway of the distributed object storage system, so that each service gateway takes the received total quota information as local quota information for determining whether to respond to an operation request of a user.
In a specific embodiment of the present application, the apparatus further includes a notification sending module, configured to:
and according to the total quota information, if the quota of the second user is determined to be used up, respectively sending an over-quota notification aiming at the second user to each service gateway of the distributed object storage system.
Corresponding to the above method embodiment, an embodiment of the present application further provides a quota management device, including:
a memory for storing a computer program;
and the processor is used for realizing the steps of the quota management method when executing the computer program.
As shown in fig. 5, which is a schematic view of a composition structure of a quota management device, the quota management device may include: a processor 10, a memory 11, a communication interface 12 and a communication bus 13. The processor 10, the memory 11 and the communication interface 12 all communicate with each other through a communication bus 13.
In the embodiment of the present application, the processor 10 may be a Central Processing Unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic device, etc.
The processor 10 may call a program stored in the memory 11, and in particular, the processor 10 may perform operations in an embodiment of the quota management method.
The memory 11 is used for storing one or more programs, the program may include program codes, the program codes include computer operation instructions, in this embodiment, the memory 11 stores at least the program for implementing the following functions:
receiving a first quota change request sent by a first service gateway of the distributed object storage system, wherein the first quota change request is as follows: when receiving an uploading request of a first user to a first object, a first service gateway sends the uploading request under the condition that the uploading request does not exceed the quota of the first user according to local quota information;
determining whether the first quota change request exceeds a quota of the first user or not according to total quota information, wherein the total quota information is the most complete and latest quota information in a distributed object storage system maintained by quota management equipment;
and if the first quota change request is determined not to exceed the quota of the first user, modifying the total quota information, and returning a first confirmation response message to the first service gateway, so that the first service gateway responds to the uploading request of the first user when receiving the first confirmation response message.
In one possible implementation, the memory 11 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function (such as a sound playing function and an image playing function), and the like; the storage data area may store data created during use, such as quota information data, determination result data, and the like.
Further, the memory 11 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device or other volatile solid state storage device.
The communication interface 13 may be an interface of a communication module for connecting with other devices or systems.
Of course, it should be noted that the structure shown in fig. 5 does not constitute a limitation on the quota management device in the embodiment of the present application, and in practical applications, the quota management device may include more or less components than those shown in fig. 5, or some components may be combined.
Corresponding to the above method embodiments, this application embodiment further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the quota management method are implemented.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The principle and the implementation of the present application are explained in the present application by using specific examples, and the above description of the embodiments is only used to help understanding the technical solution and the core idea of the present application. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.

Claims (10)

1.一种配额管理方法,其特征在于,应用于配额管理设备,所述方法包括:1. A quota management method, characterized in that, applied to a quota management device, the method comprising: 接收分布式对象存储系统的第一服务网关发送的第一配额变化请求,所述第一配额变化请求为:所述第一服务网关在接收到第一用户对第一对象的上传请求时,根据本地配额信息确定所述上传请求未超出所述第一用户的配额的情况下发出的;Receive a first quota change request sent by the first service gateway of the distributed object storage system, where the first quota change request is: when the first service gateway receives the upload request for the first object from the first user, according to The local quota information determines that the upload request does not exceed the quota of the first user and is sent; 根据总配额信息,确定所述第一配额变化请求是否超出所述第一用户的配额,所述总配额信息为所述配额管理设备维护的所述分布式对象存储系统中最全、最新的配额信息;Determine whether the first quota change request exceeds the quota of the first user according to total quota information, where the total quota information is the most complete and latest quota in the distributed object storage system maintained by the quota management device information; 如果确定所述第一配额变化请求未超出所述第一用户的配额,则修改所述总配额信息,并向所述第一服务网关返回第一确认应答消息,以使所述第一服务网关在接收到所述第一确认应答消息时,响应所述第一用户的所述上传请求。If it is determined that the first quota change request does not exceed the quota of the first user, modify the total quota information, and return a first confirmation response message to the first service gateway, so that the first service gateway When receiving the first confirmation response message, responding to the upload request of the first user. 2.根据权利要求1所述的方法,其特征在于,在确定所述第一配额变化请求超出所述第一用户的配额的情况下,还包括:2 . The method according to claim 1 , wherein, in the case that it is determined that the first quota change request exceeds the quota of the first user, the method further comprises: 3 . 向所述第一服务网关返回拒绝应答消息,以使所述第一服务网关在接收到所述拒绝应答消息时,拒绝所述第一用户的所述上传请求。A rejection response message is returned to the first service gateway, so that the first service gateway rejects the upload request of the first user when receiving the rejection response message. 3.根据权利要求1所述的方法,其特征在于,还包括:3. The method of claim 1, further comprising: 接收所述第一服务网关发送的第二配额变化请求,所述第二配额变化请求为:所述第一服务网关在接收到所述第一用户对第二对象的删除请求时发出的;receiving a second quota change request sent by the first service gateway, where the second quota change request is: sent by the first service gateway when receiving a request for deletion of a second object from the first user; 根据所述第二配额变化请求,修改所述总配额信息,并向所述第一服务网关返回第二确认应答消息,以使所述第一服务网关在接收到所述第二确认应答消息时,响应所述第一用户的所述删除请求。Modify the total quota information according to the second quota change request, and return a second confirmation response message to the first service gateway, so that when the first service gateway receives the second confirmation response message , in response to the deletion request of the first user. 4.根据权利要求1所述的方法,其特征在于,还包括:4. The method of claim 1, further comprising: 在达到设定的时间间隔时,将所述总配额信息发送给所述分布式对象存储系统的各个服务网关,以使各个服务网关将接收到的总配额信息作为本地配额信息,用于确定是否响应用户的操作请求。When the set time interval is reached, the total quota information is sent to each service gateway of the distributed object storage system, so that each service gateway uses the received total quota information as local quota information to determine whether to Respond to user requests for operations. 5.根据权利要求1至4之中任一项所述的方法,其特征在于,还包括:5. The method according to any one of claims 1 to 4, further comprising: 根据所述总配额信息,如果确定第二用户的配额已用尽,则分别向所述分布式对象存储系统的各个服务网关发送针对所述第二用户的超配额通知。According to the total quota information, if it is determined that the quota of the second user has been exhausted, an over-quota notification for the second user is respectively sent to each service gateway of the distributed object storage system. 6.一种配额管理装置,其特征在于,应用于配额管理设备,所述装置包括:6. A quota management device, characterized in that, applied to quota management equipment, the device comprising: 接收模块,用于接收分布式对象存储系统的第一服务网关发送的第一配额变化请求,所述第一配额变化请求为:所述第一服务网关在接收到第一用户对第一对象的上传请求时,根据本地配额信息确定所述上传请求未超出所述第一用户的配额的情况下发出的;A receiving module, configured to receive a first quota change request sent by a first service gateway of the distributed object storage system, where the first quota change request is: the first service gateway receives a request for a first object from a first user. When uploading a request, it is determined according to local quota information that the upload request does not exceed the quota of the first user; 判断模块,用于根据总配额信息,确定所述第一配额变化请求是否超出所述第一用户的配额,所述总配额信息为所述配额管理设备维护的所述分布式对象存储系统中最全、最新的配额信息;A judging module, configured to determine whether the first quota change request exceeds the quota of the first user according to total quota information, the total quota information being the most recent in the distributed object storage system maintained by the quota management device Complete and up-to-date quota information; 应答模块,用于如果确定所述第一配额变化请求未超出所述第一用户的配额,则修改所述总配额信息,并向所述第一服务网关返回第一确认应答消息,以使所述第一服务网关在接收到所述第一确认应答消息时,响应所述第一用户的所述上传请求。A response module, configured to modify the total quota information if it is determined that the first quota change request does not exceed the quota of the first user, and return a first confirmation response message to the first service gateway, so that all When receiving the first confirmation response message, the first service gateway responds to the upload request of the first user. 7.根据权利要求6所述的装置,其特征在于,还包括信息发送模块,用于:7. The device according to claim 6, further comprising an information sending module for: 在达到设定的时间间隔时,将所述总配额信息发送给所述分布式对象存储系统的各个服务网关,以使各个服务网关将接收到的总配额信息作为本地配额信息,用于确定是否响应用户的操作请求。When the set time interval is reached, the total quota information is sent to each service gateway of the distributed object storage system, so that each service gateway uses the received total quota information as local quota information to determine whether to Respond to user requests for operations. 8.根据权利要求6或7所述的装置,其特征在于,还包括通知发送模块,用于:8. The device according to claim 6 or 7, further comprising a notification sending module for: 根据所述总配额信息,如果确定第二用户的配额已用尽,则分别向所述分布式对象存储系统的各个服务网关发送针对所述第二用户的超配额通知。According to the total quota information, if it is determined that the quota of the second user has been exhausted, an over-quota notification for the second user is respectively sent to each service gateway of the distributed object storage system. 9.一种配额管理设备,其特征在于,包括:9. A quota management device, comprising: 存储器,用于存储计算机程序;memory for storing computer programs; 处理器,用于执行所述计算机程序时实现如权利要求1至5任一项所述配额管理方法的步骤。The processor is configured to implement the steps of the quota management method according to any one of claims 1 to 5 when executing the computer program. 10.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至5任一项所述配额管理方法的步骤。10. A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the quota management according to any one of claims 1 to 5 is implemented steps of the method.
CN201911420122.5A 2019-12-31 2019-12-31 A quota management method, device, equipment and storage medium Pending CN111181791A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911420122.5A CN111181791A (en) 2019-12-31 2019-12-31 A quota management method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911420122.5A CN111181791A (en) 2019-12-31 2019-12-31 A quota management method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111181791A true CN111181791A (en) 2020-05-19

Family

ID=70657688

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911420122.5A Pending CN111181791A (en) 2019-12-31 2019-12-31 A quota management method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111181791A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111857595A (en) * 2020-07-22 2020-10-30 浪潮电子信息产业股份有限公司 A quota management method, apparatus, system, and computer-readable storage medium
CN112817765A (en) * 2021-02-08 2021-05-18 北京同有飞骥科技股份有限公司 Distributed object storage bucket quota management method and system based on pre-authorization

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050138162A1 (en) * 2001-05-10 2005-06-23 Brian Byrnes System and method for managing usage quotas
CN101799797A (en) * 2010-03-05 2010-08-11 中国人民解放军国防科学技术大学 Dynamic allocation method of user disk quota in distributed storage system
CN103856536A (en) * 2012-12-05 2014-06-11 腾讯科技(北京)有限公司 Synchronous control method and synchronous control device
CN104158858A (en) * 2014-07-29 2014-11-19 浪潮(北京)电子信息产业有限公司 Method and system for accessing distributed cluster file system
US20150004928A1 (en) * 2013-07-01 2015-01-01 Alcatel-Lucent Usa Inc. Group data plan quota allocation for mobile devices
CN104756442A (en) * 2012-10-17 2015-07-01 阿尔卡特朗讯 Group credit control for wireless networks
CN106326013A (en) * 2016-08-25 2017-01-11 浪潮(北京)电子信息产业有限公司 Disk quota management system and method for distributed file system
CN107172152A (en) * 2017-05-19 2017-09-15 郑州云海信息技术有限公司 One kind counts quota system and method based on CEPH cluster CAP mechanism
CN107682285A (en) * 2017-09-27 2018-02-09 国云科技股份有限公司 A unified resource authorization method for heterogeneous cloud platforms
CN107885859A (en) * 2017-11-20 2018-04-06 郑州云海信息技术有限公司 A kind of method, apparatus and computer-readable recording medium of file number quota
CN109446177A (en) * 2018-11-02 2019-03-08 郑州云海信息技术有限公司 A kind of implementation method and device of distributive catalogue of document system file number quota
CN109995595A (en) * 2019-04-11 2019-07-09 苏州浪潮智能科技有限公司 A method, system, device and computer medium for determining RGW quota

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050138162A1 (en) * 2001-05-10 2005-06-23 Brian Byrnes System and method for managing usage quotas
CN101799797A (en) * 2010-03-05 2010-08-11 中国人民解放军国防科学技术大学 Dynamic allocation method of user disk quota in distributed storage system
CN104756442A (en) * 2012-10-17 2015-07-01 阿尔卡特朗讯 Group credit control for wireless networks
CN103856536A (en) * 2012-12-05 2014-06-11 腾讯科技(北京)有限公司 Synchronous control method and synchronous control device
US20150004928A1 (en) * 2013-07-01 2015-01-01 Alcatel-Lucent Usa Inc. Group data plan quota allocation for mobile devices
CN104158858A (en) * 2014-07-29 2014-11-19 浪潮(北京)电子信息产业有限公司 Method and system for accessing distributed cluster file system
CN106326013A (en) * 2016-08-25 2017-01-11 浪潮(北京)电子信息产业有限公司 Disk quota management system and method for distributed file system
CN107172152A (en) * 2017-05-19 2017-09-15 郑州云海信息技术有限公司 One kind counts quota system and method based on CEPH cluster CAP mechanism
CN107682285A (en) * 2017-09-27 2018-02-09 国云科技股份有限公司 A unified resource authorization method for heterogeneous cloud platforms
CN107885859A (en) * 2017-11-20 2018-04-06 郑州云海信息技术有限公司 A kind of method, apparatus and computer-readable recording medium of file number quota
CN109446177A (en) * 2018-11-02 2019-03-08 郑州云海信息技术有限公司 A kind of implementation method and device of distributive catalogue of document system file number quota
CN109995595A (en) * 2019-04-11 2019-07-09 苏州浪潮智能科技有限公司 A method, system, device and computer medium for determining RGW quota

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111857595A (en) * 2020-07-22 2020-10-30 浪潮电子信息产业股份有限公司 A quota management method, apparatus, system, and computer-readable storage medium
CN112817765A (en) * 2021-02-08 2021-05-18 北京同有飞骥科技股份有限公司 Distributed object storage bucket quota management method and system based on pre-authorization
CN112817765B (en) * 2021-02-08 2024-06-04 北京同有飞骥科技股份有限公司 Distributed object storage barrel quota management method and system based on pre-authorization

Similar Documents

Publication Publication Date Title
CN107948318B (en) Method and system for synchronizing cache among multiple nodes
WO2013078689A1 (en) Method and device for realizing message transfer in cloud message service
CN111181791A (en) A quota management method, device, equipment and storage medium
CN107026879B (en) A data caching method and background application system
CN114745413A (en) Access control method, device, computer equipment and storage medium for server
US12079201B2 (en) Blockchain-based data storage method, related device and storage medium
CN113326100B (en) Cluster management method, device, equipment and computer storage medium
CN112084163B (en) Data writing method and device and computer equipment
CN111586438B (en) Method, device and system for processing service data
CN114625566A (en) Data disaster tolerance method and device, electronic equipment and storage medium
CN113626054A (en) Business service updating method and device
US10063614B2 (en) Method for obtaining a storage identifier in a hierarchical level of storage in a network for storing data
CN110278109B (en) Disaster recovery method and system
CN110221916B (en) Memory capacity expansion method and device, configuration center system and electronic equipment
CN112698783A (en) Object storage method, device and system
CN111756800A (en) A method and system for handling burst traffic
CN108737460B (en) Connection processing method and client
CN110502460B (en) Data processing method and node
CN114490186B (en) Data backup rule distribution method, node, system and storage medium
CN111630500A (en) Information distributed storage system, method, and program
CN111901243B (en) Service request routing method, scheduler and service platform
CN110912953A (en) A file storage system and method
CN108377670A (en) A method for processing services, a service node, a control node and a distributed system
CN116931814A (en) Cloud hard disk capacity expansion method and device, electronic equipment and storage medium
CN114201117A (en) Cache data processing method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200519

RJ01 Rejection of invention patent application after publication