CN105262826A - Method and system for adjusting interface processing amount - Google Patents
Method and system for adjusting interface processing amount Download PDFInfo
- Publication number
- CN105262826A CN105262826A CN201510724174.7A CN201510724174A CN105262826A CN 105262826 A CN105262826 A CN 105262826A CN 201510724174 A CN201510724174 A CN 201510724174A CN 105262826 A CN105262826 A CN 105262826A
- Authority
- CN
- China
- Prior art keywords
- interface
- http request
- request
- call
- time
- 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
Classifications
-
- 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/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/90—Buffering arrangements
Abstract
The present invention discloses a method and system for adjusting interface processing amount. The method includes the steps as follows: acquiring interface processible maximum concurrence http request amount by utilizing a simulation ascending concurrence calling method; acquiring the calling request of a calling terminal, and judging whether the current request reaches the concurrence http request amount or not; directly processing the calling request of the calling terminal if the current request does not reach the concurrence http request amount; storing the calling request of the calling terminal to a queue if the current request reaches the concurrence http request amount, and processing the calling request of the calling terminal. According to the above method, the maximum processing amount of the system interface can be automatically determined so that the system collapse due to overload operation is avoided, the system stability is increased, and the system can process maximum task amount with the best state.
Description
Technical field
The present invention relates to a kind of method of adjustment and system of interface process quantity.
Background technology
In the interface based on http agreement, when providing the interface interchange based on http agreement for other system, often because call number exceedes this interface load, cause systematic function degradation.
(application number: 201310049083.9) disclose a kind of load-balancing method and the device with the WAP (wireless access point) of multiplex roles, after periodically obtaining MAC Address, adds up MAC Address number and lastest imformation summary sheet to existing Chinese invention patent; Judge whether to carry out load balancing operation after generating mac address information allocation list, if so, then carry out load balancing operation and upgrade mac address information allocation list, otherwise terminate the operation of current period, wait for and enter next cycle statistics.This patent is only applicable in transport network layer, and individual equipment threshold value is arranged by special messenger, and is changeless value, in actual motion, cannot carry out " adjusting to changed conditions ", therefore during practical application, and poor operability.
Summary of the invention
Technical problem to be solved by this invention is:
In order to solve the problems of the technologies described above, the technical solution used in the present invention is: the method for adjustment providing a kind of interface process quantity, comprising:
Increase progressively concurrent invocation by simulation and obtain the accessible maximum concurrent http request number of interface;
Obtain the call request calling end, judge whether current request reaches maximum concurrent http request number;
If do not reach, then directly call the call request of end described in process;
If reach, then call the call request of end in queue described in storing, and after processing current request, described in process, call the call request of end.
For solving the problem, the present invention also provides a kind of adjustment System of interface process quantity, comprising:
Number of request module, obtains the accessible maximum concurrent http request number of interface for being increased progressively concurrent invocation by simulation;
Judge module, for obtaining the call request calling end, judges whether current request reaches concurrent http request number;
Processing module, for the treatment of the described call request calling end;
Temporary storage module, calls the call request of end in queue described in storing.
Beneficial effect of the present invention is: be different from prior art, the present invention increases progressively concurrent invocation by simulation and obtains the accessible maximum concurrent http request number of interface, after acquisition call request, judges whether that current request reaches this threshold value, if do not reach, then directly process current request; If reach, then current request is kept in queue, with subsequent treatment.By the way, the present invention can the maximum process number of certainty annuity interface automatically, and anti-locking system excess load running causes collapse, improves the stability of a system, allows system with the highest task of best state processing.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of the inventive method embodiment one;
Fig. 2 is the structured flowchart of present system embodiment two;
Fig. 3 is the structured flowchart of present system embodiment three.
Embodiment
By describing technology contents of the present invention in detail, realized object and effect, accompanying drawing is coordinated to be explained below in conjunction with execution mode.
The design of most critical of the present invention is: by the configuration http reverse proxy record monitor-interface invoked processing time, analog computation goes out the maximum number of processes that a time period inner joint can process, the number of processes in volitional check interface a period of time.
Please refer to Fig. 1, the embodiment of the present invention one provides a kind of method of adjustment of interface process quantity, comprising:
S1: increase progressively concurrent invocation by simulation and obtain the accessible maximum concurrent http request number of interface;
S2: obtain the call request calling end, judge whether current request reaches maximum concurrent http request number;
S3: if do not reach, then directly call the call request of end described in process;
S4: if reach, then call the call request of end in queue described in storing, and after processing current request, call the call request of end described in process.
Wherein, step S1 is specially:
The concurrent http request of continuous initiation predetermined quantity is to described interface, and wherein each concurrent http request number of initiating increases progressively with predetermined value;
Judge whether each concurrent http request initiated can process in the given time, if so, then records current concurrent http request number, asks for concurrent next time; If not, then end simulation process, with the concurrent http request number of last time for the accessible maximum concurrent http request number of interface.
And specifically comprise judging whether each concurrent http request initiated can process in the given time:
Configuration http reverse proxy, and record web interface call time started and the end time of calling;
Call the time started according to described and call the end time and determine the processing time, and judging whether the described processing time is less than or equal to the scheduled time.
That is: the present invention first calculates the maximum number of processes of each interface is maximum concurrent http request number.
The present invention initiates http request to web interface by using simulation to increase progressively concurrent invocation method, such as in the 1st second, send 10 http request, if web interface can process, then record this http request number 10, and sent 20 http request at the 2nd second, namely increase progressively 10 number of requests at every turn, until web interface cannot process the http request of current transmission in 1 second, then before it, once treatable number of times is maximum concurrent http request number.That is, if 20 http request sent for the 2nd second could not process in 1 second, then using 10 of last time record as the maximum concurrent http request number of interface.
In another embodiment, can be when incremental request number, determine that interface is in the scheduled time, the number of requests of such as, in 1 second process, namely can be a large amount of http request of disposable transmission, determine that in interface 1 second, manageable largest request quantity is as the maximum concurrent http request number of interface.As the 1st time sends 10 http request, such as, if in the scheduled time, can process in 1 second, then send 20 http request the 2nd time, and interface specifically in 1 second reality only process 15, then using 15 as the maximum concurrent http request number of interface.
Particularly, the present invention is by configuration http reverse proxy, and the allocating time of each request of web interface record and call the end time, according to allocating time with call the end time and judge whether it has processed in the given time.
After the maximum concurrent http request number obtaining web interface, the http request getting final product the current acquisition of docking port limits, and particularly, initiate request when calling end, first interface judges whether the current request processed of interface reaches maximum concurrent http request number; If do not reached, then directly process.If reached, then request is temporarily stored in queue, waits the current request processed to process rear continuation process.
Be different from prior art, the present invention increases progressively concurrent invocation by simulation and obtains the accessible maximum concurrent http request number of interface, after acquisition call request, judges whether that current request reaches this threshold value, if do not reach, then directly processes current request; If reach, then current request is kept in queue, with subsequent treatment.By the way, the maximum concurrent http request number of interface of the present invention can carry out simulation adjustment at any time according to setting, such as can simulate every day once, or simulation one per hour is inferior, anti-locking system excess load running causes collapse, improve the stability of a system, allow system with the highest task of best state processing.
As shown in Figure 2, the embodiment of the present invention two provides a kind of adjustment System 100 of interface process quantity, comprising:
Number of request module 110, obtains the accessible maximum concurrent http request number of interface for being increased progressively concurrent invocation by simulation;
Judge module 120, for obtaining the call request calling end, judges whether whether current request reaches concurrent http request number;
Processing module 130, for the treatment of the described call request calling end;
Temporary storage module 140, calls the call request of end in queue described in storing.
Wherein, as shown in Figure 3, described request digital-to-analogue block 110 comprises:
Analogue unit 111, increases progressively concurrent invocation side for using simulation and initiates http request to web interface;
Judging unit 112, for judging whether each concurrent http request initiated can process in the given time.
Wherein, described judging unit 112 specifically for:
Configuration http reverse proxy, and record web interface call time started and the end time of calling;
Call the time started according to described and call the end time and determine the processing time, and judging whether the described processing time is less than or equal to the scheduled time.
The foregoing is only embodiments of the invention; not thereby the scope of the claims of the present invention is limited; every equivalents utilizing specification of the present invention and accompanying drawing content to do, or be directly or indirectly used in relevant technical field, be all in like manner included in scope of patent protection of the present invention.
Claims (7)
1. a method of adjustment for interface process quantity, is characterized in that, comprising:
Increase progressively concurrent invocation by simulation and obtain the accessible maximum concurrent http request number of interface;
Obtain the call request calling end, judge whether current request reaches maximum concurrent http request number;
If do not reach, then directly call the call request of end described in process;
If reach, then call the call request of end in queue described in storing, and after processing current request, described in process, call the call request of end.
2. the method for the adjustment of interface process quantity according to claim 1, is characterized in that, the step being increased progressively the accessible maximum concurrent http request number of concurrent invocation acquisition interface by simulation is specially:
The concurrent http request of continuous initiation predetermined quantity is to described interface, and wherein each concurrent http request number of initiating increases progressively with predetermined value;
Judge whether each concurrent http request initiated can process in the given time, if so, then records current concurrent http request number, asks for concurrent next time; If not, then end simulation process, with the concurrent http request number of last time for the accessible maximum concurrent http request number of interface.
3. the method for the adjustment of interface process quantity according to claim 2, is characterized in that, judges whether each concurrent http request initiated can process in the given time and specifically comprises:
Configuration http reverse proxy, and record web interface call time started and the end time of calling;
Call the time started according to described and call the end time and determine the processing time, and judging whether the described processing time is less than or equal to the scheduled time.
4. the method for the adjustment of interface process quantity according to claim 1, is characterized in that, the step being increased progressively the accessible maximum concurrent http request number of concurrent invocation acquisition interface by simulation is specially:
The concurrent http request of continuous initiation predetermined quantity is to described interface, and wherein each concurrent http request number of initiating increases progressively with predetermined value;
Judge whether each concurrent http request initiated can process in the given time, if so, then initiates to ask next time; As no, then end simulation process, records the number of processes that this time completes, and the number of processes completed using this time is as the accessible maximum concurrent http request number of interface.
5. an adjustment System for interface process quantity, is characterized in that, comprising:
Number of request module, obtains the accessible maximum concurrent http request number of interface for being increased progressively concurrent invocation by simulation;
Judge module, for obtaining the call request calling end, judges whether current request reaches maximum concurrent http request number;
Processing module, for the treatment of the described call request calling end;
Temporary storage module, calls the call request of end in queue described in storing.
6. the system of the adjustment of interface process quantity according to claim 5, is characterized in that, described request digital-to-analogue block comprises:
Analogue unit, for initiating the concurrent http request of predetermined quantity continuously to described interface;
Judging unit, for judging whether each concurrent http request initiated can process in the given time.
7. the system of the adjustment of interface process quantity according to claim 6, is characterized in that, described judging unit specifically for:
Configuration http reverse proxy, and record web interface call time started and the end time of calling;
Call the time started according to described and call the end time and determine the processing time, and judging whether the described processing time is less than or equal to the scheduled time.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510724174.7A CN105262826A (en) | 2015-10-29 | 2015-10-29 | Method and system for adjusting interface processing amount |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510724174.7A CN105262826A (en) | 2015-10-29 | 2015-10-29 | Method and system for adjusting interface processing amount |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105262826A true CN105262826A (en) | 2016-01-20 |
Family
ID=55102330
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510724174.7A Pending CN105262826A (en) | 2015-10-29 | 2015-10-29 | Method and system for adjusting interface processing amount |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105262826A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105893160A (en) * | 2016-06-24 | 2016-08-24 | 合信息技术(北京)有限公司 | Multi-interface data scheduling method |
CN107885605A (en) * | 2017-11-09 | 2018-04-06 | 郑州云海信息技术有限公司 | It is a kind of to control the system and method that the frequency is called in the API unit time |
CN108512869A (en) * | 2017-02-24 | 2018-09-07 | 贵州白山云科技有限公司 | A kind of method and system handling concurrent data using asynchronization mode |
CN108845869A (en) * | 2018-05-31 | 2018-11-20 | 中国平安人寿保险股份有限公司 | Concurrent request control method, device, computer equipment and storage medium |
CN108920346A (en) * | 2018-06-05 | 2018-11-30 | 北京奇安信科技有限公司 | Web server interface time-consuming statistical method and device |
CN109189509A (en) * | 2018-09-03 | 2019-01-11 | 中国平安人寿保险股份有限公司 | The response method and server that call method, the interface of interface call |
CN109426572A (en) * | 2017-08-29 | 2019-03-05 | 杭州海康威视数字技术股份有限公司 | Task processing method, device and electronic equipment |
CN110401697A (en) * | 2019-06-26 | 2019-11-01 | 苏州浪潮智能科技有限公司 | A kind of method, system and the equipment of concurrent processing HTTP request |
CN109189509B (en) * | 2018-09-03 | 2024-04-26 | 中国平安人寿保险股份有限公司 | Interface calling method, interface calling response method and server |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080208789A1 (en) * | 2007-02-23 | 2008-08-28 | Microsoft Corporation | HTTP acceleration by prediction and pre-fetching |
CN101981539A (en) * | 2008-03-31 | 2011-02-23 | 国际商业机器公司 | Using priority to determine whether to queue an input/output (I/O) request directed to storage |
CN102279884A (en) * | 2011-08-05 | 2011-12-14 | 中国工商银行股份有限公司 | Data acquiring and displaying method, system and Web server based on Web pages |
CN104408088A (en) * | 2014-11-11 | 2015-03-11 | 北京奇虎科技有限公司 | Control method and device for concurrent requests |
CN104717236A (en) * | 2013-12-11 | 2015-06-17 | 中国移动通信集团公司 | Equipment performance test method and device |
-
2015
- 2015-10-29 CN CN201510724174.7A patent/CN105262826A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080208789A1 (en) * | 2007-02-23 | 2008-08-28 | Microsoft Corporation | HTTP acceleration by prediction and pre-fetching |
CN101981539A (en) * | 2008-03-31 | 2011-02-23 | 国际商业机器公司 | Using priority to determine whether to queue an input/output (I/O) request directed to storage |
CN102279884A (en) * | 2011-08-05 | 2011-12-14 | 中国工商银行股份有限公司 | Data acquiring and displaying method, system and Web server based on Web pages |
CN104717236A (en) * | 2013-12-11 | 2015-06-17 | 中国移动通信集团公司 | Equipment performance test method and device |
CN104408088A (en) * | 2014-11-11 | 2015-03-11 | 北京奇虎科技有限公司 | Control method and device for concurrent requests |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105893160A (en) * | 2016-06-24 | 2016-08-24 | 合信息技术(北京)有限公司 | Multi-interface data scheduling method |
CN105893160B (en) * | 2016-06-24 | 2019-09-27 | 合一信息技术(北京)有限公司 | A kind of dispatching method of multi-interface data |
CN108512869A (en) * | 2017-02-24 | 2018-09-07 | 贵州白山云科技有限公司 | A kind of method and system handling concurrent data using asynchronization mode |
CN108512869B (en) * | 2017-02-24 | 2020-02-11 | 北京数安鑫云信息技术有限公司 | Method and system for processing concurrent data in asynchronous mode |
CN109426572A (en) * | 2017-08-29 | 2019-03-05 | 杭州海康威视数字技术股份有限公司 | Task processing method, device and electronic equipment |
CN109426572B (en) * | 2017-08-29 | 2021-07-02 | 杭州海康威视数字技术股份有限公司 | Task processing method and device and electronic equipment |
CN107885605A (en) * | 2017-11-09 | 2018-04-06 | 郑州云海信息技术有限公司 | It is a kind of to control the system and method that the frequency is called in the API unit time |
CN108845869A (en) * | 2018-05-31 | 2018-11-20 | 中国平安人寿保险股份有限公司 | Concurrent request control method, device, computer equipment and storage medium |
CN108920346A (en) * | 2018-06-05 | 2018-11-30 | 北京奇安信科技有限公司 | Web server interface time-consuming statistical method and device |
CN109189509A (en) * | 2018-09-03 | 2019-01-11 | 中国平安人寿保险股份有限公司 | The response method and server that call method, the interface of interface call |
CN109189509B (en) * | 2018-09-03 | 2024-04-26 | 中国平安人寿保险股份有限公司 | Interface calling method, interface calling response method and server |
CN110401697A (en) * | 2019-06-26 | 2019-11-01 | 苏州浪潮智能科技有限公司 | A kind of method, system and the equipment of concurrent processing HTTP request |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105262826A (en) | Method and system for adjusting interface processing amount | |
CN105554102A (en) | Elastic expansion method based on container cluster and application system thereof | |
CN105897836A (en) | Back source request processing method and device | |
CN109669758A (en) | Concocting method, device, equipment and the storage medium of server resource | |
CN105007337A (en) | Cluster system load balancing method and system thereof | |
CN107800768A (en) | Open platform control method and system | |
CN104954478A (en) | System and method for realizing automatic longitudinal scaling of server in cloud computing platform | |
CN102316133A (en) | Method and device for balancing load | |
CN110995617B (en) | MQTT-based data transmission method and device, computer equipment and storage medium | |
CN105721552A (en) | Method for implementing dynamic load balancing based on domain name system (DNS) and DNS | |
CN112395075A (en) | Resource processing method and device and resource scheduling system | |
CN107682391A (en) | Electronic installation, server-assignment control method and computer-readable recording medium | |
CN103856558B (en) | A kind of data processing method and device for terminal applies | |
CN104202305A (en) | Transcoding processing method and device, server | |
CN105554049A (en) | Distributed traffic control method and equipment | |
CN104184765A (en) | Request control method, client apparatus and server-side apparatus | |
CN112817753A (en) | Task processing method and device, storage medium and electronic device | |
CN105407059A (en) | QoS scheduler and scheduling method for SCSI target device | |
CN109597674A (en) | A kind of shared virtualization pool share dispatching method and system | |
CN106489254A (en) | Service access control method, device and colony terminal in broadband cluster system | |
CN105873223A (en) | Service scheduling method, service scheduling device, wireless network controller and base station | |
CN103761192A (en) | Internal memory distributing method and device | |
CN106886458B (en) | Cluster resource allocation method and device | |
CN110995802A (en) | Task processing method and device, storage medium and electronic device | |
CN109104334B (en) | Management method and device for nodes in monitoring system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20160120 |
|
RJ01 | Rejection of invention patent application after publication |