CN112165436B - Flow control method, device and system - Google Patents
Flow control method, device and system Download PDFInfo
- Publication number
- CN112165436B CN112165436B CN202011101957.7A CN202011101957A CN112165436B CN 112165436 B CN112165436 B CN 112165436B CN 202011101957 A CN202011101957 A CN 202011101957A CN 112165436 B CN112165436 B CN 112165436B
- Authority
- CN
- China
- Prior art keywords
- preset
- single connection
- storage area
- target
- state information
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 97
- 230000002159 abnormal effect Effects 0.000 claims abstract description 164
- 238000012545 processing Methods 0.000 claims abstract description 85
- 230000008569 process Effects 0.000 claims abstract description 20
- 230000004044 response Effects 0.000 claims description 20
- 238000004364 calculation method Methods 0.000 claims description 15
- 238000006243 chemical reaction Methods 0.000 claims description 3
- 230000010365 information processing Effects 0.000 claims description 2
- 230000006870 function Effects 0.000 abstract description 10
- 238000007726 management method Methods 0.000 description 50
- 230000005856 abnormality Effects 0.000 description 8
- 230000005540 biological transmission Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 5
- 238000011217 control strategy Methods 0.000 description 5
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000012544 monitoring process Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000007488 abnormal function Effects 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 230000015556 catabolic process Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/25—Flow control; Congestion control with rate being modified by the source upon detecting a change of network conditions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/565—Conversion or adaptation of application format or content
- H04L67/5651—Reducing the amount or size of exchanged application data
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application relates to a flow control method, a flow control device and a flow control system, wherein the flow control method comprises the following steps: in the current period, responding to a service access request aiming at a virtual storage area to be accessed, and determining a target preset storage area corresponding to the virtual storage area to be accessed in a storage cluster; determining target single connection corresponding to the target preset storage area; sending the service access request to the storage cluster through the target single connection; receiving a request fed back by the storage cluster through the target single connection to process abnormal state information; and adjusting the number of service access requests sent to the storage cluster through the target single connection based on at least one piece of request processing abnormal state information fed back through the target single connection in the current period. The flow can be adjusted in real time to avoid abnormal system functions caused by instantaneous high flow, and the flow control granularity is small, so that the accuracy of flow control is improved.
Description
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a flow control method, device, and system.
Background
The requests that the system needs to process are randomly uncontrollable and the processing power of the system is limited, so that the flow needs to be controlled according to the processing power of the system.
The flow control method commonly used in the related art is to assign a QPS (query rate per second) threshold for a specific system service, reject the service or add the request to a waiting queue for uniform processing when the request received by the system exceeds the QPS threshold; some distributed systems also adopt independent flow control modules, configure specific flow thresholds for all clients, monitor the state of the server according to a certain time period, and update the flow thresholds of the clients to realize the pressurizing of the client flow when the server flow is too high or abnormal until the state of the server returns to normal; the existing flow control method has the problems that the response speed is low and the instantaneous flow is difficult to solve due to long flow, and the flow control module controls the whole client generally, so that the flow control is inaccurate due to large flow control granularity.
Disclosure of Invention
The technical problem to be solved by the application is to provide a flow control method, a flow control device and a flow control system, which can adjust the flow in real time to avoid abnormal system functions caused by instantaneous high flow, and the granularity of flow control is small, so that the accuracy of flow control is improved.
In order to solve the above technical problems, in one aspect, the present application provides a flow control method, which may be applied to a flow management end, and the method may include:
in the current period, responding to a service access request aiming at a virtual storage area to be accessed, and determining a target preset storage area corresponding to the virtual storage area to be accessed in a storage cluster; the storage cluster comprises a plurality of preset storage areas;
determining target single connection corresponding to the target preset storage area based on a plurality of preset single connections established between the flow management end and the storage cluster and the corresponding relation between each preset storage area and each preset single connection in the storage cluster;
sending the service access request to the storage cluster through the target single connection;
receiving a request fed back by the storage cluster through the target single connection to process abnormal state information;
and adjusting the number of service access requests sent to the storage cluster through the target single connection based on at least one piece of request processing abnormal state information fed back through the target single connection in the current period.
In another aspect, the present application provides another flow control method, which may be applied to a storage cluster side, where the method may include:
In the current period, receiving a service access request sent by a flow management end through a target single connection;
processing the service access request, and generating request processing abnormal state information based on a processing result of the service access request;
and feeding back the abnormal state information of the request processing to the flow management end through the target single connection, so that the flow management end adjusts the quantity of service access requests sent through the target single connection based on at least one piece of abnormal state information of the request processing fed back through the target single connection in the current period.
In another aspect, the present application provides a flow control device that may include:
the service access request response module is used for responding to a service access request aiming at a virtual storage area to be accessed in a current period, and determining a target preset storage area corresponding to the virtual storage area to be accessed in a storage cluster; the storage cluster comprises a plurality of preset storage areas;
the target single connection determining module is used for determining target single connection corresponding to the target preset storage area based on a plurality of preset single connections established between the traffic management end and the storage cluster and the corresponding relation between each preset storage area and each preset single connection in the storage cluster;
A service access request sending module, configured to send the service access request to the storage cluster through the target single connection;
the state information receiving module is used for receiving the abnormal state information processing request fed back by the storage cluster through the target single connection;
and the flow adjustment module is used for adjusting the number of service access requests sent to the storage cluster through the target single connection based on at least one piece of request processing abnormal state information fed back through the target single connection in the current period.
In another aspect, the present application provides another flow control device, which may include:
the service access request receiving module is used for receiving a service access request sent by the flow management end through the target single connection in the current period;
the state information generation module is used for processing the service access request and generating request processing abnormal state information based on a processing result of the service access request;
and the state information feedback module is used for feeding back the abnormal state information of the request processing to the flow management end through the target single connection, so that the flow management end adjusts the quantity of service access requests sent through the target single connection based on at least one piece of abnormal state information of the request processing fed back through the target single connection in the current period.
In another aspect, the present application provides a flow control system that may include a flow control device as described above.
In another aspect, the present application provides an apparatus comprising a processor and a memory having at least one instruction or at least one program stored therein, the at least one instruction or the at least one program loaded and executed by the processor to implement a flow control method as described above.
In another aspect, the present application provides a computer storage medium having at least one instruction or at least one program stored therein, the at least one instruction or the at least one program loaded by a processor and executed by a flow control method as described above.
The implementation of the embodiment of the application has the following beneficial effects:
in the method, a traffic management end sends a service access request to a storage cluster through target single connection with a target preset storage area; the abnormal state information is processed by receiving the request fed back by the storage cluster through the target single connection, so that the number of service access requests sent to the storage cluster through the target single connection can be adjusted based on the abnormal state information processed by the request fed back by the target single connection in the current period. After a service request is sent to a storage cluster through a target single connection, abnormal state information of request processing sent by the storage cluster through the target single connection can be directly received, so that the abnormal state information of request processing corresponding to the target single connection can be known in real time, corresponding flow adjustment can be timely carried out according to the request state information, service state monitoring and flow adjustment instruction sending are not needed by means of a flow control server, flow control response speed is high, and therefore the problem of instantaneous high flow can be solved, flow adjustment can be carried out in real time, and system function abnormality caused by the instantaneous high flow is avoided; in addition, by sending the access request and receiving the request processing state through the target single connection, independent flow control can be respectively carried out on each single connection, the single connections are not mutually influenced, flow control is not carried out on the whole flow management end, the granularity of flow control is small, and therefore the accuracy of flow control is improved.
Drawings
In order to more clearly illustrate the technical solutions and advantages of embodiments of the present application or of the prior art, the following description will briefly introduce the drawings that are required to be used in the embodiments or the prior art descriptions, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic illustration of an implementation environment provided by an embodiment of the present application;
FIG. 2 is a flow chart of a flow control method provided in an embodiment of the present application;
fig. 3 is a flowchart of a method for determining a target preset storage area according to an embodiment of the present application;
FIG. 4 is a flowchart of another method for determining a target preset storage region according to an embodiment of the present application;
fig. 5 is a flowchart of a method for establishing a correspondence between a preset storage area and a preset single connection according to an embodiment of the present application;
fig. 6 is a flowchart of a method for adjusting the number of service access request transmissions according to an embodiment of the present application;
fig. 7 is a flowchart of another method for adjusting the number of service access request transmissions according to an embodiment of the present application;
Fig. 8 is a flowchart of another method for adjusting the number of service access request transmissions according to an embodiment of the present application;
FIG. 9 is a flow chart of another flow control method provided by an embodiment of the present application;
fig. 10 is a schematic view of a cloud hard disk application scenario provided in an embodiment of the present application;
FIG. 11 is a schematic view of a flow control device according to an embodiment of the present disclosure;
FIG. 12 is a schematic view of another flow control device provided in an embodiment of the present application;
fig. 13 is a schematic view of an apparatus structure according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the present application will be described in further detail with reference to the accompanying drawings. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present application based on the embodiments herein.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or server that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The present application relates to cloud storage technology (cloud storage), which is a new concept that extends and develops in the concept of cloud computing, and a distributed cloud storage system (hereinafter referred to as a storage system for short) refers to a storage system that integrates a large number of storage devices (storage devices are also referred to as storage nodes) of various types in a network to cooperatively work through application software or application interfaces through functions such as cluster application, grid technology, and a distributed storage file system, so as to provide data storage and service access functions for the outside. At present, the storage method of the storage system is as follows: when creating logical volumes, each logical volume is allocated a physical storage space, which may be a disk composition of a certain storage device or of several storage devices. The client stores data on a certain logical volume, that is, the data is stored on a file system, the file system divides the data into a plurality of parts, each part is an object, the object not only contains the data but also contains additional information such as a data Identification (ID) and the like, the file system writes each object into a physical storage space of the logical volume, and the file system records storage position information of each object, so that when the client requests to access the data, the file system can enable the client to access the data according to the storage position information of each object.
Referring to fig. 1, a schematic diagram of an implementation environment provided in an embodiment of the present application is shown, where the implementation environment may include: the client 110, the traffic management end 120 and the storage cluster end 130 may be directly or indirectly connected through wired or wireless communication between the client 110 and the traffic management end 120, and between the traffic management end 120 and the storage cluster end 130, so as to implement data communication.
Specifically, the client 110 may send a service access request to the traffic management end 120; the traffic management end 120 determines a corresponding target single connection according to the received service access request, and sends the service access request to the storage cluster end 130 through the target single connection; the storage cluster end 130 feeds back the abnormal state information of the request processing to the flow management end 120 through the target single connection, and the flow management end 120 adjusts the number of service access requests sent to the storage cluster end 130 through the target single connection according to the abnormal state information of the received request processing.
The client 110 may include: smart phones, tablet computers, notebook computers, digital assistants, intelligent wearable devices, vehicle terminals, servers and other types of physical devices can also comprise virtual machines and the like. The operating system running on the client 110 in the embodiment of the present application may include, but is not limited to, an android system, an IOS system, linux, windows, and the like.
The traffic management end 120 and the storage cluster end 130 may be servers, which may be independent physical servers, or may be a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and basic cloud computing services such as big data and an artificial intelligence platform.
In order to solve the problems of slow response speed caused by long flow of flow control and inaccurate flow control caused by large flow control granularity in the prior art, the embodiment of the present application provides a flow control method, referring specifically to fig. 2, an execution body of the method may be the flow management end in fig. 1, and the method may specifically include:
s210, in a current period, responding to a service access request aiming at a virtual storage area to be accessed, and determining a target preset storage area corresponding to the virtual storage area to be accessed in a storage cluster; the storage cluster comprises a plurality of preset storage areas.
The service access request in this embodiment of the present application may be any type of network access request, when a user needs to perform network access, the user may send, to a traffic management end, a service access request for a virtual storage area to be accessed, where the virtual storage area to be accessed is a virtual storage area specified by the user or a virtual storage area determined according to the service access request of the user, and needs to be corresponding to an actual storage area in a storage cluster, so as to determine a corresponding target preset storage area, and referring to fig. 3, a method for determining the target preset storage area is shown, and may include:
S310, determining a virtual starting address and a virtual ending address of the virtual storage area to be accessed.
S320, converting the virtual starting address and the virtual ending address into an actual starting address and an actual ending address respectively.
S330, determining an actual storage area in the storage cluster based on the actual start address and the actual end address.
S340, determining a preset storage area containing the actual storage area in the storage cluster as the target preset storage area.
Taking the file system access as an example, the corresponding service access request may specifically be a file processing request, and specifically may include a file writing request, a file reading request, a file deleting request, a file copying request, a file cutting request, and the like. When a user plans to read a file from a file system, for example, the user needs to read the file a in the D disc, and can access the D disc and execute a read operation on the file a through the user side, a corresponding file read request can be triggered and sent to the flow management side, where the virtual area to be accessed can be a virtual storage area corresponding to a virtual disk (for example, the D disc), or can be a virtual storage area corresponding to the file to be accessed (for example, the file a), and a virtual start address and a virtual end address of the virtual storage area to be accessed can be determined correspondingly. The D-disc can be regarded as a virtual disc, which is a disc identifier for showing a storage location to a user, and is not an actual storage hard disc; the file a is not an actual file, but is a file identifier corresponding to the file a, and the actual file a is stored in the storage cluster.
According to the corresponding relation between the preset virtual address and the actual address, the virtual starting address and the virtual ending address can be converted into the actual starting address and the actual ending address in the storage cluster, so that the corresponding actual storage area is determined in the storage cluster according to the actual starting address and the actual ending address, and the preset storage area comprising the actual storage area is determined as the target preset storage area, namely the size of the actual storage area is smaller than or equal to the size of the target preset storage area.
In fig. 3, the corresponding target preset storage area is determined directly based on the correspondence between the virtual address and the actual address, and the service access request sent by the user for the virtual storage area to be accessed may further include a service type, and in the specific implementation process, the target preset storage area may also be determined by combining the service type, referring to fig. 4, another method for determining the target preset storage area is shown, and the method may include:
s410, determining a target area corresponding to a service type in a storage cluster based on the service type in a service access request aiming at a virtual storage area to be accessed, wherein the target area comprises at least one preset storage area.
S420, determining an actual storage area in the storage cluster based on a preset corresponding relation between the virtual address and the actual address in the target area.
S430, determining a preset storage area containing the actual storage area as a target preset storage area corresponding to the virtual storage area to be accessed.
The method for determining the virtual address is identical to the method in fig. 3, and is not described herein; for the method for determining the target preset storage area by combining the service types, the method corresponds to the situation that the target preset storage area is stored in the storage cluster according to different service types in a regional mode in specific implementation, and the different service types correspond to different preset storage areas.
After determining the target preset storage area, determining the service content to be accessed specifically included in the service access request from the target preset storage area according to the corresponding service identifier; for example, in the above example, if the file a needs to be read, after determining the target preset storage area corresponding to the virtual storage area, the storage cluster side may read the file a from the target preset storage area according to the identification information of the file a and return the file a to the traffic management side, and then the traffic management side returns the file a to the user side.
S220, determining target single connection corresponding to the target preset storage area based on a plurality of preset single connections established between the flow management end and the storage cluster and the corresponding relation between each preset storage area and each preset single connection in the storage cluster.
The single connection in the embodiments of the present application may refer to an end-to-end single network connection; a plurality of preset single connections can be established in advance between the flow management end and the storage cluster, each preset storage area in the storage cluster is provided with a preset single connection corresponding to the preset single connection, and one preset single connection can correspond to one or a plurality of preset storage areas; referring to fig. 5, a method for establishing a correspondence between a preset storage area and a preset single connection is shown, which may include:
s510, setting a service type corresponding to each preset storage area in the storage cluster.
Typically, each preset storage area is set to correspond to the same service type.
S520, distributing corresponding preset single connection for each service type based on a plurality of preset single connections between the flow management end and the storage cluster.
For different preset single connections, they may have different connection interfaces, different routes, different network conditions, etc., so that for each service type, it is possible to adapt the corresponding preset single connection; for example, for a service type with high processing requirements, a preset single connection with better network connection conditions can be allocated to the service type, and for a service type with low processing requirements, a preset single connection with general network connection conditions can be allocated to the service type; therefore, proper preset single connection can be allocated for different types of services as required, and the service efficiency is improved under the condition that normal service is not affected.
S530, determining preset single connection corresponding to each preset storage area based on the service type corresponding to each preset storage area.
S540, based on each preset storage area and the preset single connection corresponding to each preset storage area, establishing a corresponding relation between each preset storage area and each preset single connection in the storage cluster.
Taking the above access file system as an example, the service type may be specifically a file type, and the file type in the embodiment of the present application may include, but is not limited to: video files, audio files, picture files, text files, executable files, etc.; files of the same file type can be stored in the same preset storage area, the condition that a plurality of preset storage areas store files of the same type can exist, the preset storage areas storing files of different file types can correspond to different preset single connections, and accordingly the corresponding relation between each preset storage area and each preset single connection is established.
S230, the service access request is sent to the storage cluster through the target single connection.
S240, receiving a request fed back by the storage cluster through the target single connection to process abnormal state information.
After the traffic management end sends each service access request to the storage cluster, the traffic management end receives the request processing state information of the service access request fed back by the storage cluster based on the corresponding target single connection, wherein the request processing state information may be request processing normal state information or request processing abnormal state information; the method and the device are used for carrying out subsequent related operations based on the request processing abnormal state information.
S250, based on at least one piece of request processing abnormal state information fed back through the target single connection in the current period, the number of service access requests sent to the storage cluster through the target single connection is adjusted.
Since the number of service access requests received by the traffic management end may be one or more in the current period, the number of target single connections determined accordingly may be one or more, and the number of target single connections determined may be less than or equal to the number of received service access requests.
Referring to fig. 6, a method for adjusting the number of service access requests sent is shown, where the request processing abnormal state information includes first type abnormal state information related to the processing state of the storage cluster; the method specifically comprises the following steps:
s610, counting the number of items of the first type abnormal state information belonging to each abnormal level in the current period according to the preset abnormal level classification information of the first type abnormal state information.
For example, the abnormal ranks may be classified into rank 1, rank 2, … …, rank N, each having a rank index corresponding thereto; the first type abnormal state information in the current period also has corresponding indexes, and through index matching, the abnormal grade of each first type abnormal state information can be determined, so that the number of items of the first type abnormal state belonging to each abnormal grade can be counted. Taking the first type of abnormal state information as an example of request response time delay height, the corresponding grade index can be a specific response time delay length, such as a plurality of grades of 10 ms/100 ms/1000 ms and the like; when the abnormality level is specifically determined, it may be determined that the level corresponding to the level index closest to the index of the current item of first-type state information is the abnormality level to which the current item of first-type state information belongs.
It should be noted that the first type abnormal state information may also include a plurality of different types of first type abnormal state information, and when the processing is specifically performed, the number of items belonging to each abnormal level may be counted for each type of first type abnormal state information.
S620, weighting and calculating based on the number of items of the first type abnormal state information belonging to each abnormal level in the current period and the weight corresponding to the abnormal level to obtain a first state value.
When the first type abnormal state information comprises first type abnormal state information, weighting and calculating according to the number of items of the first type abnormal state information belonging to each abnormal level and the weight of the corresponding abnormal level to obtain a first state value; when the first type abnormal state information comprises a plurality of first type abnormal state information, respectively calculating first state values corresponding to each type of first type abnormal state information based on the method, so that a plurality of first state values can be obtained, and performing preset calculation on the plurality of first state values to obtain a final first state value; the specific preset calculation may be an average calculation, a weighted sum calculation, or the like.
S630, matching the first state value with first thresholds of a plurality of levels, and determining a target first threshold matched with the first state value; wherein the first state value is greater than or equal to the target first threshold.
The target first threshold value here may specifically be a threshold value that is smaller than the first state value and closest to the first state value.
S640, determining a first descending gradient corresponding to the target first threshold, and reducing the number of service access requests sent to the storage cluster through the target single connection in a preset time period based on the first descending gradient.
For each level of the first threshold, there will be a corresponding gradient of decrease and increase, and since the current step is performed after the request to process the abnormal state information is initially received, there is no request to process the abnormal state information before, so the current period can be regarded as an initial period, at this time, the flow needs to be decreased on an original basis, and thus a gradient of decrease corresponding to the target first threshold needs to be determined. Specifically, the number of service access request transmissions in the preset time period may be adjusted based on the preset number of service access request transmissions and the first descent gradient.
After a service access request is sent to a storage cluster through a target single connection, according to first type abnormal state information fed back by the storage cluster through the target single connection, the number of the service access requests sent to the storage cluster through the target single connection in a preset time period can be timely adjusted, so that the condition of abnormal system functions caused by long instantaneous flow of a flow control process can be avoided; in addition, for different target single connections, the adjustment of the service access request quantity can be performed by the same method, all the target single connections are not affected, and the adjustment of the service access request quantity based on the single connection enables the flow control granularity to be small, so that the flow control effect is improved.
After the number of service access requests sent in the current period is adjusted, the next period is based on the adjustment details of the current period and the abnormal state information of the requests received in the next period, and the number of service access requests sent to the storage cluster in the preset time period is adjusted again; referring specifically to fig. 7, another method for adjusting the number of service access request transmissions is shown, where the method may include:
s710, counting the number of items of first type abnormal state information belonging to each abnormal level in the next period according to the preset abnormal level classification information of the first type abnormal state information in the next period.
S720, carrying out weighted sum calculation based on the number of items of the first type abnormal state information belonging to each abnormal level in the next period and the weight corresponding to the abnormal level to obtain a second state value.
The calculation method of the second state value is the same as the calculation method of the first state value, and will not be described herein.
S730, when the second state value is smaller than the target first threshold, matching the second state value with the first thresholds of a plurality of levels, and determining a target second threshold matched with the second state value; wherein the second state value is less than the target second threshold.
And comparing the second state value with the target first threshold value, and when the second state value is smaller than the target first threshold value, indicating that the abnormal state occurs in the period to be relieved, and then, carrying out threshold matching again to determine the target second threshold value.
The target second threshold value here may specifically be a threshold value that is greater than and closest to the second state value.
S740, determining a first lifting gradient corresponding to the target second threshold value, and increasing the number of service access requests sent to the storage cluster through the target single connection in a preset time period based on the first lifting gradient.
Since the abnormal state is relieved, the number of the service requests to be sent can be properly increased, so that the lifting gradient corresponding to the target second threshold value needs to be determined; specifically, the number of service access request transmissions in the preset time period may be adjusted based on the number of service access request transmissions adjusted in the previous period and the first lifting gradient.
After the service access request sending number in the preset time period is adjusted, the abnormal state can be monitored in the next period, whether the abnormal state is relieved or not is determined, and when the abnormal state is relieved, the service access request sending number in the preset time period can be properly improved based on a corresponding flow control adjustment strategy in order to ensure the service request processing efficiency; when no alleviation is performed, the number of service access requests sent in a preset time period can be further reduced based on a corresponding flow control adjustment strategy, so that normal operation of a service system is ensured to avoid the situation of system breakdown, and the method can be specifically realized as shown in fig. 6.
Referring to fig. 8, a further method for adjusting the number of service access requests sent is shown, where the request for processing abnormal status information includes abnormal status information of a second type related to the service access request, and specifically the method may include:
S810, when the second type abnormal state information is received, the number of service access requests sent to the storage cluster through the target single connection in a preset time period is adjusted to a first preset number.
S820, after the number of service access requests to be sent to the storage cluster through the target single connection in the preset time period is adjusted to the preset number, when the number of items continuously receiving normal state information reaches a second preset number, increasing the number of service access requests sent to the storage cluster through the target single connection based on a second lifting gradient.
In the specific implementation process, as long as the flow management end receives the information of the second type abnormal state through the target single connection, the sending quantity of the service access requests is directly adjusted to the first preset quantity; and subsequently, when the second preset number of requests for processing the normal state information items are continuously received, the service access request sending number in the preset time period is properly increased according to the corresponding flow control adjustment strategy.
By the method for adjusting the sending number of the service access requests shown in fig. 8, real-time reaction can be performed according to the currently received second type abnormal state, so that the sending number of the service access requests in a preset time period after the current time node can be timely adjusted.
The embodiment of the present application further provides another flow control method, where the execution body may be a storage cluster end in fig. 1, and the method may specifically include:
s910, in the current period, receiving a service access request sent by the flow management terminal through the target single connection.
S920, processing the service access request, and generating request processing abnormal state information based on a processing result of the service access request.
According to the processing result of the service access request, the corresponding request processing abnormal state information, such as first type abnormal state information related to the processing state of the storage cluster or second type abnormal state information related to the service access request, can be determined.
S930, feeding back the abnormal state information of the request processing to the flow management end through the target single connection, so that the flow management end adjusts the number of service access requests sent through the target single connection based on at least one piece of abnormal state information of the request processing fed back through the target single connection in the current period.
The flow from the flow management end to the storage cluster end can be controlled through the interaction between the flow management end and the storage cluster end. The storage cluster end processes the service access request sent by the flow management end through the target single connection, and feeds back corresponding request processing abnormal state information through the target single connection, so that the flow management end determines a corresponding flow control strategy according to the received request processing abnormal state information, and the number of the service access requests sent to the storage cluster end through the target single connection is adjusted.
The storage cluster processes the abnormal state information through the target single connection feedback request, so that the flow management end can timely adjust the number of service access requests sent to the storage cluster through the target single connection within a preset time period, and the system function abnormality caused by long instantaneous flow of the flow control process can be avoided; in addition, for different target single connections, the adjustment of the service access request quantity can be performed by the same method, all the target single connections are not affected, and the adjustment of the service access request quantity based on the single connection enables the flow control granularity to be small, so that the flow control effect is improved.
The present application may be applied to various distributed cluster related scenarios, and in the following, a cloud hard disk application scenario is specifically taken as an example to describe a specific implementation flow of the present application, please refer to fig. 10, which shows a schematic diagram of a cloud hard disk application scenario, where a cloud hard disk client is the traffic management end in this embodiment, the cloud hard disk client provides a cloud hard disk for a virtual machine to use, the virtual machine initiates an IO (Input/Output) read/write request to a cloud hard disk vdisk1, and the cloud hard disk client finds a specific connection with a storage cluster, such as connection 1, after receiving the IO read/write request, and issues the IO read/write request; if the storage machine 1 corresponding to the connection 1 has the abnormality of insufficient resources and the like due to excessive requests and the like in the process of processing the IO read-write request, the related error code is returned; if the cloud hard disk client side detects that the corresponding connection returns an error code or the request delay is high, the flow threshold of the corresponding connection is reduced, and the purpose of controlling the flow in real time is achieved; after a period of time, such as 100ms, there is no error code and the time delay is normal, the flow threshold is slowly recovered, so as to prevent frequent jitter of IO.
For each connection, carrying out state monitoring every time a request is initiated, detecting whether state abnormality exists when the request is responded, and triggering a corresponding flow control strategy for the connection if the state abnormality exists; specifically, some negative feedback states and corresponding flow control strategies can be defined, and of course, the negative feedback states and the corresponding flow control strategies can be appropriately added or deleted according to the actual service conditions.
The negative feedback state may include:
1. the request response delay is high: a request is defined as Gao Shiyan if it varies by more than 10ms from initiation to response; the high delay is classified into a plurality of grades such as 10 ms/100 ms/1000 ms.
2. The server-side available resources are below a threshold: if the storage cluster end with excessive requests already uses a lot of caches, the residual cache resources are lower than the original 5%; the CPU of a specific key thread of the storage cluster terminal occupies more than 90 percent; the utilization rate of the hard disk used by the server side is continuously 100%, and the service response time delay is continuously at a higher level.
3. Storage cluster side processing request timeout: the storage cluster side monitors each incoming request by using a timeout mechanism to determine whether the request is overtime, possibly due to excessive number in the request queue of the storage cluster side or timeout caused by the fact that a new incoming request is not processed due to a large number of retry operations in the storage cluster side.
4. Request errors: the storage cluster side recognizes that the request format is not right, has no authority and is out of limit, and returns a request error message.
5. The requested resource is busy: if the disk is in a busy state, the disk is abnormal and the request cannot be processed, and the state is returned.
Wherein the feedback states 1, 2, 3 can be regarded as first type of abnormal state information related to the processing state of the storage cluster, and the feedback states 4, 5 can be regarded as second type of abnormal state information related to the service access request.
The flow control strategy may include:
1. for any one of the states 1, 2 and 3 of the negative feedback state, counting the number cnt and severity of the abnormal state in a plurality of seconds (such as higher request response delay, higher severity weight, etc.), setting a threshold as threshold, and reducing the flow threshold of the connection as half of the original flow threshold when cnt is equal to weight > = threshold; when the next period cnt is weight < threshold, the flow threshold is slowly restored, for example, the flow threshold is lifted by 50% once; there may be multiple levels of threshold, with different thresholds for different threshold lowering and lifting steps.
2. For the serious error states of 4 and 5 in the negative feedback states, the flow threshold is directly reduced to be very low as 1, then the flow threshold is slowly restored according to the feedback state of the subsequent request, and if the subsequent request continues to be normal for a plurality of times, the flow threshold is lifted by a certain gradient such as 20%.
In the cloud hard disk application scene, the cloud hard disk client actively adjusts the flow threshold value of the corresponding single connection by using the feedback state information such as the message code or the delay of the response of the corresponding single connection through the storage cluster terminal, for example, the flow control method provided by the embodiment of the application can achieve flow shrinkage response of 100ms level, compared with the flow control response of the second level or even higher delay of the independent flow control system in the prior art, the flow control method in the application has faster flow control response speed, thereby solving the problem of instantaneous high flow, and achieving the purpose of adjusting the flow in real time to avoid the problems of abnormal function of the server, frequent jitter of QPS and the like caused by the scene of the instantaneous high flow and the like.
In the method, a traffic management end sends a service access request to a storage cluster through target single connection with a target preset storage area; the abnormal state information is processed by receiving the request fed back by the storage cluster through the target single connection, so that the number of service access requests sent to the storage cluster through the target single connection can be adjusted based on the abnormal state information processed by the request fed back by the target single connection in the current period. After a service request is sent to a storage cluster through a target single connection, abnormal state information of request processing sent by the storage cluster through the target single connection can be directly received, so that the abnormal state information of request processing corresponding to the target single connection can be known in real time, corresponding flow adjustment can be timely carried out according to the request state information, service state monitoring and sending of a flow adjustment instruction do not need to be carried out by means of a flow control server, flow control response speed is high, and flow adjustment can be carried out in real time to avoid system function abnormality caused by instantaneous high flow; in addition, by sending the access request and receiving the request processing state through the target single connection, independent flow control can be respectively carried out on each single connection, the single connections are not mutually influenced, flow control is not carried out on the whole flow management end, the granularity of flow control is small, and therefore the accuracy of flow control is improved.
The embodiment of the present application further provides a flow control device, which may be applied to a flow management end, referring specifically to fig. 11, and the device may include:
a service access request response module 1110, configured to determine, in a current period, a target preset storage area in a storage cluster corresponding to a virtual storage area to be accessed in response to a service access request for the virtual storage area to be accessed; the storage cluster comprises a plurality of preset storage areas;
the target single connection determining module 1120 is configured to determine a target single connection corresponding to the target preset storage area based on a plurality of preset single connections established between the traffic management end and the storage cluster, and a correspondence between each preset storage area in the storage cluster and each preset single connection;
a service access request sending module 1130, configured to send the service access request to the storage cluster through the target single connection;
a status information receiving module 1140, configured to receive a request for processing abnormal status information fed back by the storage cluster through the target single connection;
a flow adjustment module 1150, configured to adjust the number of service access requests sent to the storage cluster through the target single connection based on at least one of the request processing abnormal state information fed back through the target single connection in the current period.
Wherein, the service access request response module 1110 includes:
the virtual address determining module is used for determining a virtual starting address and a virtual ending address of the virtual storage area to be accessed;
the address conversion module is used for converting the virtual starting address and the virtual ending address into an actual starting address and an actual ending address respectively;
an actual storage area determining module, configured to determine an actual storage area in the storage cluster based on the actual start address and the actual end address;
the target preset storage area determining module is used for determining a preset storage area containing the actual storage area in the storage cluster as the target preset storage area.
Further, the apparatus may further include:
the service type setting module is used for setting the service type corresponding to each preset storage area in the storage cluster;
the preset single connection allocation module is used for allocating corresponding preset single connection for each service type based on a plurality of preset single connections between the flow management end and the storage cluster;
the first determining module is used for determining preset single connection corresponding to each preset storage area based on the service type corresponding to the preset storage area;
The corresponding relation establishing module is used for establishing the corresponding relation between each preset storage area and each preset single connection in the storage cluster based on each preset storage area and the preset single connection corresponding to each preset storage area.
The request processing abnormal state information comprises first type abnormal state information related to the processing state of the storage cluster; the flow adjustment module 1150 may thus include:
the first statistics module is used for respectively counting the number of items of the first type abnormal state information belonging to each abnormal level in the current period according to the preset abnormal level classification information of the first type abnormal state information;
the first calculation module is used for carrying out weighted sum calculation based on the number of items of the first type of abnormal state information belonging to each abnormal level in the current period and the weight corresponding to the abnormal level to obtain a first state value;
the first threshold determining module is used for matching the first state value with first thresholds of a plurality of levels and determining a target first threshold matched with the first state value; wherein the first state value is greater than or equal to the target first threshold;
the first adjustment module is used for determining a first descending gradient corresponding to the target first threshold value, and reducing the number of service access requests sent to the storage cluster through the target single connection in a preset time period based on the first descending gradient.
Further, the apparatus may further include:
the second statistics module is used for respectively counting the number of items of the first type abnormal state information belonging to each abnormal level in the next period according to the preset abnormal level division information of the first type abnormal state information in the next period;
the second calculation module is used for carrying out weighted sum calculation based on the number of items of the first type abnormal state information belonging to each abnormal grade and the weight corresponding to the abnormal grade in the next period to obtain a second state value;
a second threshold determining module, configured to, when the second state value is smaller than the target first threshold, match the second state value with a plurality of levels of first thresholds, and determine a target second threshold that matches the second state value; wherein the second state value is less than the target second threshold;
and the second adjusting module is used for determining a first lifting gradient corresponding to the target second threshold value, and increasing the number of service access requests sent to the storage cluster through the target single connection in a preset time period based on the first lifting gradient.
The request processing abnormal state information comprises second type abnormal state information related to the service access request; the flow adjustment module 1150 may thus further comprise:
the third adjusting module is used for adjusting the number of service access requests sent to the storage cluster through the target single connection within a preset time period to a first preset number when the second type abnormal state information is received;
and the fourth adjustment module is used for increasing the number of service access requests sent to the storage cluster through the target single connection based on a second lifting gradient when the number of items continuously receiving the request for processing the normal state information reaches a second preset number after the number of service access requests sent to the storage cluster through the target single connection in the preset time period is adjusted to the preset number.
The embodiment of the present application further provides another flow control device, which may be applied to a storage cluster, referring to fig. 12, and the device may include:
a service access request receiving module 1210, configured to receive, in a current period, a service access request sent by a traffic management end through a target single connection;
a state information generating module 1220, configured to process the service access request, and generate request processing abnormal state information based on a processing result of the service access request;
The state information feedback module 1230 is configured to feed back the abnormal state information for processing the request to the flow management end through the target single connection, so that the flow management end adjusts the number of service access requests sent through the target single connection based on at least one piece of abnormal state information for processing the request fed back through the target single connection in the current period.
The device provided in the above embodiment can execute the corresponding method in the embodiment of the application, and has the corresponding functional module and beneficial effects of executing the method. Technical details not described in detail in the above embodiments may be found in the methods provided in any of the embodiments of the present application.
The embodiment of the application also provides a flow control system, which can comprise a flow management end and a storage cluster end, wherein the flow management end can comprise the flow control device in fig. 11, and the storage cluster end can comprise the flow control device in fig. 12.
The present application also provides a computer readable storage medium having at least one instruction or at least one program stored therein, where the at least one instruction or the at least one program is loaded by a processor and executed by any of the methods according to the present embodiments.
Embodiments of the present application also provide a computer program product or computer program comprising computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform any of the methods described above for the present embodiment.
The present embodiment also provides an apparatus, see fig. 13 for a block diagram, where the apparatus 1300 may vary greatly in configuration or performance, and may include one or more central processing units (central processing units, CPU) 1322 (e.g., one or more processors) and memory 1332, one or more storage media 1330 (e.g., one or more mass storage devices) storing applications 1342 or data 1344. Wherein the memory 1332 and the storage medium 1330 may be transitory or persistent. The program stored on the storage medium 1330 may include one or more modules (not shown), each of which may include a series of instruction operations on the device. Further, central processor 1322 may be configured to communicate with storage medium 1330, executing a series of instruction operations on device 1300 in storage medium 1330. The device 1300 may also include one or more power supplies 1326, one or more wired or wireless network interfaces 1350, one or more input/output interfaces 1358, and/or one or more operating systems 1341, e.g., windows Server TM ,Mac OS X TM ,Unix TM ,Linux TM ,FreeBSD TM Etc. Any of the methods described above for this embodiment may be implemented based on the apparatus shown in fig. 13.
The present specification provides method operational steps as described in the examples or flowcharts, but may include more or fewer operational steps based on conventional or non-inventive labor. The steps and sequences recited in the embodiments are merely one manner of performing the sequence of steps and are not meant to be exclusive of the sequence of steps performed. In actual system or interrupt product execution, the methods illustrated in the embodiments or figures may be performed sequentially or in parallel (e.g., in the context of parallel processors or multi-threaded processing).
The structures shown in this embodiment are only partial structures related to the present application and do not constitute limitations of the apparatus to which the present application is applied, and a specific apparatus may include more or less components than those shown, or may combine some components, or may have different arrangements of components. It should be understood that the methods, apparatuses, etc. disclosed in the embodiments may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, and the division of the modules is merely a division of one logic function, and may be implemented in other manners, such as multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or unit modules.
Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
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 elements and steps are described above generally in terms of functionality in order to clearly illustrate the 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 solution. 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 above embodiments are merely for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.
Claims (15)
1. A flow control method, applied to a flow management end, comprising:
in the current period, responding to a service access request aiming at a virtual storage area to be accessed, and determining a target preset storage area corresponding to the virtual storage area to be accessed in a storage cluster; the storage cluster comprises a plurality of preset storage areas;
setting a service type corresponding to each preset storage area in the storage cluster;
based on a plurality of preset single connections between the traffic management end and the storage cluster, distributing corresponding preset single connections for each service type;
determining preset single connection corresponding to each preset storage area based on the service type corresponding to each preset storage area;
Based on each preset storage area and preset single connection corresponding to each preset storage area, establishing a corresponding relation between each preset storage area and each preset single connection in the storage cluster;
determining target single connection corresponding to the target preset storage area based on a plurality of preset single connections established between the flow management end and the storage cluster and the corresponding relation between each preset storage area and each preset single connection in the storage cluster;
sending the service access request to the storage cluster through the target single connection;
receiving a request fed back by the storage cluster through the target single connection to process abnormal state information;
and adjusting the number of service access requests sent to the storage cluster through the target single connection based on at least one piece of request processing abnormal state information fed back through the target single connection in the current period.
2. The flow control method according to claim 1, wherein determining a target preset storage area in the storage cluster corresponding to the virtual storage area to be accessed includes:
determining a virtual starting address and a virtual ending address of the virtual storage area to be accessed;
Converting the virtual starting address and the virtual ending address into an actual starting address and an actual ending address respectively;
determining an actual storage area in the storage cluster based on the actual start address and the actual end address;
and determining a preset storage area containing the actual storage area in the storage cluster as the target preset storage area.
3. The flow control method of claim 1, wherein the request processing exception state information comprises a first type of exception state information related to the storage cluster processing state;
the adjusting the number of service access requests sent to the storage cluster through the target single connection based on the abnormal state information of at least one request processing fed back through the target single connection in the current period comprises:
according to the preset abnormal grade classification information of the first type abnormal state information, counting the number of items of the first type abnormal state information belonging to each abnormal grade in the current period respectively;
weighting and calculating based on the number of items of the first type abnormal state information belonging to each abnormal level in the current period and the weight corresponding to the abnormal level to obtain a first state value;
Matching the first state value with first thresholds of a plurality of levels, and determining a target first threshold matched with the first state value; wherein the first state value is greater than or equal to the target first threshold;
determining a first descending gradient corresponding to the target first threshold value, and reducing the number of service access requests sent to the storage cluster through the target single connection in a preset time period based on the first descending gradient.
4. The flow control method according to claim 3, wherein adjusting the number of service access requests sent to the storage cluster over the target single connection based on at least one of the request handling exception status information fed back over the target single connection in the current period further comprises:
in the next period of the current period, counting the number of items of first type abnormal state information belonging to each abnormal level in the next period according to the preset abnormal level classification information of the first type abnormal state information;
weighting and calculating based on the number of items of the first type abnormal state information belonging to each abnormal level in the next period and the weight corresponding to the abnormal level to obtain a second state value;
When the second state value is smaller than the target first threshold value, matching the second state value with a plurality of levels of first threshold values, and determining a target second threshold value matched with the second state value; wherein the second state value is less than the target second threshold;
determining a first lifting gradient corresponding to the target second threshold value, and increasing the number of service access requests sent to the storage cluster through the target single connection in a preset time period based on the first lifting gradient.
5. The flow control method according to claim 1, wherein the request processing abnormal state information includes second type abnormal state information related to the service access request;
the adjusting the number of service access requests sent to the storage cluster through the target single connection based on the abnormal state information of at least one request processing fed back through the target single connection in the current period comprises:
when the second type abnormal state information is received, the number of service access requests sent to the storage cluster through the target single connection in a preset time period is adjusted to a first preset number;
After the number of service access requests to be sent to the storage cluster through the target single connection in the preset time period is adjusted to a preset number, when the number of items continuously receiving the request for processing the normal state information reaches a second preset number, the number of service access requests to be sent to the storage cluster through the target single connection is increased based on a second lifting gradient.
6. A flow control method, applied to a storage cluster, comprising:
in the current period, receiving a service access request sent by a flow management end through a target single connection; the target single connection is determined based on a plurality of preset single connections and the corresponding relation between each preset storage area and each preset single connection in the storage cluster; the method for determining the corresponding relation comprises the following steps: setting a service type corresponding to each preset storage area in the storage cluster end; based on a plurality of preset single connections between the traffic management end and the storage cluster end, corresponding preset single connections are distributed for each service type; determining preset single connection corresponding to each preset storage area based on the service type corresponding to each preset storage area; based on each preset storage area and preset single connection corresponding to each preset storage area, establishing a corresponding relation between each preset storage area and each preset single connection in the storage cluster;
Processing the service access request, and generating request processing abnormal state information based on a processing result of the service access request;
and feeding back the abnormal state information of the request processing to the flow management end through the target single connection, so that the flow management end adjusts the quantity of service access requests sent through the target single connection based on at least one piece of abnormal state information of the request processing fed back through the target single connection in the current period.
7. A flow control device, comprising:
the service access request response module is used for responding to a service access request aiming at a virtual storage area to be accessed in a current period, and determining a target preset storage area corresponding to the virtual storage area to be accessed in a storage cluster; the storage cluster comprises a plurality of preset storage areas;
the service type setting module is used for setting the service type corresponding to each preset storage area in the storage cluster;
the preset single connection distribution module is used for distributing corresponding preset single connection for each service type based on a plurality of preset single connections between the flow management end and the storage cluster;
The first determining module is used for determining preset single connection corresponding to each preset storage area based on the service type corresponding to the preset storage area;
the corresponding relation establishing module is used for establishing corresponding relation between each preset storage area and each preset single connection in the storage cluster based on each preset storage area and the preset single connection corresponding to each preset storage area;
the target single connection determining module is used for determining target single connection corresponding to the target preset storage area based on a plurality of preset single connections established between the traffic management end and the storage cluster and the corresponding relation between each preset storage area and each preset single connection in the storage cluster;
a service access request sending module, configured to send the service access request to the storage cluster through the target single connection;
the state information receiving module is used for receiving the abnormal state information processing request fed back by the storage cluster through the target single connection;
and the flow adjustment module is used for adjusting the number of service access requests sent to the storage cluster through the target single connection based on at least one piece of request processing abnormal state information fed back through the target single connection in the current period.
8. The apparatus of claim 7, wherein the service access request response module comprises:
the virtual address determining module is used for determining a virtual starting address and a virtual ending address of the virtual storage area to be accessed;
the address conversion module is used for converting the virtual starting address and the virtual ending address into an actual starting address and an actual ending address respectively;
an actual storage area determining module, configured to determine an actual storage area in the storage cluster based on the actual start address and the actual end address;
the target preset storage area determining module is used for determining a preset storage area containing the actual storage area in the storage cluster as the target preset storage area.
9. The apparatus of claim 7, wherein the request to process abnormal state information comprises a first type of abnormal state information related to the storage cluster processing state; the flow adjustment module includes:
the first statistics module is used for respectively counting the number of items of the first type abnormal state information belonging to each abnormal level in the current period according to the preset abnormal level classification information of the first type abnormal state information;
The first calculation module is used for carrying out weighted sum calculation based on the number of items of the first type of abnormal state information belonging to each abnormal level in the current period and the weight corresponding to the abnormal level to obtain a first state value;
the first threshold determining module is used for matching the first state value with first thresholds of a plurality of levels and determining a target first threshold matched with the first state value; wherein the first state value is greater than or equal to the target first threshold;
the first adjustment module is used for determining a first descending gradient corresponding to the target first threshold value, and reducing the number of service access requests sent to the storage cluster through the target single connection in a preset time period based on the first descending gradient.
10. The apparatus of claim 8, wherein the apparatus further comprises:
the second statistics module is used for respectively counting the number of items of the first type abnormal state information belonging to each abnormal level in the next period according to the preset abnormal level division information of the first type abnormal state information in the next period;
the second calculation module is used for carrying out weighted sum calculation based on the number of items of the first type abnormal state information belonging to each abnormal grade and the weight corresponding to the abnormal grade in the next period to obtain a second state value;
The second threshold determining module is used for matching the second state value with the first thresholds of a plurality of levels when the second state value is smaller than the target first threshold, and determining a target second threshold matched with the second state value; wherein the second state value is less than the target second threshold;
and the second adjusting module is used for determining a first lifting gradient corresponding to the target second threshold value, and increasing the number of service access requests sent to the storage cluster through the target single connection in a preset time period based on the first lifting gradient.
11. The apparatus of claim 7, wherein the request to process abnormal state information comprises a second type of abnormal state information associated with the service access request; the flow adjustment module includes:
the third adjusting module is used for adjusting the number of service access requests sent to the storage cluster through the target single connection within a preset time period to a first preset number when the second type abnormal state information is received;
and the fourth adjustment module is used for increasing the number of service access requests sent to the storage cluster through the target single connection based on a second lifting gradient when the number of items continuously receiving the request for processing the normal state information reaches a second preset number after the number of service access requests sent to the storage cluster through the target single connection in the preset time period is adjusted to the preset number.
12. A flow control device, comprising:
the service access request receiving module is used for receiving a service access request sent by the flow management end through the target single connection in the current period; the target single connection is determined based on the corresponding relation between each preset storage area in the storage cluster end and each preset single connection; the method for determining the corresponding relation comprises the following steps: setting a service type corresponding to each preset storage area in the storage cluster end; based on a plurality of preset single connections between the traffic management end and the storage cluster end, corresponding preset single connections are distributed for each service type; determining preset single connection corresponding to each preset storage area based on the service type corresponding to each preset storage area; based on each preset storage area and preset single connection corresponding to each preset storage area, establishing a corresponding relation between each preset storage area and each preset single connection in the storage cluster;
the state information generation module is used for processing the service access request and generating request processing abnormal state information based on a processing result of the service access request;
And the state information feedback module is used for feeding back the abnormal state information of the request processing to the flow management end through the target single connection, so that the flow management end adjusts the quantity of service access requests sent through the target single connection based on at least one piece of abnormal state information of the request processing fed back through the target single connection in the current period.
13. A flow control system, comprising:
a flow control device according to any one of claims 7 to 11, and a flow control device according to claim 12.
14. A computer device comprising a processor and a memory, wherein the memory has stored therein at least one instruction or at least one program that is loaded and executed by the processor to implement the flow control method of any of claims 1-5 or the flow control method of claim 6.
15. A computer storage medium having stored therein at least one instruction or at least one program loaded by a processor and performing the flow control method of any one of claims 1-5 or the flow control method of claim 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011101957.7A CN112165436B (en) | 2020-10-15 | 2020-10-15 | Flow control method, device and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011101957.7A CN112165436B (en) | 2020-10-15 | 2020-10-15 | Flow control method, device and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112165436A CN112165436A (en) | 2021-01-01 |
CN112165436B true CN112165436B (en) | 2024-02-20 |
Family
ID=73867141
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011101957.7A Active CN112165436B (en) | 2020-10-15 | 2020-10-15 | Flow control method, device and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112165436B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112995052B (en) * | 2021-04-25 | 2021-08-06 | 北京世纪好未来教育科技有限公司 | Flow control method and related device |
CN113905091B (en) * | 2021-09-15 | 2023-09-01 | 盐城天眼察微科技有限公司 | Method and device for processing access request |
CN114500663B (en) * | 2021-12-28 | 2024-04-12 | 网宿科技股份有限公司 | Scheduling method, device, equipment and storage medium of content distribution network equipment |
CN114640516B (en) * | 2022-03-09 | 2023-10-20 | 平安科技(深圳)有限公司 | Access control method and device for storage cluster, electronic equipment and storage medium |
CN115002044B (en) * | 2022-05-26 | 2024-03-19 | 平安银行股份有限公司 | Method, device, computer equipment and storage medium for controlling data transmission |
CN115580580B (en) * | 2022-10-12 | 2024-05-17 | 中国平安人寿保险股份有限公司 | Flow control method, flow control device, and computer-readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104753805A (en) * | 2013-12-31 | 2015-07-01 | 腾讯科技(深圳)有限公司 | Distributed flow control method, server and system |
CN110120973A (en) * | 2019-04-28 | 2019-08-13 | 华为技术有限公司 | A kind of request control method, relevant device and computer storage medium |
CN110138732A (en) * | 2019-04-03 | 2019-08-16 | 平安科技(深圳)有限公司 | Response method, device, equipment and the storage medium of access request |
CN110661824A (en) * | 2018-06-28 | 2020-01-07 | 阿里巴巴集团控股有限公司 | Flow regulation and control method and device for servers in distributed cluster |
CN111131063A (en) * | 2019-12-31 | 2020-05-08 | 腾讯科技(深圳)有限公司 | Flow control method, related device, equipment and storage medium |
-
2020
- 2020-10-15 CN CN202011101957.7A patent/CN112165436B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104753805A (en) * | 2013-12-31 | 2015-07-01 | 腾讯科技(深圳)有限公司 | Distributed flow control method, server and system |
CN110661824A (en) * | 2018-06-28 | 2020-01-07 | 阿里巴巴集团控股有限公司 | Flow regulation and control method and device for servers in distributed cluster |
CN110138732A (en) * | 2019-04-03 | 2019-08-16 | 平安科技(深圳)有限公司 | Response method, device, equipment and the storage medium of access request |
CN110120973A (en) * | 2019-04-28 | 2019-08-13 | 华为技术有限公司 | A kind of request control method, relevant device and computer storage medium |
CN111131063A (en) * | 2019-12-31 | 2020-05-08 | 腾讯科技(深圳)有限公司 | Flow control method, related device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112165436A (en) | 2021-01-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112165436B (en) | Flow control method, device and system | |
CN109194584B (en) | Flow monitoring method and device, computer equipment and storage medium | |
US9984013B2 (en) | Method, controller, and system for service flow control in object-based storage system | |
CN110858161B (en) | Resource allocation method, device, system, equipment and medium | |
CN111818159B (en) | Management method, device, equipment and storage medium of data processing node | |
CN107592345B (en) | Transaction current limiting device, method and transaction system | |
JP2017126975A (en) | Network traffic scheduling method and device of data center | |
WO2023050901A1 (en) | Load balancing method and apparatus, device, computer storage medium and program | |
WO2019237594A1 (en) | Session persistence method and apparatus, and computer device and storage medium | |
CN110933178B (en) | Method for adjusting node configuration in cluster system and server | |
CN110740164B (en) | Server determination method, regulation and control method, device, equipment and storage medium | |
CN111641563B (en) | Flow self-adaption method and system based on distributed scene | |
CN108023759B (en) | Self-adaptive resource scheduling method and device | |
CN112650575B (en) | Resource scheduling method, device and cloud service system | |
CN113568756A (en) | Cooperative dynamic scheduling method and system for password resources | |
CN111061431A (en) | Distributed storage method, server and client | |
CN115277577A (en) | Data processing method, data processing device, computer equipment and computer readable storage medium | |
CN115396377B (en) | Method, device, equipment and storage medium for optimizing service quality of object storage | |
CN114296891A (en) | Task scheduling method, system, computing device, storage medium and program product | |
CN112416594A (en) | Micro-service distribution method, electronic equipment and computer storage medium | |
CN111078386A (en) | Control method and control device of distributed scheduling system | |
CN113419993B (en) | Read-write request processing method and device, electronic equipment and storage medium | |
CN110868323A (en) | Bandwidth control method, device, equipment and medium | |
CN111309442A (en) | Method, device, system, medium and equipment for adjusting number of micro-service containers | |
CN115118782A (en) | Data control method and device, electronic equipment and computer readable 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |