CN108600116A - A kind for the treatment of method and apparatus of resource request - Google Patents
A kind for the treatment of method and apparatus of resource request Download PDFInfo
- Publication number
- CN108600116A CN108600116A CN201810507913.0A CN201810507913A CN108600116A CN 108600116 A CN108600116 A CN 108600116A CN 201810507913 A CN201810507913 A CN 201810507913A CN 108600116 A CN108600116 A CN 108600116A
- Authority
- CN
- China
- Prior art keywords
- resource request
- server
- closed
- resource
- preset
- 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
- 238000000034 method Methods 0.000 title claims abstract description 20
- 230000004044 response Effects 0.000 claims description 7
- 238000003672 processing method Methods 0.000 claims description 4
- 239000007943 implant Substances 0.000 claims description 3
- 230000000903 blocking effect Effects 0.000 description 4
- 238000012423 maintenance Methods 0.000 description 3
- 230000032696 parturition Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification 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/12—Avoiding congestion; Recovering from congestion
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The present invention relates to a kind for the treatment of method and apparatus of resource request, the method includes:Obtain server untreated resource request quantity within the unit interval;When the resource request quantity is more than preset value, the resource request to be closed of the server is determined;Resource request to be closed described in closing.The present invention can block to avoid server, promote the treatment effeciency of server.
Description
Technical field
The present invention relates to field of computer technology, more particularly to a kind for the treatment of method and apparatus of resource request.
Background technology
With the application of big data, the data volume of internet processing is increased with the speed of geometry grade, this is to server
Performance more stringent requirements are proposed.
For single server software, with the increase of user's usage amount, it is huge moment may to be will produce in the same time
The visit capacity of volume, server need handling these access simultaneously in the twinkling of an eye, and any point slowly can all influence the place of server
Manage efficiency.
Wherein, server is when handling a large amount of access moment, if committed memory is compared in some access, in server
When handling a large amount of access requests to single server software, the memory of server can be caused to block, cause largely to access and ask
Seek overtime obstruction.
Invention content
Based on this, it is necessary to for current server the problem of moment, a large amount of resource request was easy to cause blocking, carry
For a kind for the treatment of method and apparatus of resource request.
A kind of processing method of resource request, the method includes:
Obtain server untreated resource request quantity within the unit interval;
When the resource request quantity is more than preset value, the resource request to be closed of the server is determined;
Resource request to be closed described in closing.
Preferential, before the resource request to be closed of the determination server, the method further includes:
Open the Warning Service of the server;
The resource request to be closed of the determination server, including:
According to the Warning Service, the resource request to be closed of the server is determined.
Preferential, it is described that the resource request to be closed of the server is determined according to the Warning Service, including:
The Api of Tomcat is called according to the Warning Service, determines that the resource to be closed of the server is asked
It asks.
Preferential, the resource request to be closed includes that preset resource of the first time server without response is asked
Ask, server in there are undelivered resource requests in the preset 2nd, times.
Preferential, the method further includes:
It is implanted into new resource request in the position of the resource request to be closed;
Storage and the relevant resource request data of the resource request to be closed.
A kind of processing unit of resource request, described device include:
Acquisition module, for obtaining server untreated resource request quantity within the unit interval;
Determining module, for when the resource request quantity is more than preset value, determining the to be closed of the server
Resource request;
Closedown module, for closing the resource request to be closed.
Preferential, described device further includes:
Opening module, the Warning Service for opening the server;
The determining module is used for:
According to the Warning Service, the resource request to be closed of the server is determined.
Preferential, the determining module is used for:
The Api of Tomcat is called according to the Warning Service, determines that the resource to be closed of the server is asked
It asks.
Preferential, the resource request to be closed includes that preset resource of the first time server without response is asked
Ask, server in there are undelivered resource requests in the preset 2nd, times.
Preferential, described device further includes:
Implant module, for being implanted into new resource request in the position of the resource request to be closed;
Memory module, for storing and the relevant resource request data of the resource request to be closed.
In the embodiment of the present invention, for server within the unit interval untreated resource request quantity, if the resource
When number of requests is more than preset value, indicate that current server is relatively high in the presence of the probability blocked, at this point it is possible to which determination is to be closed
Resource request, and close these resource requests to be closed;As a result, in the operation of server, if produced to same software
When giving birth to a large amount of resource request to server, server can actively close resource request to be closed, these is avoided to wait closing
The resource request closed seriously occupies memory and the processing time of server, and further avoids server blocking, promotes server
Treatment effeciency.
Description of the drawings
Fig. 1 is the flow chart of the processing method of the resource request of an embodiment;
Fig. 2 is the structure chart of the processing unit of the resource request of an embodiment.
Specific implementation mode
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
Fig. 1 is the flow chart of the processing method of the resource request of an embodiment.As shown in Figure 1, this method includes:
Step 120, server untreated resource request quantity within the unit interval is obtained.
Wherein, the unit interval more can meet the actual conditions of server in seconds in seconds.Certainly, originally
Embodiment is not limited to the larger or smaller chronomere such as millisecond or minute.
Step 140, when the resource request quantity is more than preset value, determine that the resource to be closed of the server is asked
It asks.
In processing of the server to resource request, usual server untreated number of resource requests within the unit interval
It measures and is changed in certain section, as the quantity of untreated resource request has exceeded the section most to server within the unit interval
The big upper limit then illustrates that server is likely to be at or will be in blocked state.
Wherein, the preset value of the present embodiment can be the maximum upper limit in above-mentioned section.It is preset when resource request quantity is more than
When value, it may be determined that the resource request to be closed of server.
Resource request to be closed can be resource request of the preset first time server without response, server
Inside there is undelivered resource request etc. in the preset 2nd, times.The resource request of equal closings is typically that some are useless
Resource request, or extremely committed memory resource request etc..
Server is to improve operation efficiency, can usually close these resource requests to be closed.
Step 160, resource request to be closed described in closing.
Server can close these resource requests to be closed by executing relevant instruction, can also using it is other not
Same mode closes these resource requests to be closed.
In the embodiment of the present invention, for server within the unit interval untreated resource request quantity, if the resource
When number of requests is more than preset value, indicate that current server is relatively high in the presence of the probability blocked, at this point it is possible to which determination is to be closed
Resource request, and close these resource requests to be closed;As a result, in the operation of server, if produced to same software
When giving birth to a large amount of resource request to server, server can actively close resource request to be closed, these is avoided to wait closing
The resource request closed seriously occupies memory and the processing time of server, and further avoids server blocking, promotes server
Treatment effeciency.
In the present embodiment, corresponding service routine can be implanted into the server first.It, can be first when server is run
First run the service routine.By the service routine, server can open the request port of server to receive different money
Source service request.
Service routine can provide Warning Service.When meeting preset condition, server can start the Warning Service.In advance
If condition, which can be resource request quantity, is more than preset value, at this point, server can open the Warning Service.According to the pre- police uniform
Business, server can close resource request to be closed.
Wherein, resource request includes http resource request etc..Further, in step 140, server can be according to described
Warning Service is called the Api of Tomcat, determines the resource request to be closed of the server.To the Api of Tomcat
It is called, the resource request of server inquiry current congestion can be made, greatly occupied the resource request of server memory.
Based on corresponding calling, server may be performed simultaneously the shutoff operation to these resource requests.It should be pointed out that closing this
A little resource requests are the resource request release of single.
In the present embodiment, it can be implanted into new resource request in the position of the resource request to be closed, to make clothes
Business device handles subsequent resource request, promotes the treatment effeciency of server.Meanwhile server can be stored and be waited for described
The relevant resource request data of resource request of closing.Operation maintenance personnel can according to the number of resource requests of storage it is investigated that see by
The resource request to be closed closed,
In the present embodiment, the resource request data of pent resource request can be sent out in the form of short message or mail
It send to operation maintenance personnel, operation maintenance personnel is allow to analyze the pent reason of resource request to be closed in time, and make corresponding
Operation.
Fig. 2 is the structure chart of the processing unit of the resource request of an embodiment.As shown in Fig. 2, the device includes:
Acquisition module 220, for obtaining server untreated resource request quantity within the unit interval.
Wherein, the unit interval more can meet the actual conditions of server in seconds in seconds.Certainly, originally
Embodiment is not limited to the larger or smaller chronomere such as millisecond or minute.
Determining module 240, for when the resource request quantity is more than preset value, determining that the server waits closing
Resource request.
In processing of the server to resource request, usual server untreated number of resource requests within the unit interval
It measures and is changed in certain section, as the quantity of untreated resource request has exceeded the section most to server within the unit interval
The big upper limit then illustrates that server is likely to be at or will be in blocked state.
Wherein, the preset value of the present embodiment can be the maximum upper limit in above-mentioned section.It is preset when resource request quantity is more than
When value, it may be determined that the resource request to be closed of server.
Resource request to be closed can be resource request of the preset first time server without response, server
Inside there is undelivered resource request etc. in the preset 2nd, times.The resource request of equal closings is typically that some are useless
Resource request, or extremely committed memory resource request etc..
Server is to improve operation efficiency, can usually close these resource requests to be closed.
Closedown module 260, for closing the resource request to be closed.
Server can close these resource requests to be closed by executing relevant instruction, can also using it is other not
Same mode closes these resource requests to be closed.
In the embodiment of the present invention, for server within the unit interval untreated resource request quantity, if the resource
When number of requests is more than preset value, indicate that current server is relatively high in the presence of the probability blocked, at this point it is possible to which determination is to be closed
Resource request, and close these resource requests to be closed;As a result, in the operation of server, if produced to same software
When giving birth to a large amount of resource request to server, server can actively close resource request to be closed, these is avoided to wait closing
The resource request closed seriously occupies memory and the processing time of server, and further avoids server blocking, promotes server
Treatment effeciency.
Optionally, as one embodiment, described device further includes:
Opening module, the Warning Service for opening the server;
The determining module is used for:
According to the Warning Service, the resource request to be closed of the server is determined.
Optionally, as one embodiment, the determining module is used for:
The Api of Tomcat is called according to the Warning Service, determines that the resource to be closed of the server is asked
It asks.
Optionally, as one embodiment, the resource request to be closed includes preset first time server
There are undelivered resource requests in the preset 2nd, times in the resource request of no response, server.
Optionally, as one embodiment, described device further includes:
Implant module, for being implanted into new resource request in the position of the resource request to be closed;
Memory module, for storing and the relevant resource request data of the resource request to be closed.
The particular content in above method embodiment may be implemented in module in the present embodiment apparatus above, can specifically join
According to the realization method in above method embodiment.
Each technical characteristic of embodiment described above can be combined arbitrarily, to keep description succinct, not to above-mentioned reality
It applies all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited
In contradiction, it is all considered to be the range of this specification record.
Several embodiments of the invention above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously
It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art
It says, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the protection of the present invention
Range.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.
Claims (10)
1. a kind of processing method of resource request, which is characterized in that the method includes:
Obtain server untreated resource request quantity within the unit interval;
When the resource request quantity is more than preset value, the resource request to be closed of the server is determined;
Resource request to be closed described in closing.
2. according to the method described in claim 1, it is characterized in that, the resource request to be closed of the determination server
Before, the method further includes:
Open the Warning Service of the server;
The resource request to be closed of the determination server, including:
According to the Warning Service, the resource request to be closed of the server is determined.
3. according to the method described in claim 2, it is characterized in that, described according to the Warning Service, the server is determined
Resource request to be closed, including:
The Api of Tomcat is called according to the Warning Service, determines the resource request to be closed of the server.
4. according to the method described in claim 1, it is characterized in that, described when the resource request closed includes preset first
Between resource request of the server without response, there are undelivered resource requests in the preset 2nd, times in server.
5. according to the method described in claim 1, it is characterized in that, the method further includes:
It is implanted into new resource request in the position of the resource request to be closed;
Storage and the relevant resource request data of the resource request to be closed.
6. a kind of processing unit of resource request, which is characterized in that described device includes:
Acquisition module, for obtaining server untreated resource request quantity within the unit interval;
Determining module, for when the resource request quantity is more than preset value, determining the resource to be closed of the server
Request;
Closedown module, for closing the resource request to be closed.
7. device according to claim 6, which is characterized in that described device further includes:
Opening module, the Warning Service for opening the server;
The determining module is used for:
According to the Warning Service, the resource request to be closed of the server is determined.
8. device according to claim 7, which is characterized in that the determining module is used for:
The Api of Tomcat is called according to the Warning Service, determines the resource request to be closed of the server.
9. device according to claim 6, which is characterized in that described when the resource request closed includes preset first
Between resource request of the server without response, there are undelivered resource requests in the preset 2nd, times in server.
10. device according to claim 6, which is characterized in that described device further includes:
Implant module, for being implanted into new resource request in the position of the resource request to be closed;
Memory module, for storing and the relevant resource request data of the resource request to be closed.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810507913.0A CN108600116A (en) | 2018-05-24 | 2018-05-24 | A kind for the treatment of method and apparatus of resource request |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810507913.0A CN108600116A (en) | 2018-05-24 | 2018-05-24 | A kind for the treatment of method and apparatus of resource request |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN108600116A true CN108600116A (en) | 2018-09-28 |
Family
ID=63629032
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810507913.0A Pending CN108600116A (en) | 2018-05-24 | 2018-05-24 | A kind for the treatment of method and apparatus of resource request |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN108600116A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109787909A (en) * | 2018-12-14 | 2019-05-21 | 平安普惠企业管理有限公司 | Reduce server blocks method, apparatus, computer equipment and storage medium |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP1193992A2 (en) * | 2000-10-02 | 2002-04-03 | NTT DoCoMo, Inc. | Communication system and resource assigning method therefor |
| CN105099935A (en) * | 2015-07-28 | 2015-11-25 | 小米科技有限责任公司 | Server load control method and device |
| CN106412091A (en) * | 2016-10-25 | 2017-02-15 | 广东欧珀移动通信有限公司 | Data transmission control method, device and system |
-
2018
- 2018-05-24 CN CN201810507913.0A patent/CN108600116A/en active Pending
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP1193992A2 (en) * | 2000-10-02 | 2002-04-03 | NTT DoCoMo, Inc. | Communication system and resource assigning method therefor |
| CN105099935A (en) * | 2015-07-28 | 2015-11-25 | 小米科技有限责任公司 | Server load control method and device |
| CN106412091A (en) * | 2016-10-25 | 2017-02-15 | 广东欧珀移动通信有限公司 | Data transmission control method, device and system |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109787909A (en) * | 2018-12-14 | 2019-05-21 | 平安普惠企业管理有限公司 | Reduce server blocks method, apparatus, computer equipment and storage medium |
| CN109787909B (en) * | 2018-12-14 | 2022-10-25 | 平安普惠企业管理有限公司 | Method, device, computer equipment and storage medium for reducing server blocking |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11526889B2 (en) | Resource transferring monitoring method and device | |
| US9367369B2 (en) | Automated merger of logically associated messages in a message queue | |
| US9729557B1 (en) | Dynamic throttling systems and services | |
| US9081941B2 (en) | Virtual machine | |
| JP6430462B2 (en) | Shaping virtual machine communication traffic | |
| US9547536B2 (en) | Connection handler and method for providing applications with heterogeneous connection objects | |
| CN107391268A (en) | service request processing method and device | |
| CN115118782B (en) | Data control method, device, electronic equipment and computer readable storage medium | |
| CN111488135A (en) | Current limiting method and device for high-concurrency system, storage medium and equipment | |
| CN106302445A (en) | For the method and apparatus processing request | |
| CN107463378A (en) | A kind of local cache implementation method, storage device and electronic equipment based on note | |
| EP3577884B1 (en) | Apparatus and method for predictive token validation | |
| US20230086991A1 (en) | Method, electronic device and computer program product for flushing metadata | |
| CN107786623A (en) | Message asynchronous processing method and device | |
| CN116210249A (en) | Entity and method for enabling control of the use of data collected in multiple analysis phases in a communication network | |
| CN108153794B (en) | Page cache data refreshing method, device and system | |
| CN102411631A (en) | A Method for Embedded Browser Disk Cache | |
| CN108600116A (en) | A kind for the treatment of method and apparatus of resource request | |
| CN117793130A (en) | Information management method and system based on cloud-end pair edge nodes | |
| CN106612263B (en) | Method and equipment for processing application access request | |
| CN109474569A (en) | A kind of method and system of detection web caching deception | |
| CN116301626A (en) | A cache resource management method, device and equipment | |
| CN110109956A (en) | A kind of method and terminal for preventing caching from penetrating | |
| RU2009131586A (en) | USER ACCESS POLICY FOR STORING DATA OFFLINE | |
| CN104348712B (en) | A kind of rubbish mail filtering method and device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180928 |
|
| RJ01 | Rejection of invention patent application after publication |