CN102024008A - Limitation method of Web server concurrent number - Google Patents

Limitation method of Web server concurrent number Download PDF

Info

Publication number
CN102024008A
CN102024008A CN2009103067638A CN200910306763A CN102024008A CN 102024008 A CN102024008 A CN 102024008A CN 2009103067638 A CN2009103067638 A CN 2009103067638A CN 200910306763 A CN200910306763 A CN 200910306763A CN 102024008 A CN102024008 A CN 102024008A
Authority
CN
China
Prior art keywords
inquiry
database
big
link block
web server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2009103067638A
Other languages
Chinese (zh)
Inventor
裴旭斌
王伟峰
蒋鸿城
涂莹
贺燕
李熊
郁春雷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Corp of China SGCC
Zhejiang Electric Power Co
Original Assignee
Zhejiang Electric Power Co
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Electric Power Co filed Critical Zhejiang Electric Power Co
Priority to CN2009103067638A priority Critical patent/CN102024008A/en
Publication of CN102024008A publication Critical patent/CN102024008A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a limitation method of a Web server concurrent number, relating to the field of information technologies. In a three-tier system framework, the Web server accesses to a database by a connection pool; when user requests have certain large statics or inquiry, the connection pool is gradually used up by the requests, thus the whole system stops responding. In the limitation method of a Web server concurrent number, after transferring client-side information to the functional module of each service, the database connection pool is accessed by an inquiry connection module; the inquiry connection module is divided into a large inquiry connection module and a common inquiry connection module, wherein the large inquiry connection module has the maximum total concurrent number; when a user side submits a large inquiry request, if the request number is smaller than the maximum total concurrent number, one database connection is obtained from the database connection pool, and a database access request is submitted to the database server by the connection; otherwise, the user is prompted to wait. The maximum total concurrent number is set to limit large inquiry connection amount and ensure the response capability of common inquiry.

Description

A kind of concurrent several method for limiting of Web server
[technical field]
The present invention relates to areas of information technology, refer to the method for limiting of the concurrent quantity of a kind of Web server especially.
[background technology]
In L 3 architecture, Web server visits database by database connection pool usually.After a user asked to submit to, Web server found the connection of a free time from connection pool, use this connected reference database then, and after visit was finished, this connection was released, and can be used to user's request next time.When the user asks, if there is not idle connection, this request will be in waiting status.
The size of connection pool depends on that on the one hand the frequency that the user asks is connected the time that is spent with each the use, also is subjected to the restriction of database service ability on the other hand.When database access required time each time very in short-term, the database in the connection pool connects and is constantly used and discharge, connection pool does not need just can satisfy the demands too greatly.But when having some big statistics or inquiry in user's request, request each time all will take the connection long time, connection pool will be exhausted by these requests gradually, cause finally that all users request needs to use database resource what all be in waiting status, total system will present and almost stop the phenomenon to respond.
In order to address this problem, some application system is separated general inquiry and big inquiry, sets up a Query Database for big inquiry specially, thus the performance of assurance general inquiry application.But increase storage space like this, be not easy to the management of data.
[summary of the invention]
The technical assignment of the technical problem to be solved in the present invention and proposition is that the prior art scheme is improved and improved, and the method for limiting of the concurrent quantity of a kind of Web server is provided, and makes the inquiry of low-response can not have influence on the global response ability of system.
For this reason, the present invention takes following technical scheme:
1, a kind of concurrent several method for limiting of Web server is characterized in that it may further comprise the steps:
(1) establish database connection pool, inquiry link block and a plurality of business function module in Web server, each business function module is by inquiry link block accessing database connection pool;
(2) size according to the spent database resource of data base querying of each business function module is divided into big inquiry business functional module and general inquiry business function module, and will inquire about link block be divided into big inquiry link block with generally be connected enquiry module make each business function module respectively with big inquiry link block or the corresponding connection of general inquiry module;
(3) inquire about link block greatly and be provided with total counter and maximum total concurrent number, the initial value of total counter is 0;
(4) when user side is submitted big query requests to Web server to, more total basic counter value and maximum total concurrent number in big inquiry link block, if the total counter value is less than the total concurrent number of maximum, then the total counter value is added 1, obtain a database from database connection pool then and connect, and connect to database server submission database access request by this; Otherwise user waiting prompt; After database request is returned and discharged the database connection, the total counter value is subtracted 1.
With every inquiry business according to time length classification that one time accessing database spent, time short as the general inquiry business, the big inquiry business of conduct that time is long, be converted into data base query language through business function module after the client input inquiry information, and connect with corresponding big inquiry link block or general inquiry link block, big inquiry business is managed in big inquiry link block, and the general inquiry business is managed in the general inquiry link block.In big inquiry link block, set up total counter and maximum total concurrent number, by setting the big inquiry of maximum total concurrent number restriction number of connection, the big inquiry of restriction under the prerequisite that does not increase database, has guaranteed the responding ability of general inquiry to the influence of general inquiry.
As the further of technique scheme improved and replenish, the present invention also comprises following additional technical feature:
Described big inquiry link block comprises a plurality of and big corresponding big inquiry linkage unit of inquiry business functional module, and described each big inquiry linkage unit is equipped with Counter Value and maximum concurrent number.The foundation of the big inquiry linkage unit in the Web server, refinement connects, and helps to reduce query time.
When user side is submitted big query requests to Web server to, judge whether the counter of corresponding big inquiry linkage unit and the total counter of big inquiry link block reach maximum concurrent number and maximum total concurrent number, if all do not reach, then these two counters are added 1 respectively, submit the database access request then to; Otherwise user waiting prompt; After database request is returned, these two counters are subtracted 1 respectively.Big inquiry link block is established maximum total concurrent number, and each big inquiry linkage unit is equipped with maximum concurrent number, to control the concurrent number of same big inquiry, avoids influencing other big inquiry response, improve the utilization factor of data resource, guaranteed the responding ability of general inquiry simultaneously.
Beneficial effect:, under the prerequisite that does not increase database, guaranteed the responding ability of general business by restriction to the concurrent number of big inquiry.
[description of drawings]
Fig. 1 is a structure principle chart of the present invention.
Fig. 2 is a process flow diagram of the present invention.
[embodiment]
Below in conjunction with Figure of description technical scheme of the present invention is described in further detail.
As shown in Figure 1, the hardware that the present invention relates to has web server, database server, set up database connection pool, inquiry link block and a plurality of business function module in the web server, client-side information is connected with the accessing database connection pool with the inquiry link block by the business function module in the server.Wherein because of the query contents difference of client input, be divided into a plurality of big inquiry businesses and general inquiry business, above-mentioned business corresponds respectively to each business function module, conversion by each business function module, computing are connected with corresponding inquiry link block after forming data base query language, and wherein big inquiry business is inquired about the linkage unit connection greatly by m corresponding in m business function module and the big inquiry link block is individual; In big inquiry link block, be provided with total counter and maximum total concurrent number, and each big inquiry linkage unit is all established counter and maximum concurrent number.
As shown in Figure 2, the present invention includes following steps:
1, imports big Query Information by client;
2, Query Information is compiled into behind the data base query language with corresponding big inquiry link block by business function module and connects; Judge whether the counter of corresponding big inquiry linkage unit and the total counter of big inquiry link block reach maximum concurrent number and maximum total concurrent number, if all do not reach, then these two counters are added 1 respectively, otherwise user waiting prompt;
3, treat that two counters add 1 after, from database connection pool, obtain one and connect and carry out querying command;
4, after database request is returned and discharged the database connection, these two counters are subtracted 1 respectively;
5, show Query Result to the client.
Illustrate as follows:
Suppose to have 2 big inquiry businesses, the counter of the corresponding big inquiry linkage unit of Web server is respectively c1 and c2, and maximum concurrent number is respectively C1MAX and C2MAX; Total counter is c, and maximum concurrent number is CMAX.
Initialization: c1=0, c2=0.
When the user submits first big query requests to, whether before accessing database, check c1<C1MAX and c<CMAX condition
Satisfy, if satisfy, c1=c1+1 then, c=c+1, and submit the database access request to; Otherwise user waiting prompt.After database access is returned, carry out c1=c1-1, c=c-1.

Claims (3)

1. concurrent several method for limiting of a Web server is characterized in that it may further comprise the steps:
(1) establish database connection pool, inquiry link block and a plurality of business function module in Web server, each business function module is by inquiry link block accessing database connection pool;
(2) size according to the spent database resource of data base querying of each business function module is divided into big inquiry business functional module and general inquiry business function module, and will inquire about link block be divided into big inquiry link block with generally be connected enquiry module make each business function module respectively with big inquiry link block or the corresponding connection of general inquiry module;
(3) inquire about link block greatly and be provided with total counter and maximum total concurrent number, the initial value of total counter is 0;
(4) when user side is submitted big query requests to Web server to, more total basic counter value and maximum total concurrent number in big inquiry link block, if the total counter value is less than the total concurrent number of maximum, then the total counter value is added 1, obtain a database from database connection pool then and connect, and connect to database server submission database access request by this; Otherwise user waiting prompt; After database request is returned and discharged the database connection, the total counter value is subtracted 1.
2. according to concurrent several method for limiting of a kind of Web server shown in the claim 1, it is characterized in that: described big inquiry link block comprises a plurality of and big corresponding big inquiry linkage unit of inquiry business functional module, and described each big inquiry linkage unit is equipped with Counter Value and maximum concurrent number.
3. according to concurrent several method for limiting of a kind of Web server shown in the claim 2, it is characterized in that: when user side is submitted big query requests to Web server to, judge whether the counter of corresponding big inquiry linkage unit and the total counter of big inquiry link block reach maximum concurrent number and maximum total concurrent number, if all do not reach, then these two counters are added 1 respectively, submit the database access request then to; Otherwise user waiting prompt; After database request is returned and discharged the database connection, these two counters are subtracted 1 respectively.
CN2009103067638A 2009-09-09 2009-09-09 Limitation method of Web server concurrent number Pending CN102024008A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009103067638A CN102024008A (en) 2009-09-09 2009-09-09 Limitation method of Web server concurrent number

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009103067638A CN102024008A (en) 2009-09-09 2009-09-09 Limitation method of Web server concurrent number

Publications (1)

Publication Number Publication Date
CN102024008A true CN102024008A (en) 2011-04-20

Family

ID=43865311

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009103067638A Pending CN102024008A (en) 2009-09-09 2009-09-09 Limitation method of Web server concurrent number

Country Status (1)

Country Link
CN (1) CN102024008A (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102881050A (en) * 2012-09-19 2013-01-16 中国联合网络通信集团有限公司 Ticket processing method and system
CN103793455A (en) * 2012-10-30 2014-05-14 国际商业机器公司 Method and system for reducing lock occurrences in server/database systems
CN104063451A (en) * 2014-06-23 2014-09-24 北京京东尚科信息技术有限公司 Database connection management method and system
CN104281587A (en) * 2013-07-03 2015-01-14 阿里巴巴集团控股有限公司 Connection establishing method and device
CN104463062A (en) * 2014-11-03 2015-03-25 腾讯科技(深圳)有限公司 Access method and system based on two-dimensional code scanning
CN105718452A (en) * 2014-12-01 2016-06-29 金蝶软件(中国)有限公司 Data query method and system
CN106156339A (en) * 2016-07-12 2016-11-23 泰康保险集团股份有限公司 Declaration form the management access method of system, Apparatus and system
CN106302390A (en) * 2016-07-27 2017-01-04 福建富士通信息软件有限公司 A kind of method limited based on NGINX access frequency and system
CN107346308A (en) * 2016-05-04 2017-11-14 阿里巴巴集团控股有限公司 The call method and device of data in a kind of group system
CN107544849A (en) * 2017-09-30 2018-01-05 北京天元创新科技有限公司 A kind of WEB server concurrency management method and system
CN108920722A (en) * 2018-08-01 2018-11-30 郑州云海信息技术有限公司 A kind of method, apparatus and computer storage medium of parameter configuration
CN108959292A (en) * 2017-05-19 2018-12-07 北京京东尚科信息技术有限公司 A kind of data uploading method, system and computer readable storage medium
CN109408575A (en) * 2018-10-19 2019-03-01 广东省气象探测数据中心 A kind of data access service system
CN109547548A (en) * 2018-11-26 2019-03-29 广州微算互联信息技术有限公司 Cloud mobile phone concurrently connects the processing method and system of limitation
CN113132460A (en) * 2021-03-10 2021-07-16 浙江学海教育科技有限公司 Online test paper submitting method, device, equipment and medium

Cited By (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102881050A (en) * 2012-09-19 2013-01-16 中国联合网络通信集团有限公司 Ticket processing method and system
CN102881050B (en) * 2012-09-19 2015-02-25 中国联合网络通信集团有限公司 Ticket processing method and system
US9552386B2 (en) 2012-10-30 2017-01-24 International Business Machines Corporation Reducing lock occurrences in server/database systems
CN103793455A (en) * 2012-10-30 2014-05-14 国际商业机器公司 Method and system for reducing lock occurrences in server/database systems
CN103793455B (en) * 2012-10-30 2017-04-26 国际商业机器公司 Method and system for reducing lock occurrences in server/database systems
US9558227B2 (en) 2012-10-30 2017-01-31 International Business Machines Corporation Reducing lock occurrences in server/database systems
US9524313B2 (en) 2012-10-30 2016-12-20 International Business Machines Corporation Reducing lock occurrences in server/database systems
US9524314B2 (en) 2012-10-30 2016-12-20 International Business Machines Corporation Reducing lock occurrences in server/database systems
CN104281587A (en) * 2013-07-03 2015-01-14 阿里巴巴集团控股有限公司 Connection establishing method and device
CN104281587B (en) * 2013-07-03 2018-05-11 阿里巴巴集团控股有限公司 A kind of method and device for establishing connection
CN104063451B (en) * 2014-06-23 2019-03-26 北京京东尚科信息技术有限公司 A kind of database connection management method and system
CN104063451A (en) * 2014-06-23 2014-09-24 北京京东尚科信息技术有限公司 Database connection management method and system
CN104463062A (en) * 2014-11-03 2015-03-25 腾讯科技(深圳)有限公司 Access method and system based on two-dimensional code scanning
CN104463062B (en) * 2014-11-03 2017-03-22 腾讯科技(深圳)有限公司 Access method and system based on two-dimensional code scanning
CN105718452A (en) * 2014-12-01 2016-06-29 金蝶软件(中国)有限公司 Data query method and system
CN107346308B (en) * 2016-05-04 2020-07-28 阿里巴巴集团控股有限公司 Method and device for calling data in cluster system
CN107346308A (en) * 2016-05-04 2017-11-14 阿里巴巴集团控股有限公司 The call method and device of data in a kind of group system
CN106156339A (en) * 2016-07-12 2016-11-23 泰康保险集团股份有限公司 Declaration form the management access method of system, Apparatus and system
CN106302390A (en) * 2016-07-27 2017-01-04 福建富士通信息软件有限公司 A kind of method limited based on NGINX access frequency and system
CN108959292B (en) * 2017-05-19 2021-03-30 北京京东尚科信息技术有限公司 Data uploading method, system and computer readable storage medium
CN108959292A (en) * 2017-05-19 2018-12-07 北京京东尚科信息技术有限公司 A kind of data uploading method, system and computer readable storage medium
CN107544849A (en) * 2017-09-30 2018-01-05 北京天元创新科技有限公司 A kind of WEB server concurrency management method and system
CN108920722B (en) * 2018-08-01 2021-03-19 苏州浪潮智能科技有限公司 Parameter configuration method and device and computer storage medium
CN108920722A (en) * 2018-08-01 2018-11-30 郑州云海信息技术有限公司 A kind of method, apparatus and computer storage medium of parameter configuration
CN109408575B (en) * 2018-10-19 2020-11-10 广东省气象探测数据中心 Data access service system
CN109408575A (en) * 2018-10-19 2019-03-01 广东省气象探测数据中心 A kind of data access service system
CN109547548A (en) * 2018-11-26 2019-03-29 广州微算互联信息技术有限公司 Cloud mobile phone concurrently connects the processing method and system of limitation
CN113132460A (en) * 2021-03-10 2021-07-16 浙江学海教育科技有限公司 Online test paper submitting method, device, equipment and medium
CN113132460B (en) * 2021-03-10 2023-04-07 浙江学海教育科技有限公司 Online test paper submitting method, device, equipment and medium

Similar Documents

Publication Publication Date Title
CN102024008A (en) Limitation method of Web server concurrent number
CN109951545B (en) Self-adaptive container and cloud desktop fusion system and method for acquiring cloud resources by using same
CN101997854B (en) Processing system and method for providing data service
US7831636B2 (en) Technique for the migration of a host environment to a new system platform
CN102262680B (en) Distributed database proxy system based on massive data access requirement
CN101163133B (en) Communication system and method of implementing resource sharing under multi-machine virtual environment
US20160140205A1 (en) Queries involving multiple databases and execution engines
CN105824957A (en) Query engine system and query method of distributive memory column-oriented database
CN101556678A (en) Processing method of batch processing services, system and service processing control equipment
WO2020220717A1 (en) Decoupling elastic data warehouse architecture
CN109840144B (en) Information service scheduling method and system for cross-mechanism batch service request
CN103297499A (en) Scheduling method and system based on cloud platform
CN103744719A (en) Lock management method, lock management system, lock management system configuration method and lock management system configuration device
CN103677759A (en) Objectification parallel computing method and system for information system performance improvement
CN103425536A (en) Test resource management method oriented towards distributed system performance tests
CN113301590B (en) Virtual resource management and control system facing 5G access network
CN107391256A (en) A kind of relay protection fixed value setting computing architecture and method based on cloud computing technology
CN108984571A (en) Transaction Identifier operating method, system and computer readable storage medium
CN105683941A (en) Regulating enterprise database warehouse resource usage
CN103838781A (en) Database access method and system
CN109002364A (en) Optimization method, electronic device and the readable storage medium storing program for executing of interprocess communication
JP3844933B2 (en) Database server processing method
CN107797758B (en) Date storage method, data access method and device
CN109871394B (en) Full-distributed high-concurrency calculation method and device
US20220383219A1 (en) Access processing method, device, storage medium and program product

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
ASS Succession or assignment of patent right

Owner name: STATE GRID CORPORATION OF CHINA

Effective date: 20121231

C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20121231

Address after: 310007 Huanglong Road, Hangzhou, Zhejiang, No. 8, No.

Applicant after: Zhejiang Electric Power Company

Applicant after: State Grid Corporation of China

Address before: 310007 Huanglong Road, Hangzhou, Zhejiang, No. 8, No.

Applicant before: Zhejiang Electric Power Company

C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20110420