CN1997000A - Virtual-host-based web server and method for user obtaining access data - Google Patents

Virtual-host-based web server and method for user obtaining access data Download PDF

Info

Publication number
CN1997000A
CN1997000A CN 200510048886 CN200510048886A CN1997000A CN 1997000 A CN1997000 A CN 1997000A CN 200510048886 CN200510048886 CN 200510048886 CN 200510048886 A CN200510048886 A CN 200510048886A CN 1997000 A CN1997000 A CN 1997000A
Authority
CN
China
Prior art keywords
module
web
data object
user
data
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
CN 200510048886
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN 200510048886 priority Critical patent/CN1997000A/en
Publication of CN1997000A publication Critical patent/CN1997000A/en
Pending legal-status Critical Current

Links

Images

Abstract

This invention discloses one web servo based on virtual host, which comprises the following parts: high property http process unit to receive user parallel connection to get user needed data subject to user from web buffer unit; web buffer unit to store buffer data subject property and consent; buffer manager to receive high property http process unit load require to get needed data subject from relative business module to load onto web buffer unit. This invention also discloses one method to get visit data through web servo based on virtual host by user.

Description

A kind of based on the web server of fictitious host computer and the method for user obtaining access data
Technical field
The present invention relates to World Wide Web (web) server technology, be meant a kind of especially based on the web server of fictitious host computer and the method for user obtaining access data.
Background technology
Continuous development along with the Internet, network is dissolved in people's the life gradually, various Internet services and application emerge in an endless stream, and people get used to issuing in portal website and obtaining various informations gradually, get used to concluding the business or the like on e-commerce site.So, the status of the web server in each portal website and the e-commerce site is just more and more important, and the performance of web server, capacity and extensibility are determining each website and website that the quality and the speed of service are provided.
At present, relatively Chang Yong web server has Apache Server, and the framework of this web server is mainly the process pool model, and the employing process pre-creates (pre-fork) mode.Specifically, as shown in Figure 1, Apache Server is provided with a lot of process httpd in process pool, is respectively applied for and carries out different business, realizes different functions.Wherein, it is main management (manager) process httpd that a process is arranged, and is responsible for creating, dispatching and manage an above worker (worker) process httpd, and worker's process httpd also can be described as subprocess here.Usually, the main management process in the process pool can be pre-created a plurality of worker's process httpd, and each worker's process httpd competition permission (accept) receives the http request of also process user transmission; The main management process dynamically increases or reduces the number of subprocess by the loading condition of each subprocess in the monitoring process pond.The specific transactions request of submitting to for the user is as carrying out cgi script etc., and worker's process httpd will further create new Business Processing (process) process and handle.
In Apache Server, though adopted process to pre-create mode, but the dynamic adjustment of worker's process all can relate to the establishment and the deletion of process in the execution of Business Processing process, the process pool, and the establishment of process is bigger with the deletion expense, especially under the situation of user's large concurrent visit, CPU time often consumes in a large number on the context that process is asked switches, so, the overall performance of system is sharply descended, and long, phenomenons such as server does not connect, response timeout of processing time can occur responding.Obviously, the frame model of Apache Server has determined its large concurrent that is difficult to supporting user visit, when the situation of user's large concurrent visit occurring, just may cause the paralysis of web server.
And as can be seen from Figure 1, Apache Server framework itself does not comprise any buffer memory (cache) mechanism, so, each dynamic http request all needs to be submitted to backstage Business Processing process to be handled, so, make that the response processing time of single request is slower, efficient is not high.
At the defective that the Apache Server performance exists, engendered some web server design that adopt one process to simplify in the existing network, the Thttpd server of ACME is exactly one of them representative.The framework of Thttpd server adopts one process select+non-blocking I/O model, does not have the time overhead that context switches between process creation and destruction and process.And, in the Thttpd server, adopt certain caching mechanism, as use Hash figure (hash map)+mmap technology, and can improve the access efficiency of user to local static page and file, be extensive use of in the bigger static page file access occasion of some visit capacities at present.
Though the Thttpd server can improve certain access efficiency, support the visit of user's large concurrent, because its server framework employing is the one process model, therefore, do not have good service logic autgmentability; And, for dynamic page generate, scenes such as remote data obtains, service conversation checking, the Thttpd server need go to handle to each request equally by creating a new process, so under the scene of dynamic data request, system effectiveness is still lower.
And, though the Thttpd server provides certain caching mechanism, but the inefficacy of data object and superseded in the buffer memory by timer decision in the server, not by concrete service application decision, and under different service application scenes the out-of-service time of data object be provided with and the data object replacement policy different often, therefore, the Thttpd server can't satisfy all professional application scenarioss well.In addition, the caching mechanism of Thttpd server is only at the static data that obtains from disk, not the data that dynamically generate of supporting business.
Generally speaking, owing to use the pre-fork transaction module, often efficient is hanged down the user capture that is difficult to support large concurrent such as web servers such as Apache Servers; And such as web servers such as Thttpd servers owing to use the one process model, adopt the method for synchronization to handle, as shown in Figure 2, the request that server iterative processing user side sends, in this case, if server need carry out bigger operation consuming time such as disk reads, the SSI mode reads, business logic processing etc., the user just may appear owing to wait in line server process and overtime phenomenon, as seen, adopt the one process model higher for the access efficiency of simple local static page and picture, but do not have good service logic autgmentability, be difficult to support dynamic page to generate, remote data obtains, scenes such as service conversation checking, even support in the CGI mode, also need create a process to each request and handle (process-per-req), efficient is lower.
In addition, though Apache Server and Thttpd server can both be supported many fictitious host computers vhost technology, that is to say, for being deployed in the different a plurality of fictitious host computers of domain name on same the physical equipment, process httpd in Apache Server or the Thttpd server can both be according to the configuration of virtual Domain Name, dynamic creation also moves the difference request that the corresponding background business process comes process user, but, Apache Server and Thttpd server all can not provide any service quality (QoS) to distinguish to the processing of different virtual main frame, thereby can't satisfy application demand and the scene that the different virtual main frame is provided different QoS.
Summary of the invention
In view of this, main purpose of the present invention is to provide a kind of web server based on fictitious host computer, can provide different QoS demands to the different virtual main frame when improving system effectiveness, extensibility and supporting the large concurrent visit.
Another object of the present invention is to provide a kind of user by obtain the method for visit data based on the web server of fictitious host computer, can when improving system effectiveness, supporting the large concurrent visit, provide different QoS demands the different virtual main frame.
For achieving the above object, technical scheme of the present invention is achieved in that
A kind of web server based on fictitious host computer, this server comprises: high-performance http process unit, web buffer unit and cache manager;
Wherein, high-performance http process unit is used to accept user's concurrent connection, obtains the user requested data object according to user's request from the web buffer unit and returns to the user, and notify cache manager when the needs loaded data object; The web buffer unit is used for the attribute and the data content of data cached object; Cache manager is used to receive the load request of high-performance http process unit, obtains required data object from corresponding service module group, is loaded in the web buffer unit.
Wherein, described high-performance http process unit further comprises: high-efficiency network I/O interface, be used to accept user's concurrent request, and instruction web cache read module reads required data object in the web buffer unit, and the data object that obtains is returned to the user; The fictitious host computer configuration module is used to provide the fictitious host computer configuration information; The qos policy module is used to store and qos policy based on fictitious host computer is provided; Web cache read module is used to receive the instruction of high-efficiency network I/O interface, reading corresponding data object from the web buffer unit.
Described high-performance http process unit also comprises: among system monitoring module, system journal module, the access control module three at least one; Wherein, the system monitoring module is used for the ruuning situation of each service module of monitoring system, when service module occurs unusual or collapses, restarts the respective service module; The system journal module is used for user capture situation, the system operation situation of register system run duration; Access control module is used to carry out security audit and protection to the web server is provided.
Described web buffer unit further comprises: element registration form, the tabulation of internal storage data bucket; Wherein, the element registration form is used to preserve the attribute information of data object; The internal storage data bucket is tabulated, and is used to store the data content of data object.
Described web buffer unit also comprises: disk file system is used to store use not frequently but the data object that did not lose efficacy.
Described cache manager further comprises: protocol process module, web buffer memory writing module, SSI module and based on fictitious host computer event scheduling module;
Wherein, protocol process module, be used to finish and high-performance httpd process unit between, and each business module group between the parsing and the encapsulation of communication protocol; Web buffer memory writing module is used to receive the instruction based on fictitious host computer event scheduling module, writes data object to the web buffer unit; The SSI module is used for the various functions that back-level server comprises; Based on fictitious host computer event scheduling module, be used for that the request that high-performance httpd process unit is sent is assigned to different business module group and handle.
Described cache manager also comprises: the buffer memory adjusting module, and according to the position of user capture situation dynamic adjusting data object in the web buffer unit.
Described cache manager also comprises: local acquisition module is used for obtaining the data that are kept at disk file system.
The present invention also discloses a kind of user by obtain the method for visit data based on the web server of fictitious host computer, and key is, the request of the concurrent reception user's access data of web server is carried out following steps to each visit data request:
The a.web server obtains the required data object of user after confirming request effectively from the web buffer memory;
B. judge whether to get access to the required data object of user, if get access to, then the web server returns required data object to relative users; If do not get access to, the web server is loaded in the web buffer memory according to fictitious host computer configuration data object that the user is required from the corresponding service module group that self connects, and again loaded data object in the web buffer memory is returned to the user afterwards;
Wherein, for the different access request of data, describedly obtain data object, loading data and the processing that data object returns to the user is realized with asynchronous system.
The data object that gets access to described in the step b is: the data object that did not lose efficacy in the web buffer memory or for having lost efficacy in the web buffer memory but can postpone the loaded data object.
This method further comprises: two-stage web buffer memory is set, will uses frequent data object to be cached in the internal memory of web buffer memory, will use not frequently but the data object that did not lose efficacy is cached in the local disk of web buffer memory.
This method further comprises: according to the position of user capture situation dynamic adjusting data object in buffer memory.
This method further comprises: set in advance the qos policy based on fictitious host computer.Described qos policy is the network bandwidth that control data send window size, control and managing web server are had.
This method further comprises: described web server uses the network event informing mechanism to monitor the network event that triggers on each web socket.
Provided by the present invention based on the web server of fictitious host computer and the method for user obtaining access data, have following advantage and characteristics:
1) because web server of the present invention adopts high-efficiency network I/O interface and corresponding qos policy is set, can make system's performance under the situation of user's large concurrent visit sane;
2) owing in web server of the present invention, be provided with the web buffer unit, the attribute and the data of some data objects that can cache user will visit, therefore can quicken user capture and delayed data object loads, even and then make the web server under the situation of user's large concurrent visit, still can guarantee user's efficient access, make user's average response time very short, efficient is very high and the performance is stable.
3) in web server of the present invention, be provided with cache manager, can carry out effectively the web buffer unit, manage flexibly, and, can connect the business module group of a plurality of realization different business based on the event scheduling module of fictitious host computer in the cache manager, so, can not only support to separate, but also make the web server have good professional autgmentability, can increase new business module at an easy rate to adapt to different business scenarios based on the incident multichannel of fictitious host computer.
Description of drawings
Fig. 1 is an Apache Server frame structure schematic diagram in the prior art;
Fig. 2 is a Synchronous Processing mode schematic diagram;
Fig. 3 is the overall system frame structure schematic diagram of web server of the present invention;
Fig. 4 is the realization principle schematic of web server asynchronous process mode of the present invention;
Fig. 5 is a web server performance effect schematic diagram 1 of the present invention;
Fig. 6 is a web server performance effect schematic diagram 2 of the present invention;
Fig. 7 is a web server performance effect schematic diagram 3 of the present invention;
Fig. 8 is a web server performance effect schematic diagram 4 of the present invention;
Fig. 9 is a web server performance effect schematic diagram 5 of the present invention;
Figure 10 is a web server performance effect schematic diagram 6 of the present invention.
Embodiment
As shown in Figure 3, the present invention proposes a kind of web server, comprises three parts: high-performance http process unit (High performance httpd) 31, web buffer unit (web cache component) 32, cache manager (cache manager) 33.Wherein, high-performance http process unit 31 is used to accept user's concurrent connection, the http request that the user submits to is analyzed, according to required data object attribute and the data of user's acquisition request user and return to the user; Web buffer unit 32 is used for the attribute and the data content of data cached object; Cache manager 33, be used to receive the load request of high-performance http process unit 31, and according to the request obtain required data object from corresponding service module group, be loaded in the web buffer unit, further can be according to user accesses data object situation, the position of dynamic adjusting data object in the internal storage data bucket.Here, cache manager 33 supports the data object of three kinds of modes to load: local disk loads, business module dynamically generates or to remote data center obtain, the local loading and combination that RDO obtains.
Between high-performance http process unit 31 and the cache manager 33, between high-performance http process unit 31 and the web buffer unit 32, all carry out the mutual of signaling and data between web buffer unit 32 and the cache manager 33 by the communication information formation.Such as: when data object loaded, cache manager 33 received the load request that high-performance http process unit 31 send, and inwardly deposited into the line data object according to the configuration of fictitious host computer from local disk and loaded; Or notice corresponding business module, obtain the desired data object from business module, afterwards data object is loaded in the web buffer unit, the position with institute's loaded data object internal storage data bucket in the web buffer unit after loading is finished returns to high-performance http process unit 31.
Here, the message that communicates between high-performance http process unit 31, web buffer unit 32 and cache manager 33 threes can adopt self-defining message structure, as long as communicating pair consults message format in advance, both sides can discern mutually and get final product.Such as: the message structure between high-performance http process unit 31 and the cache manager 33 can comprise following information: positional information in registration table of domain name, the connection identifier of the key assignments of request type, request object (URI), request, the timestamp of transmission request, institute's requested data object, query type, user agent's information, IP address information, http requesting method, request serial number or the like; Can further include: the internal memory barrel number of data object in buffer memory, core position, result, the change time of data object, the information such as expire time of data object.
Equally, communication information between cache manager 33 and each the concrete business module group also can adopt self-defined message, generally comprises following information: positional information in registration table of the timestamp of the domain name of the request message type of type of message, front end applications, the key assignments of request object, request, connection identifier, transmission request, institute's requested data object, query type, user agent's information, IP address information, http requesting method, request serial number etc.
Specifically, high-performance http process unit 31 further comprises:
High-efficiency network I/O interface (Efficient network I/O interface) 311, be used to connect the concurrent request that the user accepts the user, read required data object in instruction web cache read module 317 to the web buffer units 32, and the data object that obtains is returned to the user; Whether also be provided with the protocal analysis processing module in high-efficiency network I/O interface 311 inside, it is effective to be used for analyzing the request that is received, if effectively, continue follow-up processing of obtaining the desired data object, otherwise just abandon, does not handle;
System monitoring module (Monitor module) 312 is used for each service module ruuning situation of monitoring system, occurs unusual or during collapse, the respective service module is restarted at any service module;
System journal module (Logger module) 313, be mainly used in the information such as user capture situation, system operation situation of register system run duration, wherein, the user capture situation that is write down can be used to analyze user's behavioural habits, may further be e-commerce site data mining is provided, the system operation situation that is write down is used for system manager's monitoring and capacity planning;
Fictitious host computer configuration module (Vhost conf module) 314 is used to provide the fictitious host computer configuration information, that is to say that other any module can be obtained the fictitious host computer configuration information from this module;
Access control module (Access control module) 315 is used to carry out security audit and the protection that provides the web server, such as: the correctness to message is checked; For another example: Access Control Policy can be set the access frequency of certain IP is limited, and then avoid same IP attack visit etc.;
Qos policy module (QoS strategy module) 316 is used to store and provide the qos policy based on fictitious host computer that sets, such as: control is set to strategies such as the speed of user's return data, flows;
Web cache read module (web cache reader) 317 is used to receive the instruction of high-efficiency network I/O interface 311, from web buffer unit reading corresponding data object properties and data.
Wherein, the function of system monitoring module 312, system journal module 313 and access control module 315 all is to be provided with for the overall system performance that makes the web server is more perfect, safer, so these three modules belong to optional module.Certainly, in actual applications, preferably three modules all are provided with.
High-performance http process unit 31 receives user's request: high-efficiency network I/O interface 311 is accepted the user's access data request, http request the carrying out protocal analysis of the user being submitted to by browser by the protocal analysis processing module of self inside, if it is invalid to ask, then directly abandon and do not process, if request effectively, then can notify web cache read module 317 reading corresponding data object properties and data from web buffer unit 32 according to analysis result, described attribute comprises change time, out-of-service time or the like.When the reading of data object, if the data object that will read in the web buffer unit 32 did not lose efficacy, then behind the web cache read module 317 reading of data objects, by high-efficiency network I/O interface 311 corresponding multipurpose Internet mail extension agreement (MIME) head is set, the data of respective data object are returned to the user; If having lost efficacy, the data object that will read in the web buffer unit 32 can postpone to load, then web cache read module 317 reads the data of the data object of temporary transient inefficacy, return to the user by high-efficiency network I/O interface 311, and notify the more content of new data-objects of cache manager 33; Loaded if the data object in the web buffer unit 32 loses efficacy and can not postpone, then high-performance http process unit 31 is notified the more content of new data-objects of cache managers 33, and whole process is an asynchronous procedure.
Here, described asynchronous procedure is meant: when the data object that the user in being stored in web buffer unit 32 asks to visit had lost efficacy, high-performance http process unit 31 will send the data object load request to cache manager 33, afterwards, high-performance http process unit 31 can continue to finish other operation, and need not to wait for that replying of cache manager just carry out other operations; Equally, for cache manager 33, after receiving the request that front end high-performance http process unit 31 is sent, will separate according to the multichannel that being configured into of fictitious host computer acted part, that is: request message is sent to respectively in the corresponding business module group and handle; Accordingly, finish processing in each business module group, after the data object that the user is asked to visit is loaded into internal memory, cache manager 33 can be given high-performance http process unit 31 echo replies, and the data of the data object that the user after high-performance http process unit 31 will load again is required send to the user.
As shown in Figure 4, high-performance http process unit 31 receives the request that clients require visit datas--request 1, request 2, request 3 and ask 4.For request 3 and request 4, the data object that the user asks to visit exists in buffer unit and not inefficacy, and then the high-performance http process unit 31 direct data contents that read respective data object by web buffer memory degree module 317 send to the user.And for request 1 and request 2, the data object that will visit owing to the user had lost efficacy in buffer unit, so high-performance http process unit 31 will send the data object load request to cache manager 33--and request 1 ', request 2 '; Further, after cache manager 33 request of receiving 1 ', the request 2 ', according to the configuration of fictitious host computer by sending load request to corresponding business module group based on fictitious host computer event scheduling module 336--request 1 ", request 2 "; Corresponding service module group is finished processing, returning to carry based on fictitious host computer event scheduling module 336 and need replying of loaded data object to cache manager 33--response 1 ", response 2 "; After cache manager 33 is received response, data object is loaded in the web buffer unit 32, and to high-performance http process unit 31 echo replies--to answering 1 ', responding 2 '; After high-performance http process unit 31 was received response, the user who reads new loading again asked the data of the data object of visiting to send to the user.As can be seen from Figure 4, high-performance http process unit 31 need not to wait for that it is just replied can carry out other processing, equally after cache manager 33 sends request, cache manager 33 need not also to wait for that it is just replied can carry out other processing after the business module group sends request.Obviously, the processing mode between each module of web is asynchronous.
High-performance http process unit 31 adopts three kinds of mechanism in reception that the user is asked and processing procedure:
A) when accepting all concurrent connection of user, the network event that uses network event informing mechanism (epoll) monitoring efficiently on each web socket, to trigger, so, even under 1~20,000 concurrency connection situation, still can guarantee the efficient of system in bottom-layer network I/O event handling;
B) adopt connection to set up preference strategy, the request that priority treatment user and server connect;
C) when data send, adopt based on the strategy of transmission in turn that connects, that is: travel through the part that all are in the web socket of transmit status and send reply data at every turn; Rather than adopt the connection iteration to send strategy, that is: the reply data that will send in the connection is all sent, send the reply data of next connection again.Employing transmission strategy in turn can make each user's request can both obtain coequally handling, and it is too much linking number can not occur, the overtime phenomenon of transmission that the connection of back causes owing to the queuing transmission.
High-performance http process unit 31 mainly provides two kinds of qos policys in qos policy control:
A) control of data transmission window size that is: is distinguished business, and control web server is for the data downstream speed of various different business;
B) network bandwidth management and control, that is: the total bandwidth that the web server is had is divided and is managed, and, avoid certain service application that the problem that the network bandwidth of whole website exhausts is occurred by disposing the employed amount of bandwidth of various service applications to reach the purpose of Bandwidth Management and control.Specific implementation is: when connection is set up, obtain the maximum bandwidth that this connection can be used earlier, then, system dynamically adjusts the spendable bandwidth of the connection that is in transmit status by timer in running, but that is: the occupied bandwidth of each connection and descending transmission rate can dynamically be adjusted according to the load of fictitious host computer.Generally, connect the maximum bandwidth=fictitious host computer that can use and dispose spendable bandwidth/current linking number; The size of each data transmission window is: take the minimum value in maximum bandwidth * 1/4 and the send window maximum.
The qos policy configuration information mainly comprises qos policy sign, data transmission window maximum, bandwidth control; Wherein, described qos policy sign defaults to 1, and described data transmission window maximum is the maximum amount of data that can send in process of transmitting, with the byte is unit, value represents without limits that bandwidth control is unit with bps (bits per second) for-1 o'clock, is worth for representing not do control at-1 o'clock.All qos policy configuration informations can be preserved with the qos policy tabulation, are a qos policy tabulation such as table one.
The qos policy sign The data transmission window maximum Bandwidth control
1 1460 -1
2 -1 50000000
3 730 100000000
Table one
To have described data transmission window be 1460 Bytes to clauses and subclauses 1 in the tabulation of qos policy shown in the table one, bandwidth does not have the qos policy of any restriction, clauses and subclauses 2 have been described the utilized bandwidth size and have been the qos policy of 50M, it is 100M that but clauses and subclauses 3 have been described utilized bandwidth, and each qos policy that is no more than 730 Bytes that sends.
Web buffer unit 32, be used for data object by certain access vector cache at internal memory and local disk, and using the fan-in fan-out of certain superseded machine-processed deal with data object in internal memory and disk file, web buffer unit 32 is supported the two-level cache system: the first order is the hierarchical cache based on internal memory; The second level is the local cache based on disk file system.Web buffer unit 32 further comprises:
Element registration form (Element Register Table) 321 is used to preserve the attribute information of data object, as: position, out-of-service time, recent change time etc. in the barrel number of key assignments, place data bucket and the bucket;
Internal storage data bucket tabulation (Data Bucket List) 322 is used for the classification storage of data object, mainly stores the data content of data object, and for same data object, the corresponding data content is corresponding with the attribute information in the element registration form 321;
Disk file system (File system) 323, it is frequent but not have the data object of inefficacy to be used to store use.
Wherein, the tabulate storage of 322 inside can be divided into the data bucket of different stage according to the data object size of storing in the data bucket for the internal storage data bucket, and data buckets at different levels are carried out capacity configuration according to system memory resource and needs of different applications, so can strengthen extensibility.
The storage principle of web buffer unit 32 is: preferentially will visit frequent data object and be buffered in the internal memory, to use data object not frequent but that do not have to lose efficacy to be buffered in local disk, be in the disk file system 323, if it is expired that data object lost efficacy, then notify corresponding business module group to upgrade loading, so, can avoid obtaining data to the backstage at every turn.Eliminating based on access triggers mechanism of data object promptly has only caller will visit this data object, can go just to judge whether this data object lost efficacy or load from disk.Here, can adopt least recently used algorithm (LRU) to eliminate to the data object that is buffered in local disk.
In actual applications, also can only in web buffer unit 32, level cache be set, internal storage data bucket tabulation 322 promptly is set, omit disk file system 323, can realize more multidata storage by the capacity that enlarges the data bucket, like this, also can reach the purpose of saving time, improve access speed.Certainly, the preferable embodiment of two-level cache for using is set.
In the web buffer unit 32, element registration form 321 realizes in the mode of hash map, so, according to the key assignments of data object, by one to URL hash effect preferably hash function can locate and obtain data object attribute information fast.Obtain in the data object content, element registration form 321 can also be as the one-level index of retrieval, the storage that data object is provided in internal storage data bucket tabulation 322 barrel number and bucket in the position, the positional information that can make cache manager 33 pass through to be provided is obtained the content of data object fast like this.Generally, the configuration information of internal storage data bucket tabulation 322 comprises: the sign of data bucket, data bucket discal patch purpose size, bucket discal patch purpose number.
The setting of web buffer unit 32 can improve user's access speed and efficient, shortening data acquisition time, reduce the load time and the CPU expense of back-end data object.
Cache manager 33 further comprises: protocol process module (Protocol process module) 331, be used to finish and front end high-performance httpd process unit 31 between and and each business module group of rear end between the parsing and the encapsulation of communication protocol;
Web buffer memory writing module (web cache writer) 332 is used to receive the instruction based on fictitious host computer event scheduling module 336, writes the attribute and the data of respective data object to the web buffer unit;
SSI (Server Side Include) module 333 is used for the various functions that the back-level server end is comprised;
Local acquisition module (Local get module) 334 is used for obtaining the data that are kept at disk file system; If the disk file system 323 in the web buffer unit 32 is optional, corresponding, the local acquisition module 334 in the cache manager 33 also is optional module;
Buffer memory adjusting module (cache adjust module) 335, according to the position of user capture situation dynamic adjusting data object in web buffer unit 32, described dynamic adjustment can be adopted minimum use (LFU, Least Frequency Used) cache policy;
Based on fictitious host computer event scheduling module (Base-vhost event dispatch module) 336, be used to connect the business module group that realizes different business, according to the difference of the fictitious host computer of user request, the request that high-performance httpd process unit is sent is assigned to corresponding business module group and handles.
Here, can link to each other with the miscellaneous service module group that realizes different business simultaneously based on fictitious host computer event scheduling module 336, such as: the Goods-Auction business, the Browse-Gen business, Image-Fetch business or the like, after cache manager 33 is received the request that high-performance http process unit 31 sends, the multichannel that to carry out incident according to the configuration such as the domain-name information of fictitious host computer is separated, request message sent to respectively in the corresponding business module group handle, corresponding business module group can be handled according to request, again data object is loaded in the web buffer unit 32 after finishing dealing with, and echo reply is given high-performance http process unit 31.Owing to support to connect a plurality of business module groups based on fictitious host computer event scheduling module 336, so the business module group that is connected based on fictitious host computer event scheduling module 336 can increase or reduce as required at any time, so, can strengthen the extensibility of web server.
Web server of the prior art, for some dynamic data requests all is that to create a process at each request be that the process-per-req processing mode is carried out, but the processing mode of this process-per-req, efficient is very low under the situation of user's large concurrent visit, a large amount of CPU times consumes in the establishment destruction of process and the switching of the context between process, and autgmentability is relatively poor, can't be applicable to the demand of different Business Processing models, such as: under certain scene, use the thread pool model efficiency higher, and by increasing the throughput that thread improves Business Processing.
And the design of web server of the present invention can be supported the transaction module of miscellaneous service module well, by the configuration based on fictitious host computer user's request is distributed to corresponding business module group and handles.In actual applications, can be each information below the concrete business module configuration set: business module group id, business module group name claim, business module group communication message queue sign etc.
Web server of the present invention has the good impact of performance in actual applications, and Fig. 5 to Figure 10 has provided the different application environment impact of performance statistics of use web server of the present invention down respectively.
When using 400 simulations of 4 machine startups concurrent user, when 300 URL of each user's random access connected, Fig. 5 was illustrated respectively in average per second with Fig. 6 and obtains page number--and be that per second hit rate (Hits perSecond) is at the comparison diagram under the different cache hit rates, average transaction response time (TransactionResponse Time) comparison diagram under different cache hit rates.
Among Fig. 5, curve 501,502,503 is represented the performance curve of 66%Cache hit rate, 80%Cache hit rate, 90%Cache hit rate respectively; Equally, among Fig. 6, curve 601,602,603 is represented the performance curve of 66%Cache hit rate, 80%Cache hit rate, 90%Cache hit rate respectively.Accordingly, the detailed performance statistics of web server under different cache hit rates as shown in Table 2.
The Cache hit rate Obtain number of pages (Total Hits) Average per second obtains page number Average response time (unit: s) 90% request average response time (unit: s) Data volume (the unit: bytes) that obtains Web server CPU Idle Send packet amount (unit: pkg/s) Send data traffic (unit: Mbps) Overtime/linking number of makeing mistakes
66% 217.781 231 1.519 1.677 2.834M 97% 3.2k 27.8 0
80% 337,700 358 0.637 0.736 4,397M 96% 4.9k 41.6 0
90% 362,961 383 0.425 0.565 4,741M 96% 5.1k 43.2 0
Table two
Fig. 7 represents respectively that with Fig. 8 average per second obtains page number--be per second hit rate (Hits perSecond) is at the comparison diagram under the different concurrent user number, average transaction response time (TransactionResponse Time) comparison diagram under different concurrent user number.
Among Fig. 7, it is 400,1000 performance curve that curve 701,702 is represented concurrent user number respectively; Among Fig. 8, it is 400,1000 performance curve that curve 801,802 is represented concurrent user number respectively.Accordingly, the detailed performance statistics of web server under different concurrent user number as shown in Table 3.
Concurrent user number Obtain number of pages (Total Hits) Average per second obtains page number Average response time (unit: s) 90% request average response time (unit: s) Data volume (the unit: bytes) that obtains Web server CPU Idle Send packet amount (unit: pkg/s) Send data traffic (unit: Mbps) Overtime/linking number of makeing mistakes
400 337,700 358 0.637 0.736 4,397M 96% 4.9k 41.6 0
1000 505,726 596 0.907 1.261 6.597M 95% 8.3k 70.7 0
Table three
Fig. 9 represents respectively that with Figure 10 average per second obtains page number--be per second hit rate (Hits perSecond) is at the comparison diagram under the different web servers, average transaction response time (TransactionResponse Time) comparison diagram under different web servers.
Among Fig. 9, curve 901,902 is represented the performance curve of web server of the present invention, apache server respectively; Among Figure 10, curve 1001,1002 is represented the performance curve of web server of the present invention, apache server respectively.Accordingly, the detailed performance statistics under the different web servers as shown in Table 4.
Systematic name Obtain number of pages (Total Hits) Average per second obtains page number Average response time (unit: s) 90% request average response time (unit: s) Data volume (the unit: bytes) that obtains Web server CPU Idle Send packet amount (unit: pkg/s) Send data traffic (unit: Mbps) Overtime/linking number of makeing mistakes
Web server 217,781 231 1.519 1.677 2,834M 97% 3.2k 27.8 0
Apache 48,267 57 5.587 11.772 631M Too busy - 0.75 2,658
Table four
From Fig. 5 to Figure 10 as can be seen, web server of the present invention is owing to technology such as data object buffer memory that adopts the asynchronous incident multichannel separation based on fictitious host computer, acceleration user capture and the loadings of delayed data object, even make system under the situation of large concurrent visit, user's average response time is still very short, efficient is very high, and have professional preferably autgmentability, can increase new business module easily to adapt to different business scenarios.In addition, web server of the present invention also possesses the characteristic that general general-purpose web server is had, as: support HTTP 0.9/1.0/1.1 various protocols version, supporting business session cookie analyzes setting, supports SSI or the like.
Web server of the present invention can be applied in the large-scale e-commerce site, with support that catalog classification is browsed, static page and picture access or the like.The above is preferred embodiment of the present invention only, is not to be used to limit protection scope of the present invention.

Claims (19)

1, a kind of web server based on fictitious host computer is characterized in that this server comprises: high-performance http process unit, web buffer unit and cache manager;
Wherein, high-performance http process unit is used to accept user's concurrent connection, obtains the user requested data object according to user's request from the web buffer unit and returns to the user, and notify cache manager when the needs loaded data object;
The web buffer unit is used for the attribute and the data content of data cached object;
Cache manager is used to receive the load request of high-performance http process unit, obtains required data object from corresponding service module group, is loaded in the web buffer unit.
2, method according to claim 1 is characterized in that, described high-performance http process unit further comprises: high-efficiency network I/O interface, fictitious host computer configuration module, qos policy module and web cache read module;
Wherein, high-efficiency network I/O interface is used to accept user's concurrent request, and instruction web cache read module reads required data object in the web buffer unit, and the data object that obtains is returned to the user;
The fictitious host computer configuration module is used to provide the fictitious host computer configuration information;
The qos policy module is used to store and qos policy based on fictitious host computer is provided;
Web cache read module is used to receive the instruction of high-efficiency network I/O interface, reading corresponding data object from the web buffer unit.
3, method according to claim 2 is characterized in that, described high-performance http process unit also comprises: among system monitoring module, system journal module, the access control module three at least one;
Wherein, the system monitoring module is used for the ruuning situation of each service module of monitoring system, when service module occurs unusual or collapses, restarts the respective service module;
The system journal module is used for user capture situation, the system operation situation of register system run duration;
Access control module is used to carry out security audit and protection to the web server is provided.
According to claim 1,2 or 3 described methods, it is characterized in that 4, described web buffer unit further comprises: element registration form, the tabulation of internal storage data bucket;
Wherein, the element registration form is used to preserve the attribute information of data object;
The internal storage data bucket is tabulated, and is used to store the data content of data object.
5, method according to claim 4 is characterized in that, described web buffer unit also comprises: disk file system is used to store use not frequently but the data object that did not lose efficacy.
6, according to claim 1,2 or 3 described methods, it is characterized in that described cache manager further comprises: protocol process module, web buffer memory writing module, SSI module and based on fictitious host computer event scheduling module;
Wherein, protocol process module, be used to finish and high-performance httpd process unit between, and each business module group between the parsing and the encapsulation of communication protocol;
Web buffer memory writing module is used to receive the instruction based on fictitious host computer event scheduling module, writes data object to the web buffer unit;
The SSI module is used for the various functions that back-level server comprises;
Based on fictitious host computer event scheduling module, be used for that the request that high-performance httpd process unit is sent is assigned to different business module group and handle.
7, method according to claim 6 is characterized in that, described cache manager also comprises: the buffer memory adjusting module, and according to the position of user capture situation dynamic adjusting data object in the web buffer unit.
8, method according to claim 4 is characterized in that, described cache manager further comprises: protocol process module, web buffer memory writing module, SSI module and based on fictitious host computer event scheduling module;
Wherein, protocol process module, be used to finish and high-performance httpd process unit between, and each business module group between the parsing and the encapsulation of communication protocol;
Web buffer memory writing module is used to receive the instruction based on fictitious host computer event scheduling module, writes data object to the web buffer unit;
The SSI module is used for the various functions that back-level server comprises;
Based on fictitious host computer event scheduling module, be used for that the request that high-performance httpd process unit is sent is assigned to different business module group and handle.
9, method according to claim 8 is characterized in that, described cache manager also comprises: the buffer memory adjusting module, and according to the position of user capture situation dynamic adjusting data object in the web buffer unit.
10, method according to claim 5 is characterized in that, described cache manager further comprises: protocol process module, web buffer memory writing module, SSI module and based on fictitious host computer event scheduling module;
Wherein, protocol process module, be used to finish and high-performance httpd process unit between, and each business module group between the parsing and the encapsulation of communication protocol;
Web buffer memory writing module is used to receive the instruction based on fictitious host computer event scheduling module, writes data object to the web buffer unit;
The SSI module is used for the various functions that back-level server comprises;
Based on fictitious host computer event scheduling module, be used for that the request that high-performance httpd process unit is sent is assigned to different business module group and handle.
11, method according to claim 10 is characterized in that, described cache manager also comprises: the buffer memory adjusting module, and according to the position of user capture situation dynamic adjusting data object in the web buffer unit.
12, according to claim 10 or 11 described methods, it is characterized in that described cache manager also comprises: local acquisition module is used for obtaining the data that are kept at disk file system.
13, a kind of user is characterized in that by obtain the method for visit data based on the web server of fictitious host computer, and the request of the concurrent reception user's access data of web server is carried out following steps to each visit data request:
The a.web server obtains the required data object of user after confirming request effectively from the web buffer memory;
B. judge whether to get access to the required data object of user, if get access to, then the web server returns required data object to relative users; If do not get access to, the web server is loaded in the web buffer memory according to fictitious host computer configuration data object that the user is required from the corresponding service module group that self connects, and again loaded data object in the web buffer memory is returned to the user afterwards;
Wherein, for the different access request of data, describedly obtain data object, loading data and the processing that data object returns to the user is realized with asynchronous system.
14, method according to claim 13 is characterized in that, the data object that gets access to described in the step b is: the data object that did not lose efficacy in the web buffer memory or for having lost efficacy in the web buffer memory but can postpone the loaded data object.
15, method according to claim 13, it is characterized in that, this method further comprises: two-stage web buffer memory is set, will uses frequent data object to be cached in the internal memory of web buffer memory, will use not frequently but the data object that did not lose efficacy is cached in the local disk of web buffer memory.
16, method according to claim 15 is characterized in that, this method further comprises: according to the position of user capture situation dynamic adjusting data object in buffer memory.
17, method according to claim 13 is characterized in that, this method further comprises: set in advance the qos policy based on fictitious host computer.
18, method according to claim 17 is characterized in that, described qos policy is the network bandwidth that control data send window size, control and managing web server are had.
19, method according to claim 13 is characterized in that, this method further comprises: described web server uses the network event informing mechanism to monitor the network event that triggers on each web socket.
CN 200510048886 2005-12-31 2005-12-31 Virtual-host-based web server and method for user obtaining access data Pending CN1997000A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200510048886 CN1997000A (en) 2005-12-31 2005-12-31 Virtual-host-based web server and method for user obtaining access data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200510048886 CN1997000A (en) 2005-12-31 2005-12-31 Virtual-host-based web server and method for user obtaining access data

Publications (1)

Publication Number Publication Date
CN1997000A true CN1997000A (en) 2007-07-11

Family

ID=38251930

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200510048886 Pending CN1997000A (en) 2005-12-31 2005-12-31 Virtual-host-based web server and method for user obtaining access data

Country Status (1)

Country Link
CN (1) CN1997000A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101860454A (en) * 2010-06-24 2010-10-13 杭州华三通信技术有限公司 Network performance data processing method and device thereof
CN102088485A (en) * 2010-12-30 2011-06-08 用友软件股份有限公司 Method and device for acquiring data
CN101782864B (en) * 2009-12-01 2013-05-08 深圳市蓝韵网络有限公司 Method for improving communication service stability of Web server
CN104123101A (en) * 2014-07-18 2014-10-29 北京京东尚科信息技术有限公司 Method and device for presenting data
CN104320404A (en) * 2014-11-05 2015-01-28 中国科学技术大学 Multithreading high-performance http agency realizing method and system
CN104394204A (en) * 2014-11-12 2015-03-04 浪潮(北京)电子信息产业有限公司 Method and system for realizing information interaction in load balancing
CN106843753A (en) * 2016-12-30 2017-06-13 郑州云海信息技术有限公司 Agreement uses the method and device for caching in a kind of distributed storage
CN107704375A (en) * 2016-08-09 2018-02-16 厦门雅迅网络股份有限公司 A kind of system and method recorded and play back network port upstream data
CN109726146A (en) * 2018-12-29 2019-05-07 杭州趣链科技有限公司 The scalable caching method of customizable replacement policy based on block height
CN110083485A (en) * 2019-03-15 2019-08-02 咪咕文化科技有限公司 Shunt method, data service system and its front end, storage medium
CN111291367A (en) * 2018-12-06 2020-06-16 北京京东尚科信息技术有限公司 Access control method and system, electronic device and storage medium
CN115225696A (en) * 2022-07-08 2022-10-21 北京天融信网络安全技术有限公司 Remote data interaction method and device

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101782864B (en) * 2009-12-01 2013-05-08 深圳市蓝韵网络有限公司 Method for improving communication service stability of Web server
CN101860454A (en) * 2010-06-24 2010-10-13 杭州华三通信技术有限公司 Network performance data processing method and device thereof
CN102088485A (en) * 2010-12-30 2011-06-08 用友软件股份有限公司 Method and device for acquiring data
CN104123101A (en) * 2014-07-18 2014-10-29 北京京东尚科信息技术有限公司 Method and device for presenting data
CN104320404A (en) * 2014-11-05 2015-01-28 中国科学技术大学 Multithreading high-performance http agency realizing method and system
CN104320404B (en) * 2014-11-05 2017-10-03 中国科学技术大学 A kind of multithreading high-performance http acts on behalf of realization method and system
CN104394204A (en) * 2014-11-12 2015-03-04 浪潮(北京)电子信息产业有限公司 Method and system for realizing information interaction in load balancing
CN104394204B (en) * 2014-11-12 2018-06-12 浪潮(北京)电子信息产业有限公司 Information interacting method and system in a kind of realization load balancing
CN107704375A (en) * 2016-08-09 2018-02-16 厦门雅迅网络股份有限公司 A kind of system and method recorded and play back network port upstream data
CN106843753A (en) * 2016-12-30 2017-06-13 郑州云海信息技术有限公司 Agreement uses the method and device for caching in a kind of distributed storage
CN111291367A (en) * 2018-12-06 2020-06-16 北京京东尚科信息技术有限公司 Access control method and system, electronic device and storage medium
CN109726146A (en) * 2018-12-29 2019-05-07 杭州趣链科技有限公司 The scalable caching method of customizable replacement policy based on block height
CN109726146B (en) * 2018-12-29 2020-12-15 杭州趣链科技有限公司 Scalable caching method based on block height customizable elimination strategy
CN110083485A (en) * 2019-03-15 2019-08-02 咪咕文化科技有限公司 Shunt method, data service system and its front end, storage medium
CN110083485B (en) * 2019-03-15 2021-08-06 咪咕文化科技有限公司 Shunting method, data service system, front end thereof and storage medium
CN115225696A (en) * 2022-07-08 2022-10-21 北京天融信网络安全技术有限公司 Remote data interaction method and device

Similar Documents

Publication Publication Date Title
CN1997000A (en) Virtual-host-based web server and method for user obtaining access data
US20230262131A1 (en) Method and system for reducing connections to a database
US7864764B1 (en) Accelerated packet processing in a network acceleration device
JP5183214B2 (en) System and method for performing caching of dynamically generated objects in a network
US7860993B2 (en) Streaming media content delivery system and method for delivering streaming content
EP2369494A1 (en) Web application based database system and data management method therof
CN101446983B (en) Method, system and equipment for realizing web page acquisition by mobile terminal
US7155722B1 (en) System and method for process load balancing in a multi-processor environment
US20070226229A1 (en) Method and system for class-based management of dynamic content in a networked environment
CN101431734B (en) Method and system for group sending short messages
CN105512053B (en) The mirror cache method of mobile transparent computing system server end multi-user access
CN105812351A (en) Method and system for sharing session
JP2006520937A (en) Resource awareness management of request traffic based on management policy
CN101662483A (en) Cache system for cloud computing system and method thereof
CN1874254A (en) Method for browsing data based on structure of client end / server end
CN106027595A (en) Access log processing method and system for CDN node
CN101883111A (en) Accounting server for processing online business log and method thereof
CN106502875A (en) A kind of daily record generation method and system based on cloud computing
CN106210022A (en) A kind of system and method for processing forum's height concurrent data requests
US7069297B2 (en) Data transfer scheme using re-direct response message for reducing network load
US6785784B1 (en) Method for protective cache replacement
WO2007120411A1 (en) Managing network response buffering behavior
CN103416027A (en) Cache optimization method, cache and cache optimization system
CN101753561B (en) Business cluster processing method and cluster system
CN101741889B (en) Method, system and service for centralized management of network services

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Open date: 20070711