CN110399212A - Task requests processing method, device, electronic equipment and computer-readable medium - Google Patents
Task requests processing method, device, electronic equipment and computer-readable medium Download PDFInfo
- Publication number
- CN110399212A CN110399212A CN201810377883.6A CN201810377883A CN110399212A CN 110399212 A CN110399212 A CN 110399212A CN 201810377883 A CN201810377883 A CN 201810377883A CN 110399212 A CN110399212 A CN 110399212A
- Authority
- CN
- China
- Prior art keywords
- processing request
- task
- task processing
- condition
- node
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 28
- 238000012545 processing Methods 0.000 claims abstract description 121
- 238000000034 method Methods 0.000 claims abstract description 32
- 230000004044 response Effects 0.000 claims abstract description 30
- 230000008569 process Effects 0.000 claims abstract description 7
- 230000015654 memory Effects 0.000 claims description 15
- 238000004590 computer program Methods 0.000 claims description 4
- 230000000712 assembly Effects 0.000 abstract description 10
- 238000000429 assembly Methods 0.000 abstract description 10
- 238000010586 diagram Methods 0.000 description 11
- 238000004891 communication Methods 0.000 description 6
- 230000008859 change Effects 0.000 description 4
- 230000008901 benefit Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000005291 magnetic effect Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 239000002131 composite material Substances 0.000 description 2
- 239000000203 mixture Substances 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 210000004027 cell Anatomy 0.000 description 1
- 150000001875 compounds Chemical class 0.000 description 1
- 239000000470 constituent Substances 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000011217 control strategy Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 239000004744 fabric Substances 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 210000003127 knee Anatomy 0.000 description 1
- 238000000465 moulding Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000012797 qualification Methods 0.000 description 1
- 230000003014 reinforcing effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
- 210000000352 storage cell Anatomy 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/5044—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering hardware capabilities
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/505—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
This disclosure relates to a kind of task requests processing method, device, electronic equipment and computer-readable medium.This method can be applicable in the node in distributed system, this method comprises: the processing request of the task of reception;Node state is determined according to business scenario;Judge whether the task processing request meets response condition according to the node state;And when task processing request meets response condition, receive and process the task processing request.Task requests processing method, device, electronic equipment and the computer-readable medium of the disclosure can alleviate the pressure of distributed type assemblies current limliting, promote current limiting performance, reduce network bandwidth.
Description
Technical field
This disclosure relates to computer information processing field, in particular to a kind of task requests processing method, device,
Electronic equipment and computer-readable medium.
Background technique
Distributed system (distributed system) is the cluster of many machine compositions, logical by network each other
Letter, completes the system of the same thing jointly.In the service provided by distributed data base system, the imperceptible data of user
It is distribution, i.e., user is not necessary to know whether relationship is divided, is stored in which website and affairs whether there is or not copy, data at which station
Executed on point etc..Node in distributed system is divided into host node and calculate node, and what calculate node was actually run is single
Operating system, what is run thereon is independent or distributed progress, and structure is relatively simple, itself rely on host node provide
Parallel library using process carry out data dispatch;Host node is also provided to clearing other than providing the library that application program is relied on
The distributed extension that the management program of node is managed.
Due to the own characteristic of distributed system, distributed system often goes out under the impact of very more service traffics
Now can't bear the heavy load, resource exhaustion, lose service ability the case where.Under a large number of services flow attack, it is often necessary to distribution
System carries out current limliting processing, and in the prior art, common current limliting strategy is: being counted by a cache cluster, passes through meter
The access times for going to determine a moment point are calculated, current limliting processing is carried out when access times are more than threshold value.But this mode is deposited
In following disadvantage: when service traffics are big, the number of operations of cache cluster is excessively frequent, causes biggish pressure to cache server
Power;When service traffics are big, instance number occupies the connection number of cache cluster too much, and the connection number of cache cluster has the upper limit, it is general on
Limit 10,000;Access each time requires to interact with cache cluster server, not only wastes flow, and causes biggish
Network overhead;Current-limiting mode with network consumption, performance is lower, increases the response time of interface;Current limliting scalability is poor,
Want to be promoted to 10000 times per second, required cost is excessively high from 1000 times per second.
Therefore, it is necessary to a kind of new task requests processing method, device, electronic equipment and computer-readable mediums.
Above- mentioned information are only used for reinforcing the understanding to the background of the disclosure, therefore it disclosed in the background technology part
It may include the information not constituted to the prior art known to persons of ordinary skill in the art.
Summary of the invention
In view of this, the disclosure provides a kind of task requests processing method, device, electronic equipment and computer-readable Jie
Matter can alleviate the pressure of distributed type assemblies current limliting, promote current limiting performance, reduce network bandwidth.
Other characteristics and advantages of the disclosure will be apparent from by the following detailed description, or partially by the disclosure
Practice and acquistion.
According to the one side of the disclosure, propose that a kind of task requests processing method, this method can be applicable to distributed system
In node in, this method comprises: receive task processing request;Node state is determined according to business scenario;According to the node
State judges whether the task processing request meets response condition;And meet response condition in task processing request
When, receive and process the task processing request.
In a kind of exemplary embodiment of the disclosure, further includes: be unsatisfactory for response condition in task processing request
When, abandon task processing request.
In a kind of exemplary embodiment of the disclosure, determine that node state comprises determining that the section according to business scenario
The quantity of task requests in point current time unit;Determine the hardware load conditions of the node;And determine the node
Service condition.
In a kind of exemplary embodiment of the disclosure, whether the task processing request is judged according to the node state
Meet response condition include it is following at least one: judge whether task processing request meets time step condition;Judge institute
State whether task processing request meets access times condition;Judge whether the task processing request meets hardware load operation item
Part;And judge whether the task processing request meets service condition service condition.
In a kind of exemplary embodiment of the disclosure, judge whether the task processing request meets time step condition
It include: according to the time of task requests time and last time task requests, acquisition time interval;And when the time interval is less than
When first threshold, task processing request is unsatisfactory for time step condition.
In a kind of exemplary embodiment of the disclosure, judge whether the processing request meets access times condition packet
Include: when the quantity of task requests is greater than second threshold in the node current time unit, task processing request is unsatisfactory for visiting
Ask times condition.
In a kind of exemplary embodiment of the disclosure, the hardware load service condition includes: CPU usage, memory
Usage amount, disk usage amount, hardware temperatures.
According to the one side of the disclosure, a kind of task requests processing unit is proposed, which can be applicable to distributed system
In node in, which includes: receiving module, for receive task processing request;Block of state, for according to business scenario
Determine node state;Judgment module, for judging whether the task processing request meets response item according to the node state
Part;And processing module, for receiving and processing the task processing and asking when task processing request meets response condition
It asks.
According to the one side of the disclosure, a kind of electronic equipment is proposed, which includes: one or more processors;
Storage device, for storing one or more programs;When one or more programs are executed by one or more processors, so that one
A or multiple processors realize such as methodology above.
According to the one side of the disclosure, it proposes a kind of computer-readable medium, is stored thereon with computer program, the program
Method as mentioned in the above is realized when being executed by processor.
According to task requests processing method, device, electronic equipment and the computer-readable medium of the disclosure, can alleviate point
The pressure of cloth cluster current limliting promotes current limiting performance, reduces network bandwidth.
It should be understood that the above general description and the following detailed description are merely exemplary, this can not be limited
It is open.
Detailed description of the invention
Its example embodiment is described in detail by referring to accompanying drawing, above and other target, feature and the advantage of the disclosure will
It becomes more fully apparent.Drawings discussed below is only some embodiments of the present disclosure, for the ordinary skill of this field
For personnel, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is the flow chart of task requests processing method in the prior art.
Fig. 2 is a kind of system block diagram of task requests processing method and processing device shown according to an exemplary embodiment.
Fig. 3 is a kind of flow chart of task requests processing method shown according to an exemplary embodiment.
Fig. 4 is a kind of flow chart of the task requests processing method shown according to another exemplary embodiment.
Fig. 5 is a kind of schematic diagram of the task requests processing method shown according to another exemplary embodiment.
Fig. 6 is a kind of block diagram of task requests processing unit shown according to an exemplary embodiment.
Fig. 7 is the block diagram of a kind of electronic equipment shown according to an exemplary embodiment.
Fig. 8 is that a kind of computer readable storage medium schematic diagram is shown according to an exemplary embodiment.
Specific embodiment
Example embodiment is described more fully with reference to the drawings.However, example embodiment can be real in a variety of forms
It applies, and is not understood as limited to embodiment set forth herein;On the contrary, thesing embodiments are provided so that the disclosure will be comprehensively and complete
It is whole, and the design of example embodiment is comprehensively communicated to those skilled in the art.Identical appended drawing reference indicates in figure
Same or similar part, thus repetition thereof will be omitted.
In addition, described feature, structure or characteristic can be incorporated in one or more implementations in any suitable manner
In example.In the following description, many details are provided to provide and fully understand to embodiment of the disclosure.However,
It will be appreciated by persons skilled in the art that can with technical solution of the disclosure without one or more in specific detail,
Or it can be using other methods, constituent element, device, step etc..In other cases, it is not shown in detail or describes known side
Method, device, realization or operation are to avoid fuzzy all aspects of this disclosure.
Block diagram shown in the drawings is only functional entity, not necessarily must be corresponding with physically separate entity.
I.e., it is possible to realize these functional entitys using software form, or realized in one or more hardware modules or integrated circuit
These functional entitys, or these functional entitys are realized in heterogeneous networks and/or processor device and/or microcontroller device.
Flow chart shown in the drawings is merely illustrative, it is not necessary to including all content and operation/step,
It is not required to execute by described sequence.For example, some operation/steps can also decompose, and some operation/steps can close
And or part merge, therefore the sequence actually executed is possible to change according to the actual situation.
It should be understood that although herein various assemblies may be described using term first, second, third, etc., these groups
Part should not be limited by these terms.These terms are to distinguish a component and another component.Therefore, first group be discussed herein below
Part can be described as the second component without departing from the teaching of disclosure concept.As used herein, term " and/or " include associated
All combinations for listing any of project and one or more.
It will be understood by those skilled in the art that attached drawing is the schematic diagram of example embodiment, module or process in attached drawing
Necessary to not necessarily implementing the disclosure, therefore it cannot be used for the protection scope of the limitation disclosure.
Fig. 1 is the flow chart of task requests processing method in the prior art.As shown in Figure 1, in the prior art, commonly
Current limliting strategy is: being counted by a cache cluster, by calculating the access times for going to determine a moment point, in access time
Current limliting processing is carried out when number is more than threshold value.In the prior art, by unified Current limited Control strategy, come while controlling multiple clothes
The mode of business device, when service traffics are big, access each time requires to interact with cache cluster server, not only waste stream
Amount, and cause biggish network overhead, the response time for increasing interface and current limliting scalability poor.
Fig. 2 is a kind of system block diagram of task requests processing method and processing device shown according to an exemplary embodiment.
As shown in Fig. 2, system architecture 100 may include server 101,102 and server 104,105.Network 103
To provide the medium of communication link between server 101,102 and server 104,105.Network 103 may include each
Kind connection type, such as wired, wireless communication link or fiber optic cables etc..
User can be used terminal device and pass through network 103 and server 101,102 and the interaction of server 104,105,
To receive or send message etc..Various telecommunication customer end applications, such as the application of shopping class, webpage can be installed on terminal device
Browser application, searching class application, instant messaging tools, mailbox client, social platform software etc..Terminal device can be tool
Have display screen and supported web page browsing various electronic equipments, including but not limited to smart phone, tablet computer, it is on knee just
Take computer and desktop computer etc..
Server 101,102 and server 104,105 can be to provide the server of various services, such as to user
The back-stage management server supported is provided using the shopping class website that terminal device is browsed.Server 101,102, and service
Device 104,105 can carry out the processing such as analyzing to data such as the information query requests received, and processing result is fed back
To terminal device.
Server 101,102 and server 104,105 can receive task processing request;Server 101,102, with
And server 104,105 can also determine node state according to business scenario;Server 101,102 and server 104,105
It can also judge whether the task processing request meets response condition according to the node state;And in task processing
When request meets response condition, server 101,102 and server 104,105 receive and process the task processing request.
Server 101,102 and server 104,105 can also be unsatisfactory for response condition in task processing request
When, abandon task processing request.
Server 101,102 and server 104,105 itself can be the server of an entity, also may be, for example,
Multiple server compositions.It should be noted that task requests processing method provided by the embodiment of the present disclosure can be by server
101,102 and server 104,105 separately or concurrently execute, correspondingly, task requests processing unit can be set in service
In device 101,102 and server 104,105.And the page end for being supplied to user's progress goods browse is normally at terminal and sets
In standby.
According to the task requests processing method of the disclosure, judge to receive respectively by each server in distributed type assemblies
Task requests whether meet the needs of current environment, and then carry out the mode of business current limliting, distributed type assemblies limit can be alleviated
The pressure of stream promotes current limiting performance, reduces network bandwidth.
Fig. 3 is a kind of flow chart of task requests processing method shown according to an exemplary embodiment.This method 30 can
Using in node in a distributed system, including step S302 to S308.
As shown in figure 3, receiving task processing request in S302.Any processing node in distributed network, which receives, appoints
Business processing request, task processing request can be the processing request of any task, may be, for example, goods purchase request, commodity panic buying is asked
It asks, the article second kills request etc..
In S304, node state is determined according to business scenario.For example, determining task in the node current time unit
The quantity of request;Determine the hardware load conditions of the node;And determine the service condition of the node.
In S306, judge whether the task processing request meets response condition according to the node state.Can for example,
Judge whether the task processing request meets time step condition;Judge whether the task processing request meets access times
Condition;Judge whether the task processing request meets hardware load service condition;And judge that the task processing request is
It is no to meet service condition service condition.
In S308, when task processing request meets response condition, the task processing request is received and processed.
Specifically it can meet restrictive condition and be limited, is unsatisfactory for, be let pass for example, carry out current limliting judgement by time step mode;It is logical
Overwriting each moment point access times judge, meet restrictive condition and are limited, is unsatisfactory for, are let pass;Hardware load is logical
It crosses sensor or physical layer interface obtains hardware load situation, including cpu utilization rate at that time, memory usage amount, disk uses
Amount, the temperature etc. of hardware compare with configuration condition, meet restrictive condition and limited, is unsatisfactory for, let pass;The limit of other strategies
Molding block obtains some data relevant to business or server, by other sensors to be limited.
In one embodiment, when task processing request is unsatisfactory for response condition, task processing request is abandoned.I.e.
To be not responding to the task requests when this meets response condition.It can also be for example, being unsatisfactory for responding in task processing request
When condition, the task is put into scheduled buffer area, so as to when the subsequent task or the node meet response condition, then
Secondary processing task requests, the application are not limited.
According to the task requests processing method of the disclosure, judge to receive respectively by each server in distributed type assemblies
Task requests whether meet the needs of current environment, and then carry out the mode of business current limliting, distributed type assemblies limit can be alleviated
The pressure of stream promotes current limiting performance, reduces network bandwidth.
It is a kind of single machine current limliting tool of composite strategy according to the task requests processing method of the disclosure, is different from relying on
Inefficient traditional current limliting scheme that cache cluster counts, by diversified single machine current limliting strategy, and the side that may be coextruded
Formula carrys out current limliting, with this maximized promotion current limiting performance, also solves the performance of the network bandwidth occurred in previous traditional scheme
Bottleneck and resource occupation, and do not limited by third party's service, possess extremely strong scalability.
It will be clearly understood that the present disclosure describes how to form and use particular example, but the principle of the disclosure is not limited to
These exemplary any details.On the contrary, the introduction based on disclosure disclosure, these principles can be applied to many other
Embodiment.
Fig. 4 is a kind of flow chart of the task requests processing method shown according to another exemplary embodiment.It is shown in Fig. 4
The flow chart 40 of task requests processing method " is judged at the task according to the node state in S306 step in Fig. 3
Reason request whether meet response condition " detailed description.
In S402, judge whether the task processing request meets response condition according to the node state.It can be such as
The following steps are included:
In S404, judge whether the task processing request meets time step condition.
In one embodiment, judging whether the task processing request meets time step condition includes: according to task
The time of request time and last time task requests, acquisition time interval;And when the time interval is less than first threshold, appoint
Business processing request is unsatisfactory for time step condition.
It specifically can be for example, task processing request be uniformly scatter, the number of request for guaranteeing that operation system is handled is uniform
, it can be for example, it is assumed that 1 second 100 times access of limitation, then being equivalent to every 10 milliseconds of operation systems can only once request.It obtains
Current millisecond, and recording obtains the millisecond number of last record when accessing next time, compare the time difference with the last time and be no more than
10 milliseconds then limit, more than then letting pass.
In S406, judge whether the task processing request meets access times condition.
In one embodiment, judging whether the processing request meets access times condition includes: to work as in the node
When the quantity of task requests is greater than second threshold in preceding time quantum, task processing request is unsatisfactory for access times condition.
Specifically can for example, record current time access times, if can be for example, being limited to 1,000 times per second, then record is worked as
Preceding moment access times if more than 1,000, then limit if then plus together letting pass less than 1,000.
In S408, judge whether the task processing request meets hardware load service condition.
In one embodiment, the hardware load service condition includes: CPU usage, memory usage amount, disk use
Amount, hardware temperatures.
It specifically can be for example, acquiring the load data of hardware resource by the interface that sensor or operating system provide
And some other data come help operation system carry out current limliting.
In S410, judge whether the task processing request meets service condition service condition.
In S412, after receiving the returning the result of each judgement, judged by configuration requirement, and relationship, or
Or relationship is integrated, and is met restrictive condition and is then limited, be unsatisfactory for, lets pass.
In one embodiment, the above determination strategy selection one or arbitrary number, carry out judgement in series or in parallel,
Similar in circuit with or relationship, or series-parallel compound judgement, determine that current task node requests current task processing
It is current limliting or clearance.
Fig. 5 is a kind of flow chart of the task requests processing method shown according to another exemplary embodiment.Fig. 5 is to tool
In the distributed processing system(DPS) for having multiple tasks node, the schematic description for request processing method of being engaged in.
As shown in figure 5, in this application, single machine current limliting is carried out by composite strategy algorithm, for distributed type assemblies scene,
Different strategies is configured, realizes efficient current limliting, the stability and performance of Lai Tigao system.In the task requests processing side of the application
Method is equivalent to from the point of view of macroscopically and all added a current limliting tool to each server.
According to the task requests processing method of the disclosure, have the advantages that single machine limit flow effectively alleviates cluster
Current limliting, the extra load of cache cluster are detached from and rely on third party's service;Current limiting performance is improved, when greatly reducing current limliting
Between consumption;Reduce network bandwidth;Single machine current limliting is not limited by third party's service, possesses strongest extended capability;Frequency limit
Tactful dynamic is adjustable, and mobility is very strong.
It will be appreciated by those skilled in the art that realizing that all or part of the steps of above-described embodiment is implemented as being executed by CPU
Computer program.When the computer program is executed by CPU, above-mentioned function defined by the above method that the disclosure provides is executed
Energy.The program can store in a kind of computer readable storage medium, which can be read-only memory, magnetic
Disk or CD etc..
Further, it should be noted that above-mentioned attached drawing is only the place according to included by the method for disclosure exemplary embodiment
Reason schematically illustrates, rather than limits purpose.It can be readily appreciated that above-mentioned processing shown in the drawings is not indicated or is limited at these
The time sequencing of reason.In addition, be also easy to understand, these processing, which can be, for example either synchronously or asynchronously to be executed in multiple modules.
Following is embodiment of the present disclosure, can be used for executing embodiments of the present disclosure.It is real for disclosure device
Undisclosed details in example is applied, embodiments of the present disclosure is please referred to.
Fig. 6 is a kind of block diagram of task requests processing unit shown according to an exemplary embodiment.Task requests processing
Device 60 includes: receiving module 602, block of state 604, judgment module 606, processing module 608.
Receiving module 602 is for receiving task processing request.Receiving module 602 can appoint for example in distributed network
In one processing node, receiving module 602 receives task processing request, and task processing request can be the processing request of any task, can
For example, goods purchase request, commodity panic buying request, article second kill request etc..
Block of state 604 is used to determine node shape according to business scenario.For example, determining in the node current time unit
The quantity of task requests;Determine the hardware load conditions of the node;And determine the service condition of the node.
Judgment module 606 is used to judge according to the node state whether the task processing request to meet response condition.
Can such as judgment module 606, judge whether task processing request meets time step condition;Judgment module 606 judges institute
State whether task processing request meets access times condition;It is hard that judgment module 606 judges whether the task processing request meets
Part load operating conditions;And judgment module 606 judges whether the task processing request meets service condition service condition.
Processing module 608 is used to receive and process at the task when task processing request meets response condition
Reason request.Current limliting judgement is carried out by time step mode, meets restrictive condition and is limited, is unsatisfactory for, let pass;Pass through note
Each moment point access times is recorded to judge, meets restrictive condition and is limited, is unsatisfactory for, let pass;Hardware load passes through biography
Sensor or physical layer interface acquisition hardware load situation, including cpu utilization rate at that time, memory usage amount, disk usage amount, firmly
The temperature etc. of part compares with configuration condition, meets restrictive condition and limited, is unsatisfactory for, let pass;The limitation mould of other strategies
Block obtains some data relevant to business or server, by other sensors to be limited.
According to the task requests processing unit of the disclosure, judge to receive respectively by each server in distributed type assemblies
Task requests whether meet the needs of current environment, and then carry out the mode of business current limliting, distributed type assemblies limit can be alleviated
The pressure of stream promotes current limiting performance, reduces network bandwidth.
Fig. 7 is the block diagram of a kind of electronic equipment shown according to an exemplary embodiment.
The electronic equipment 200 of this embodiment according to the disclosure is described referring to Fig. 7.The electronics that Fig. 7 is shown
Equipment 200 is only an example, should not function to the embodiment of the present disclosure and use scope bring any restrictions.
As shown in fig. 7, electronic equipment 200 is showed in the form of universal computing device.The component of electronic equipment 200 can wrap
It includes but is not limited to: at least one processing unit 210, at least one storage unit 220, (including the storage of the different system components of connection
Unit 220 and processing unit 210) bus 230, display unit 240 etc..
Wherein, the storage unit is stored with program code, and said program code can be held by the processing unit 210
Row, so that the processing unit 210 executes described in this specification above-mentioned electronic prescription circulation processing method part according to this
The step of disclosing various illustrative embodiments.For example, the processing unit 210 can be executed such as Fig. 3, Fig. 4, shown in Fig. 5
The step of.
The storage unit 220 may include the readable medium of volatile memory cell form, such as random access memory
Unit (RAM) 2201 and/or cache memory unit 2202 can further include read-only memory unit (ROM) 2203.
The storage unit 220 can also include program/practical work with one group of (at least one) program module 2205
Tool 2204, such program module 2205 includes but is not limited to: operating system, one or more application program, other programs
It may include the realization of network environment in module and program data, each of these examples or certain combination.
Bus 230 can be to indicate one of a few class bus structures or a variety of, including storage unit bus or storage
Cell controller, peripheral bus, graphics acceleration port, processing unit use any bus structures in a variety of bus structures
Local bus.
Electronic equipment 200 can also be with one or more external equipments 300 (such as keyboard, sensing equipment, bluetooth equipment
Deng) communication, can also be enabled a user to one or more equipment interact with the electronic equipment 200 communicate, and/or with make
Any equipment (such as the router, modulation /demodulation that the electronic equipment 200 can be communicated with one or more of the other calculating equipment
Device etc.) communication.This communication can be carried out by input/output (I/O) interface 250.Also, electronic equipment 200 can be with
By network adapter 260 and one or more network (such as local area network (LAN), wide area network (WAN) and/or public network,
Such as internet) communication.Network adapter 260 can be communicated by bus 230 with other modules of electronic equipment 200.It should
Understand, although not shown in the drawings, other hardware and/or software module can be used in conjunction with electronic equipment 200, including but unlimited
In: microcode, device driver, redundant processing unit, external disk drive array, RAID system, tape drive and number
According to backup storage system etc..
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented
Mode can also be realized by software realization in such a way that software is in conjunction with necessary hardware.Therefore, according to the disclosure
The technical solution of embodiment can be embodied in the form of software products, which can store non-volatile at one
Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are so that a calculating
Equipment (can be personal computer, server or network equipment etc.) executes the above method according to disclosure embodiment.
Fig. 8 schematically shows a kind of computer readable storage medium schematic diagram in disclosure exemplary embodiment.
Refering to what is shown in Fig. 8, describing the program product for realizing the above method according to embodiment of the present disclosure
400, can using portable compact disc read only memory (CD-ROM) and including program code, and can in terminal device,
Such as it is run on PC.However, the program product of the disclosure is without being limited thereto, in this document, readable storage medium storing program for executing can be with
To be any include or the tangible medium of storage program, the program can be commanded execution system, device or device use or
It is in connection.
Described program product can be using any combination of one or more readable mediums.Readable medium can be readable letter
Number medium or readable storage medium storing program for executing.Readable storage medium storing program for executing for example can be but be not limited to electricity, magnetic, optical, electromagnetic, infrared ray or
System, device or the device of semiconductor, or any above combination.The more specific example of readable storage medium storing program for executing is (non exhaustive
List) include: electrical connection with one or more conducting wires, portable disc, hard disk, random access memory (RAM), read-only
Memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read only memory
(CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.
The computer readable storage medium may include in a base band or the data as the propagation of carrier wave a part are believed
Number, wherein carrying readable program code.The data-signal of this propagation can take various forms, including but not limited to electromagnetism
Signal, optical signal or above-mentioned any appropriate combination.Readable storage medium storing program for executing can also be any other than readable storage medium storing program for executing
Readable medium, the readable medium can send, propagate or transmit for by instruction execution system, device or device use or
Person's program in connection.The program code for including on readable storage medium storing program for executing can transmit with any suitable medium, packet
Include but be not limited to wireless, wired, optical cable, RF etc. or above-mentioned any appropriate combination.
Can with any combination of one or more programming languages come write for execute the disclosure operation program
Code, described program design language include object oriented program language-Java, C++ etc., further include conventional
Procedural programming language-such as " C " language or similar programming language.Program code can be fully in user
It calculates and executes in equipment, partly executes on a user device, being executed as an independent software package, partially in user's calculating
Upper side point is executed on a remote computing or is executed in remote computing device or server completely.It is being related to far
Journey calculates in the situation of equipment, and remote computing device can pass through the network of any kind, including local area network (LAN) or wide area network
(WAN), it is connected to user calculating equipment, or, it may be connected to external computing device (such as utilize ISP
To be connected by internet).
Above-mentioned computer-readable medium carries one or more program, when said one or multiple programs are by one
When the equipment executes, so that the computer-readable medium implements function such as: receiving task processing request;It is true according to business scenario
Determine node state;Judge whether the task processing request meets response condition according to the node state;And at described
When business processing request meets response condition, the task processing request is received and processed.
It will be appreciated by those skilled in the art that above-mentioned each module can be distributed in device according to the description of embodiment, it can also
Uniquely it is different from one or more devices of the present embodiment with carrying out corresponding change.The module of above-described embodiment can be merged into
One module, can also be further split into multiple submodule.
By the description of above embodiment, those skilled in the art is it can be readily appreciated that example embodiment described herein
It can also be realized in such a way that software is in conjunction with necessary hardware by software realization.Therefore, implemented according to the disclosure
The technical solution of example can be embodied in the form of software products, which can store in a non-volatile memories
In medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) or on network, including some instructions are so that a calculating equipment (can
To be personal computer, server, mobile terminal or network equipment etc.) it executes according to the method for the embodiment of the present disclosure.
It is particularly shown and described the exemplary embodiment of the disclosure above.It should be appreciated that the present disclosure is not limited to
Detailed construction, set-up mode or implementation method described herein;On the contrary, disclosure intention covers included in appended claims
Various modifications and equivalence setting in spirit and scope.
In addition, structure shown by this specification Figure of description, ratio, size etc., only to cooperate specification institute
Disclosure, for skilled in the art realises that be not limited to the enforceable qualifications of the disclosure with reading, therefore
Do not have technical essential meaning, the modification of any structure, the change of proportionate relationship or the adjustment of size are not influencing the disclosure
Under the technical effect and achieved purpose that can be generated, it should all still fall in technology contents disclosed in the disclosure and obtain and can cover
In the range of.Meanwhile cited such as "upper" in this specification, " first ", " second " and " one " term, be also only and be convenient for
Narration is illustrated, rather than to limit the enforceable range of the disclosure, relativeness is altered or modified, without substantive change
Under technology contents, when being also considered as the enforceable scope of the disclosure.
Claims (10)
1. a kind of task requests processing method, this method can be applicable in the node in distributed system, which is characterized in that packet
It includes:
The processing request of reception task;
Node state is determined according to business scenario;
Judge whether the task processing request meets response condition according to the node state;And it is asked in task processing
It asks when meeting response condition, receives and processes the task processing request.
2. the method as described in claim 1, which is characterized in that further include:
When task processing request is unsatisfactory for response condition, task processing request is abandoned.
3. the method as described in claim 1, which is characterized in that determine that node state includes: according to business scenario
Determine the quantity of task requests in the node current time unit;
Determine the hardware load conditions of the node;And
Determine the service condition of the node.
4. the method as described in claim 1, which is characterized in that judge that the task processing request is according to the node state
It is no meet response condition include it is following at least one:
Judge whether the task processing request meets time step condition;
Judge whether the task processing request meets access times condition;
Judge whether the task processing request meets hardware load service condition;And
Judge whether the task processing request meets service condition service condition.
5. method as claimed in claim 4, which is characterized in that judge whether the task processing request meets time step strip
Part includes:
According to the time of task requests time and last time task requests, acquisition time interval;And
When the time interval is less than first threshold, task processing request is unsatisfactory for time step condition.
6. method as claimed in claim 4, which is characterized in that judge whether the processing request meets access times condition packet
It includes:
When the quantity of task requests is greater than second threshold in the node current time unit, task processing request is unsatisfactory for visiting
Ask times condition.
7. method as claimed in claim 4, which is characterized in that the hardware load service condition includes:
CPU usage, memory usage amount, disk usage amount, hardware temperatures.
8. a kind of task requests processing unit, the device can be applicable in the node in distributed system, which is characterized in that packet
It includes:
Receiving module, for receiving task processing request;
Block of state, for determining node state according to business scenario;
Judgment module, for judging whether the task processing request meets response condition according to the node state;And
Processing module, for receiving and processing the task processing request when task processing request meets response condition.
9. a kind of electronic equipment characterized by comprising
One or more processors;
Storage device, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real
The now method as described in any in claim 1-7.
10. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that described program is held by processor
The method as described in any in claim 1-7 is realized when row.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810377883.6A CN110399212A (en) | 2018-04-25 | 2018-04-25 | Task requests processing method, device, electronic equipment and computer-readable medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810377883.6A CN110399212A (en) | 2018-04-25 | 2018-04-25 | Task requests processing method, device, electronic equipment and computer-readable medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110399212A true CN110399212A (en) | 2019-11-01 |
Family
ID=68322064
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810377883.6A Pending CN110399212A (en) | 2018-04-25 | 2018-04-25 | Task requests processing method, device, electronic equipment and computer-readable medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110399212A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111427694A (en) * | 2020-03-26 | 2020-07-17 | 北京金山云网络技术有限公司 | Task execution method, device, system and server |
CN112783641A (en) * | 2019-11-11 | 2021-05-11 | 马上消费金融股份有限公司 | Service interface flow control method and device |
US20210256973A1 (en) * | 2020-02-13 | 2021-08-19 | Baidu Online Network Technology (Beijing) Co., Ltd. | Speech chip and electronic device |
CN113765998A (en) * | 2021-07-12 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | Access limiting method and device based on cluster system and server |
CN114070847A (en) * | 2020-07-27 | 2022-02-18 | 腾讯科技(深圳)有限公司 | Current limiting method, device, equipment and storage medium of server |
CN114138357A (en) * | 2021-10-29 | 2022-03-04 | 北京达佳互联信息技术有限公司 | Request processing method and device, electronic equipment, storage medium and product |
CN114844947A (en) * | 2022-04-29 | 2022-08-02 | 北京达佳互联信息技术有限公司 | Request processing method and device, electronic equipment and computer readable medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150312343A1 (en) * | 2014-04-29 | 2015-10-29 | International Business Machines Corporation | Parallel i/o read processing for use in clustered file systems having cache storage |
CN107153573A (en) * | 2016-03-02 | 2017-09-12 | 阿里巴巴集团控股有限公司 | Distributed task scheduling treating method and apparatus |
-
2018
- 2018-04-25 CN CN201810377883.6A patent/CN110399212A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150312343A1 (en) * | 2014-04-29 | 2015-10-29 | International Business Machines Corporation | Parallel i/o read processing for use in clustered file systems having cache storage |
CN107153573A (en) * | 2016-03-02 | 2017-09-12 | 阿里巴巴集团控股有限公司 | Distributed task scheduling treating method and apparatus |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112783641A (en) * | 2019-11-11 | 2021-05-11 | 马上消费金融股份有限公司 | Service interface flow control method and device |
US20210256973A1 (en) * | 2020-02-13 | 2021-08-19 | Baidu Online Network Technology (Beijing) Co., Ltd. | Speech chip and electronic device |
US11735179B2 (en) * | 2020-02-13 | 2023-08-22 | Baidu Online Network Technology (Beijing) Co., Ltd. | Speech chip and electronic device |
CN111427694A (en) * | 2020-03-26 | 2020-07-17 | 北京金山云网络技术有限公司 | Task execution method, device, system and server |
CN114070847A (en) * | 2020-07-27 | 2022-02-18 | 腾讯科技(深圳)有限公司 | Current limiting method, device, equipment and storage medium of server |
CN114070847B (en) * | 2020-07-27 | 2024-01-23 | 腾讯科技(深圳)有限公司 | Method, device, equipment and storage medium for limiting current of server |
CN113765998A (en) * | 2021-07-12 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | Access limiting method and device based on cluster system and server |
CN114138357A (en) * | 2021-10-29 | 2022-03-04 | 北京达佳互联信息技术有限公司 | Request processing method and device, electronic equipment, storage medium and product |
CN114844947A (en) * | 2022-04-29 | 2022-08-02 | 北京达佳互联信息技术有限公司 | Request processing method and device, electronic equipment and computer readable medium |
CN114844947B (en) * | 2022-04-29 | 2024-03-26 | 北京达佳互联信息技术有限公司 | Request processing method and device, electronic equipment and computer readable medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110399212A (en) | Task requests processing method, device, electronic equipment and computer-readable medium | |
US11165667B2 (en) | Dynamic scaling of storage volumes for storage client file systems | |
US20130290355A1 (en) | Method and System of Selecting Business Object | |
JP2015508207A (en) | Apparatus, computer-implemented method, and manufactured product for managing capacity on demand in server cloud (management of capacity on demand in server cloud) | |
CN110808914A (en) | Access request processing method and device and electronic equipment | |
CN104641355A (en) | Adaptive service timeouts | |
CN109522151A (en) | Method and device for data redundancy storage | |
CN109196807A (en) | The method of network node and operation network node to carry out resource dissemination | |
US20070118652A1 (en) | Bundling and sending work units to a server based on a weighted cost | |
US20060156312A1 (en) | Method and apparatus for managing an event processing system | |
CN107295086B (en) | Cluster session loss prevention method and system | |
CN102890685B (en) | The method and apparatus that a kind of information is redirected | |
CN112686528A (en) | Method, apparatus, server and medium for allocating customer service resources | |
CN112991064B (en) | Service processing method, device, computer equipment and storage medium | |
CN111010453B (en) | Service request processing method, system, electronic device and computer readable medium | |
US10594620B1 (en) | Bit vector analysis for resource placement in a distributed system | |
CN110020360A (en) | The method that user behavior characteristics are extracted, system and server | |
CN109902980A (en) | Method and device for business processing | |
CN111858585A (en) | Block chain strategy processing device, computer readable storage medium and terminal equipment | |
CN109150928A (en) | Method and apparatus for handling request | |
CN114070847A (en) | Current limiting method, device, equipment and storage medium of server | |
US11783075B2 (en) | Systems and methods of providing access to secure data | |
CN114449040B (en) | Configuration issuing method and device based on cloud platform | |
CN116186649A (en) | Cross-system access method, device, computer equipment and storage medium | |
Li et al. | Implementing an mobile agent platform for m-commerce |
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 |