CN104539645A - Method and equipment for processing http request - Google Patents

Method and equipment for processing http request Download PDF

Info

Publication number
CN104539645A
CN104539645A CN201410714452.6A CN201410714452A CN104539645A CN 104539645 A CN104539645 A CN 104539645A CN 201410714452 A CN201410714452 A CN 201410714452A CN 104539645 A CN104539645 A CN 104539645A
Authority
CN
China
Prior art keywords
network equipment
http request
target
request
resource
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
CN201410714452.6A
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.)
Baidu Online Network Technology Beijing Co Ltd
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201410714452.6A priority Critical patent/CN104539645A/en
Publication of CN104539645A publication Critical patent/CN104539645A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention aims to provide a method and a technology for processing an http request. The method comprises the following specific steps: determining target second network equipment for processing the http request to be processed from multiple pieces of second network equipment according to a relevant information item in the http request in combination with the quantity information of the second network equipment by first network equipment 1; sending the http request to the target second network equipment; and receiving a target resource corresponding to the http request sent by the target second network equipment. Compared with the prior art, the method and the technology have the advantages that the first network equipment implemented on the basis of a php language and the multiple pieces of php-based second network equipment for synergistically processing the http request form a master-worker model to realize processing of the http request without blocking I/O, so that a rapid response can be made to the http request; the http request can be processed at high concurrency; and the processing efficiency is increased. Meanwhile, the php language is used, so that the development and maintenance costs of a web server are reduced.

Description

A kind of method and apparatus for the treatment of http request
Technical field
The present invention relates to Internet technical field, particularly relate to a kind of technology for the treatment of http request.
Background technology
In tradition web exploitation, mainly use the web servers such as Apache, nginx as http and Reverse Proxy.But these web servers are that I/O blocks, and cannot process http request concomitantly by height, and consume more web server own resource when processing http request, reduce http request treatment effeciency.
Summary of the invention
An object of the present invention is to provide a kind of method and apparatus for the treatment of http request.
According to an aspect of the present invention, provide a kind of in the first network equipment end based on php for the treatment of the method for http request, wherein, the second network equipment based on php of corresponding multiple its process http request collaborative of this first network equipment, the method comprises:
According to the related information items in pending http request, in conjunction with the quantity information of described second network equipment, from multiple described second network equipment, determine the target second network equipment processing described http request;
Described http request is sent to described target second network equipment;
Receive the target resource corresponding to described http request that described target second network equipment sends.
According to a further aspect in the invention, additionally provide and a kind ofly assist method for the treatment of http request in the target second network equipment end based on php, wherein, this target second network equipment determines from collaborative the multiple of first network device processes http request based on php based on the second network equipment of php, and the method comprises:
Receive the pending http request that described first network equipment sends;
Obtain the target resource corresponding to described http request;
Described target resource is sent to described first network equipment.
According to an aspect of the present invention, provide a kind of first network equipment based on php for the treatment of http request, wherein, the second network equipment based on php of corresponding multiple its process http request collaborative of this first network equipment, this first network equipment comprises:
For according to the related information items in pending http request, in conjunction with the quantity information of described second network equipment, from multiple described second network equipment, determine the device of the target second network equipment processing described http request;
For described http request being sent to the device of described target second network equipment;
For receiving the device of the target resource corresponding to described http request that described target second network equipment sends.
According to another aspect of the present invention, additionally provide a kind of auxiliary target second network equipment based on php for the treatment of http request, wherein, this target second network equipment determines from collaborative the multiple of first network device processes http request based on php based on the second network equipment of php, and this target second network equipment comprises:
For receiving the device of the pending http request that described first network equipment sends;
For obtaining the device of the target resource corresponding to described http request;
For described target resource being sent to the device of described first network equipment.
In accordance with a further aspect of the present invention, additionally provide a kind of system for the treatment of http request, wherein, this system comprises as aforementioned according to a kind of first network equipment based on php for the treatment of http request of one aspect of the invention, and as the aforementioned a kind of auxiliary target second network equipment based on php for the treatment of http request according to a further aspect of the present invention.
Compared with prior art, in one embodiment of the present of invention, the second network equipment based on php of first network equipment and multiple its process http request collaborative is achieved based on php language, first network equipment is according to the related information items in pending http request, in conjunction with the quantity information of described second network equipment, from multiple described second network equipment, determine the target second network equipment processing described http request, and described http request is sent to described target second network equipment; To be obtained the target resource corresponding to described http request by target second network equipment, and send it to first network equipment, first network equipment and multiple second network equipment define master-worker model, achieve the process http request of Non-Blocking I/O, thus http request can be responded fast, and http request can be processed concomitantly by height, improve treatment effeciency, the use of php language, reduces the development and maintenance cost of web server simultaneously; In addition, use the Reverse Proxy of php language Non-Blocking I/O of the present invention directly as external server entrance, decrease the consumption of traditional server own resources, and the network resource consumption produced alternately with php; And an alternative embodiment of the invention, by determining described target second network equipment in conjunction with the resource state information of second network equipment, achieves the load balancing with second network equipment therein between multiple second network equipment.
Accompanying drawing explanation
By reading the detailed description done non-limiting example done with reference to the following drawings, other features, objects and advantages of the present invention will become more obvious:
It is a kind of for the treatment of the first network equipment based on php of http request and the equipment schematic diagram of the target second network equipment based on php that Fig. 1 illustrates according to one aspect of the invention;
Fig. 2 illustrates that the first network equipment based on php according to a further aspect of the present invention and the target second network equipment based on php coordinate and realizes a kind of method flow diagram for the treatment of http request.
In accompanying drawing, same or analogous Reference numeral represents same or analogous parts.
Embodiment
Below in conjunction with accompanying drawing, the present invention is described in further detail.
It is a kind of for the treatment of the first network equipment 1 based on php of http request and the equipment schematic diagram of the target second network equipment 2 based on php that Fig. 1 illustrates according to one aspect of the invention, wherein, the second network equipment based on php of corresponding multiple its process http request collaborative of first network equipment 1, target second network equipment 2 processes the multiple of http request from the collaborative first network equipment 1 based on php to determine based on the second network equipment of php, wherein, first network equipment 1 comprises for according to the related information items in pending http request, in conjunction with the quantity information of described second network equipment, the device (hereinafter referred to as " target determining device 11 ") of the target second network equipment processing described http request is determined from multiple described second network equipment, for described http request being sent to the device (hereinafter referred to as " the first dispensing device 12 ") of described target second network equipment, for receiving the device (hereinafter referred to as " the second receiving system 13 ") of the target resource corresponding to described http request that described target second network equipment sends, target second network equipment 2 comprises the device (hereinafter referred to as " first receiving device 21 ") for receiving the pending http request that described first network equipment sends, for obtaining the device (hereinafter referred to as " acquisition device 22 ") of the target resource corresponding to described http request, for described target resource being sent to the device (hereinafter referred to as " the second dispensing device 23 ") of described first network equipment.Particularly, the target determining device 11 of first network equipment 1 is according to the related information items in pending http request, in conjunction with the quantity information of described second network equipment, from multiple described second network equipment, determine the target second network equipment 2 processing described http request; Described http request is sent to described target second network equipment 2 by the first dispensing device 12; Correspondingly, the first receiving device 21 of target second network equipment 2 receives the pending http request that described first network equipment 1 sends; Acquisition device 22 obtains the target resource corresponding to described http request; Described target resource is sent to described first network equipment 1 by the second dispensing device 23; Correspondingly, the second receiving system 13 of first network equipment 1 receives the target resource corresponding to described http request that described target second network equipment 2 sends.
At this, first network equipment 1 is responsible for receiving and allocating task (as http request, https request etc.), in a particular embodiment, first network equipment 1 plays the part of the role of master process, and realize based on php language, wherein, the second network equipment realized based on php language of corresponding multiple its process http request collaborative of first network equipment 1.Can communicate based on scoket between first network equipment 1 with multiple second network equipment, be relation arranged side by side between multiple second network equipment.
At this, second network equipment is responsible for processing the task of first network equipment 1 for its distribution, and result is returned to first network equipment 1, in a particular embodiment, second network equipment plays the part of the role of worker process, thus first network equipment 1 and multiple second network equipment form the master-worker pattern in multi-thread design, this pattern is parallel.At this, the master-worker pattern realized based on php language is Non-Blocking I/O's, it can be used for realizing web server, and as http and Reverse Proxy, thus, the Reverse Proxy of the Non-Blocking I/O using php language to realize based on master-worker pattern is directly as external service access port, with traditional Web servers (in traditional web develops, main use Apache, the web servers such as nginx are as http and Reverse Proxy) compare, not only reduce the consumption of web server own resources, and the network resource consumption to produce alternately with php, also reduce too much procedure dependency and development and maintenance cost, thus http request/https request can be responded fast, and http request/https request can be processed concomitantly by height, improve treatment effeciency.At this, it should be noted that, http request in the present invention not only comprises http (HTML (Hypertext Markup Language), Hypertext Transfer Protocol) request, also comprise https (security socket layer HTML (Hypertext Markup Language), Hyper Text TransferProtocol over Secure Socket Layer) request, following examples are all described based on http request, should not be construed as limitation of the present invention.
At this, first network equipment 1 and second network equipment include but are not limited to the cloud of network host, single network server, multiple webserver collection or multiple server formation.At this, cloud is formed by based on a large amount of computer of cloud computing (Cloud Computing) or the webserver, and wherein, cloud computing is the one of Distributed Calculation, the super virtual machine be made up of a group loosely-coupled computer collection.Those skilled in the art will be understood that above-mentioned first network equipment and second network equipment are only citing; other network equipments that are existing or that may occur from now on are as being applicable to the present invention; also within scope should being included in, and this is contained at this with way of reference.At this, the network equipment comprise a kind of can according in advance setting or the instruction stored, automatically carry out the electronic equipment of numerical computations and information processing, its hardware includes but not limited to microprocessor, application-specific integrated circuit (ASIC) (ASIC), programmable gate array (FPGA), digital processing unit (DSP), embedded device etc.
Particularly, the target determining device 11 of first network equipment 1 is according to the related information items in pending http request, in conjunction with the quantity information of described second network equipment, from multiple described second network equipment, determine the target second network equipment 2 processing described http request.At this, the related information items in described http request comprises following at least any one: i) can ip and cookie of this http request of unique identification in http request; Ii) all the elements item in http request, as the request line (request-line) in http request, request header (header), null (blank-line) and optional messages body (request-body).
At this, target determining device 11 determines that the mode of described target second network equipment 2 includes but not limited to following at least any one:
1) first MD5 process is carried out to the related information items in described http request, to obtain corresponding MD5 result; Then, according to the delivery value of the quantity information of described MD5 result and described second network equipment, from multiple described second network equipment, the target second network equipment processing described http request is determined.
Such as, suppose in a master-worker model is disposed, corresponding 3 the second network equipment as worker of first network equipment 1 as master, these 3 second network device numberings are respectively 1, 2, 3, and be designated as worker1, worker2 and worker3, the http request that first network equipment 1 receives from browser is assumed to be http-request 1, ip and cookie in this http request is respectively ip-1 and cookie-1, then first the target determining device 11 of first network equipment 1 can carry out MD5 process to ip-1 and cookie-1, suppose that the MD5 result obtained is value " 5fa26f23a035b45a957f793a5c5705291 ", target determining device 11 character can removed in this MD5 value obtains corresponding numerical value for " 526230354595779355705291 ", then, because having 3 second network equipment in the deployment of this master-worker model, then target determining device 11 is by numerical value " 526230354595779355705291 " and " 3 " delivery, obtaining remainder is 1, then target determining device 11 can determine to be numbered the target second network equipment that the second network equipment of " 1 " and worker1 are this http request of process and http-request 1.For another example, first hypothetical target determining device 11 can carry out MD5 process to ip-1 and cookie-1, supposes that the MD5 result obtained is value " 1faabf4c ", and target determining device 11 character can removed in this MD5 value obtains corresponding numerical value for " 14 "; Then, because having 3 second network equipment in the deployment of this master-worker model, then target determining device 11 is by numerical value " 14 " and " 3 " delivery, obtaining remainder is 2, i.e. 14%3=2, then target determining device 11 can determine to be numbered the target second network equipment that the second network equipment of " 2 " and worker2 are this http request of process and http-request 1.
At this, in the present invention, first network equipment 1 carrys out delivery by the quantity of the second network equipment according to carry, achieves the load balancing of first network equipment 1 self.
2) according to the related information items in pending http request, in conjunction with the quantity information of described second network equipment and the resource state information of described second network equipment, from multiple described second network equipment, determine the target second network equipment processing described http request.At this, described resource state information refers to resources left situation current in second network equipment, and as resource anxiety, abundant resource etc., at this, described resource comprises cpu state, device memory, and works as the task quantity of pre-treatment, etc.
Such as, connect example, for http request as http-request 1, the delivery result that hypothetical target determining device 11 obtains is 2, the target second network equipment then originally determining to process this http request be numbered 2 worker, if but now worker2 informs that its Current resource of master is nervous, then target determining device 11 can determine to be that the second network equipment of resource affluence is if the worker being numbered " 3 " is as the target second network equipment of this http request of process and http-request 1 using resource state information in other second network equipment.
At this, first network equipment 1 as master can obtain the resource state information of each second network equipment of its correspondence by pipeline socket, or, return its resource state information by the timing of each second network equipment to first network equipment 1, thus target determining device 11 obtains the resource state information of each second network equipment by the application programming interfaces (API) calling first network equipment 1 and self provide.
Those skilled in the art will be understood that the mode of the described resource state information of above-mentioned acquisition is only citing; the mode of the described resource state information of other acquisitions that are existing or that may occur from now on is as being applicable to the present invention; also within scope should being included in, and this is contained at this with way of reference.
Those skilled in the art will be understood that and above-mentionedly determine that the mode of described target second network equipment is only citing; described in other determinations that are existing or that may occur from now on, the mode of target second network equipment is as being applicable to the present invention; also within scope should being included in, and this is contained at this with way of reference.
At this, the present invention, by determining described target second network equipment in conjunction with the resource state information of second network equipment, achieves the load balancing with second network equipment therein between multiple second network equipment.
Preferably, when the target determining device 11 of first network equipment 1 determines described target second network equipment in conjunction with described resource state information, if when the resource of the target second network equipment initially determined based on delivery numerical value is nervous, the target second network equipment newly determined can be sent to by target determining device 11 the target second network equipment initially determined, http request is sent to target second equipment newly determined by the second network equipment initially determined by this.Such as, connect example, for http request as http-request 1, the delivery result that hypothetical target determining device 11 obtains is 2, the target second network equipment then originally determining to process this http request be numbered 2 worker, if but now worker2 informs that its Current resource of master is nervous, then target determining device 11 can determine to be that the second network equipment of resource affluence is if the worker being numbered " 3 " is as the target second network equipment of this http request of process and http-request 1 using resource state information in other second network equipment, then, send to worker to process this http request by worker2.Preferably, if the second network equipment of resource anxiety is after its resource recovery is abundant, it can notify first network equipment 1.
Then, described http request, by such as socket communication mode, is sent to described target second network equipment 2 by the first dispensing device 12.
Correspondingly, the first receiving device 21 of target second network equipment 2, by such as socket communication mode, receives the pending http request that described first network equipment 1 sends.
Acquisition device 22 obtains the target resource corresponding to described http request.Particularly, first acquisition device 22 resolves described http request, to determine the resource status type information corresponding to described http request; Then, according to described resource status type information, described target resource is obtained.At this, described resource status type information comprise as: the regime type resource 1) in the page is regime type resource as being the resource of js, css etc. for suffix; 2) the static types resource in the page, the gif format picture of such as directly demand file.At this, the regime type resource in the page and static types resource can set according to the actual requirements.
Particularly, first acquisition device 22 resolves described http request, to determine the resource status type information corresponding to described http request, if described resource status type information is regime type resource, then described http request is sent to corresponding php-fpm module by acquisition device 22, to obtain described target resource by described php-fpm module.At this, described php-fpm module is PHPFastCGI manager of the prior art.
Such as, for http request as http-request 1, first acquisition device 22 resolves this http request, obtains analysis result to be:
GET/FileOp/fileIO.js HTTP/1.1
Accept:*/*
Referer:http://localhost:8080/FileOp/
Accept-Language:zh-cn
User-Agent:Mozilla/4.0(compatible;MSIE 6.0;Windows NT 5.1;SV1)
Host:localhost:8080
Connection:Keep-Alive
Cookie:JSESSIONID=9277F9B1D242ABB277A1E358C88833EC
According to above http request analysis result, acquisition device 22 finds that this http request directly asks js format resource, it is regime type resource, this http request can be sent to corresponding php-fpm module by acquisition device 22, to obtain described target resource by php-fpm module.
If described resource status type information is static types resource, then acquisition device 22 directly can search the network site of this static types resource at target second network equipment 2, thus obtains described target resource.Such as, for http request as http-request 1, first acquisition device 22 resolves this http request, obtains analysis result to be:
POST/sample.jspHTTP/1.1
Accept:image/gif.image/jpeg,*/*
Accept-Language:zh-cn
Connection:Keep-Alive
Host:localhost
User-Agent:Mozila/4.0(compatible;MSIE5.01;Window NT5.0)
Accept-Encoding:gzip,deflate
username=jinqiao&password=1234
According to above http request analysis result, acquisition device 22 finds that this http request directly asks gif format picture, it is static types resource, and acquisition device 22 directly can search the network site of this picture at target second network equipment 2, thus obtains this picture.
Those skilled in the art will be understood that the mode of the described target resource of above-mentioned acquisition is only citing; the mode of the described target resource of other acquisitions that are existing or that may occur from now on is as being applicable to the present invention; also within scope should being included in, and this is contained at this with way of reference.
Then, described target resource, by such as socket communication mode, is sent to described first network equipment 1 by the second dispensing device 23.
Correspondingly, the second receiving system 13 of first network equipment 1, by such as socket communication mode, receives the target resource corresponding to described http request that described target second network equipment 2 sends.
Constant work between each device of first network equipment 1 and target second network equipment 2.Particularly, the target determining device 11 of first network equipment 1 continues according to the related information items in pending http request, in conjunction with the quantity information of described second network equipment, from multiple described second network equipment, determine the target second network equipment 2 processing described http request; First dispensing device 12 continues described http request to be sent to described target second network equipment 2; Correspondingly, the pending http request that described in first receiving device 21 continuous reception of target second network equipment 2, first network equipment 1 sends; Acquisition device 22 continues to obtain the target resource corresponding to described http request; Second dispensing device 23 continues described target resource to be sent to described first network equipment 1; Correspondingly, the target resource corresponding to described http request that described in the second receiving system 13 continuous reception of first network equipment 1, target second network equipment 2 sends.At this, those skilled in the art will be understood that described " continuing " refer to constantly to carry out target resource corresponding to the determination of target second network equipment, the transmission of http request and reception, http request between first network equipment 1 and each device of target second network equipment 2 respectively acquisition, send and receive, until the http request that first network equipment 1 stops acquisition pending in a long time.
In a preferred embodiment (with reference to figure 1), first network equipment 1 also comprises for marking and storing the request number corresponding to the port of described target second network equipment and described http request, for the device responded described http request (hereinafter referred to as " mark storage device ", not shown).Particularly, mark storage device marks and stores the port of described target second network equipment and the request number corresponding to described http request, responds for described http request.
Particularly, mark storage device marks and stores the port of described target second network equipment and the request number corresponding to described http request, responds for described http request.At this, described request number can represent by forms such as numeral, characters, and its unique identification http request, also, each http request has unique request number.
Such as, for http request as http-request1, hypothetical target determining device 11 determines that the target second network equipment of its correspondence is worker1, then mark the port that first storage device can mark the target second network equipment corresponding to this http request, and the request number corresponding to this http request, as http-request1 is labeled as hr1, namely the request number of http-request1 is hr1; Then, mark storage device records the request number of this http request in request marks pond, responds for this http request.
Preferably, if described http request is target resource that is multiple and that receive corresponding at least one http request, first network equipment 1 also comprises for according to the end number sending the target second network equipment of the target resource of corresponding http request in the http request receiving its corresponding target resource, determine the request number corresponding to this http request, with according to this request number device (hereinafter referred to as " request determining device ", not shown) responded this http request.Particularly, request determining device is according to the end number sending the target second network equipment of the target resource of corresponding http request in the http request receiving its corresponding target resource, determine the request number corresponding to this http request, to respond this http request according to this request number.
Such as, suppose that first network equipment 1 receives the multiple http request from browser continuously, as http-request1 to http-request5, target determining device 11 successively determines that the target second network equipment corresponding to http-request1 to http-request5 is respectively worker1, worker3, worker1, worker2, worker2, and the port marking that storage device has marked the target second network equipment corresponding to each http request in advance, and the request number corresponding to each http request, the request number as http-request1 to http-request5 is respectively hr1, hr2, hr3, hr4, hr5, if the second receiving system 13 have received the target resource of http-request1 to http-request3 in the plurality of http request, also namely the second receiving system 13 receives from second network equipment worker1, worker3, the target resource that worker1 returns, then request determining device is according to second network equipment worker1, worker3, the port numbers of worker1, obtains and second network equipment worker1 in request marks pond, worker3, the request number that the port numbers of worker1 is corresponding is respectively hr1, hr2, hr3, to respond corresponding http request according to these requests number, is namely the http-request1 of hr1 to request number respectively, request number is the http-request2 of hr2, request number is that the http-request3 of hr3 responds.
At this, the present invention is by marking and storing the request number corresponding to the port of the target second network equipment corresponding to each http request and each http request, for each http request, establish port and request number between mapping relations, in a particular embodiment, first network equipment 1 poll scans the port marked, also namely perform and read response process, and read to respond the I/O model for unblock, as found that there is response, just can according to the port with response, the request number corresponding with this port is obtained from mark request pond, to respond corresponding http request, thus, first network equipment 1 in the present invention can carry out the high concurrent multiple http request of process.
In another preferred embodiment (with reference to figure 1), target second network equipment 2 also comprises for carrying out pretreated device (hereinafter referred to as " pretreatment unit ", not shown) to described http request.Particularly, pretreatment unit carries out preliminary treatment to described http request; Wherein, acquisition device 22 obtains the target resource corresponding to pretreated described http request.
Particularly, pretreatment unit carries out preliminary treatment to described http request.Preferably, described preliminary treatment comprises following at least any one:
-checking treatment is carried out to the item of information comprised in described http request;
-attack shielding processing is carried out to described http request.
Such as, the http request received for first receiving device 21 is as http-request1, first pretreatment unit can carry out preliminary treatment to described http request, as carried out checking treatment to the item of information comprised in this http request, at this, described item of information refers to that the item of information comprised in http request form is as request line, request header, null, optional messages body etc., in a particular embodiment, pretreatment unit can adopt regular expression to carry out checking treatment to the item of information comprised in this http request, such as, can adopt regular expression as "; ^ (?: https?: //)? [w-] ++ (?:. [w-] ++) ++ .*; I " whether the URL domain name part verified in this http request be legal URL, and for example, adopt regular expression as "; (.*?) (?: ([^)] *))? $; " whether verify in this http request containing bracket etc.
For another example, the http request received for first receiving device 21 is as http-request1, pretreatment unit also can carry out xss (cross-site scripting attack to this http request, Cross SiteScripting) and sql (structuring script, Structured Query Language) injection wait attack shield, to filter the unsafe factor in http request.
Those skilled in the art will be understood that above-mentioned pretreatment mode is only citing, and other pretreatment modes that are existing or that may occur from now on, as being applicable to the present invention, within also should being included in scope, and are contained in this at this with way of reference.
Then, acquisition device 22 obtains the target resource corresponding to pretreated described http request.At this, the mode that acquisition device 22 obtains the target resource corresponding to pretreated described http request is identical with the mode of the target resource corresponding to the described http request of its acquisition, for simplicity's sake, therefore do not repeat them here, and be contained in this by reference.
Fig. 2 illustrates that the first network equipment based on php according to a further aspect of the present invention and the target second network equipment based on php coordinate and realizes a kind of method flow diagram for the treatment of http request.
Wherein, the method comprising the steps of S1, step S2, step S3 and step S4.Particularly, in step sl, first network equipment 1, according to the related information items in pending http request, in conjunction with the quantity information of described second network equipment, determines the target second network equipment 2 processing described http request from multiple described second network equipment; In step s 2, described http request is sent to described target second network equipment 2 by first network equipment 1; Correspondingly, target second network equipment 2 receives the pending http request that described first network equipment 1 sends; In step s3, target second network equipment 2 obtains the target resource corresponding to described http request; In step s 4 which, described target resource is sent to described first network equipment 1 by target second network equipment 2; Correspondingly, first network equipment 1 receives the target resource corresponding to described http request that described target second network equipment 2 sends.
At this, first network equipment 1 is responsible for receiving and allocating task (as http request, https request etc.), in a particular embodiment, first network equipment 1 plays the part of the role of master process, and realize based on php language, wherein, the second network equipment realized based on php language of corresponding multiple its process http request collaborative of first network equipment 1.Can communicate based on scoket between first network equipment 1 with multiple second network equipment, be relation arranged side by side between multiple second network equipment.
At this, second network equipment is responsible for processing the task of first network equipment 1 for its distribution, and result is returned to first network equipment 1, in a particular embodiment, second network equipment plays the part of the role of worker process, thus first network equipment 1 and multiple second network equipment form the master-worker pattern in multi-thread design, this pattern is parallel.At this, the master-worker pattern realized based on php language is Non-Blocking I/O's, it can be used for realizing web server, and as http and Reverse Proxy, thus, the Reverse Proxy of the Non-Blocking I/O using php language to realize based on master-worker pattern is directly as external service access port, with traditional Web servers (in traditional web develops, main use Apache, the web servers such as nginx are as http and Reverse Proxy) compare, not only reduce the consumption of web server own resources, and the network resource consumption to produce alternately with php, also reduce too much procedure dependency and development and maintenance cost, thus http request/https request can be responded fast, and http request/https request can be processed concomitantly by height, improve treatment effeciency.At this, it should be noted that, http request in the present invention not only comprises http (HTML (Hypertext Markup Language), Hypertext Transfer Protocol) request, also comprise https (security socket layer HTML (Hypertext Markup Language), Hyper Text TransferProtocol over Secure Socket Layer) request, following examples are all described based on http request, should not be construed as limitation of the present invention.
At this, first network equipment 1 and second network equipment include but are not limited to the cloud of network host, single network server, multiple webserver collection or multiple server formation.At this, cloud is formed by based on a large amount of computer of cloud computing (Cloud Computing) or the webserver, and wherein, cloud computing is the one of Distributed Calculation, the super virtual machine be made up of a group loosely-coupled computer collection.Those skilled in the art will be understood that above-mentioned first network equipment and second network equipment are only citing; other network equipments that are existing or that may occur from now on are as being applicable to the present invention; also within scope should being included in, and this is contained at this with way of reference.At this, the network equipment comprise a kind of can according in advance setting or the instruction stored, automatically carry out the electronic equipment of numerical computations and information processing, its hardware includes but not limited to microprocessor, application-specific integrated circuit (ASIC) (ASIC), programmable gate array (FPGA), digital processing unit (DSP), embedded device etc.
Particularly, first network equipment 1 in step sl, first network equipment 1, according to the related information items in pending http request, in conjunction with the quantity information of described second network equipment, determines the target second network equipment 2 processing described http request from multiple described second network equipment.At this, the related information items in described http request comprises following at least any one: i) can ip and cookie of this http request of unique identification in http request; Ii) all the elements item in http request, as the request line (request-line) in http request, request header (header), null (blank-line) and optional messages body (request-body).
At this, in step sl, first network equipment 1 determines that the mode of described target second network equipment 2 includes but not limited to following at least any one:
1) first MD5 process is carried out to the related information items in described http request, to obtain corresponding MD5 result; Then, according to the delivery value of the quantity information of described MD5 result and described second network equipment, from multiple described second network equipment, the target second network equipment processing described http request is determined.
Such as, suppose in a master-worker model is disposed, corresponding 3 the second network equipment as worker of first network equipment 1 as master, these 3 second network device numberings are respectively 1, 2, 3, and be designated as worker1, worker2 and worker3, the http request that first network equipment 1 receives from browser is assumed to be http-request 1, ip and cookie in this http request is respectively ip-1 and cookie-1, then first first network equipment 1 can carry out MD5 process to ip-1 and cookie-1 in step sl, suppose that the MD5 result obtained is value " 5fa26f23a035b45a957f793a5c5705291 ", and the character removed in this MD5 value obtains corresponding numerical value for " 526230354595779355705291 ", then, because having 3 second network equipment in the deployment of this master-worker model, then in step sl, first network equipment 1 is by numerical value " 526230354595779355705291 " and " 3 " delivery, obtaining remainder is 1, then in step sl, first network equipment 1 can determine to be numbered the target second network equipment that the second network equipment of " 1 " and worker1 are this http request of process and http-request 1.For another example, suppose in step sl, first first network equipment 1 can carry out MD5 process to ip-1 and cookie-1, supposes that the MD5 result obtained is value " 1faabf4c ", in step sl, first network equipment 1 character can removed in this MD5 value obtains corresponding numerical value for " 14 "; Then, because having 3 second network equipment in the deployment of this master-worker model, then in step sl, first network equipment 1 is by numerical value " 14 " and " 3 " delivery, obtaining remainder is 2, i.e. 14%3=2, then in step sl, first network equipment 1 can determine to be numbered the target second network equipment that the second network equipment of " 2 " and worker2 are this http request of process and http-request 1.
At this, in the present invention, first network equipment 1 carrys out delivery by the quantity of the second network equipment according to carry, achieves the load balancing of first network equipment 1 self.
2) according to the related information items in pending http request, in conjunction with the quantity information of described second network equipment and the resource state information of described second network equipment, from multiple described second network equipment, determine the target second network equipment processing described http request.At this, described resource state information refers to resources left situation current in second network equipment, and as resource anxiety, abundant resource etc., at this, described resource comprises cpu state, device memory, and works as the task quantity of pre-treatment, etc.
Such as, connect example, for http request as http-request 1, suppose in step sl, the delivery result that first network equipment 1 obtains is 2, the target second network equipment then originally determining to process this http request be numbered 2 worker, if but now worker2 informs that its Current resource of master is nervous, then in step sl, first network equipment 1 can determine to be that the second network equipment of resource affluence is if the worker being numbered " 3 " is as the target second network equipment of this http request of process and http-request 1 using resource state information in other second network equipment.
At this, first network equipment 1 as master can obtain the resource state information of each second network equipment of its correspondence by pipeline socket, or, its resource state information is returned to first network equipment 1 by each second network equipment timing, thus in step sl, first network equipment 1 obtains the resource state information of each second network equipment by the application programming interfaces (API) calling first network equipment 1 and self provide.
Those skilled in the art will be understood that the mode of the described resource state information of above-mentioned acquisition is only citing; the mode of the described resource state information of other acquisitions that are existing or that may occur from now on is as being applicable to the present invention; also within scope should being included in, and this is contained at this with way of reference.
Those skilled in the art will be understood that and above-mentionedly determine that the mode of described target second network equipment is only citing; described in other determinations that are existing or that may occur from now on, the mode of target second network equipment is as being applicable to the present invention; also within scope should being included in, and this is contained at this with way of reference.
At this, the present invention, by determining described target second network equipment in conjunction with the resource state information of second network equipment, achieves the load balancing with second network equipment therein between multiple second network equipment.
Preferably, when first network equipment 1 determines described target second network equipment in conjunction with described resource state information in step sl, if when the resource of the target second network equipment initially determined based on delivery numerical value is nervous, the target second network equipment newly determined can be sent to by first network equipment 1 the target second network equipment initially determined, http request is sent to target second equipment newly determined by the second network equipment initially determined by this.Such as, connect example, for http request as http-request 1, suppose in step sl, the delivery result that first network equipment 1 obtains is 2, the target second network equipment then originally determining to process this http request be numbered 2 worker, if but now worker2 informs that its Current resource of master is nervous, then in step sl, first network equipment 1 can determine to be that the second network equipment of resource affluence is if the worker being numbered " 3 " is as the target second network equipment of this http request of process and http-request 1 using resource state information in other second network equipment, then, send to worker to process this http request by worker2.Preferably, if the second network equipment of resource anxiety is after its resource recovery is abundant, it can notify first network equipment 1.
Then, in step s 2, described http request, by such as socket communication mode, is sent to described target second network equipment 2 by first network equipment 1.
Correspondingly, target second network equipment 2, by such as socket communication mode, receives the pending http request that described first network equipment 1 sends.
In step s3, target second network equipment 2 obtains the target resource corresponding to described http request.Particularly, in step s3, first target second network equipment 2 resolve described http request, to determine the resource status type information corresponding to described http request; Then, according to described resource status type information, described target resource is obtained.At this, described resource status type information comprise as: the regime type resource 1) in the page is regime type resource as being the resource of js, css, jsp etc. for suffix; 2) the static types resource in the page, such as directly demand file, gif format picture.At this, the regime type resource in the page and static types resource can set according to the actual requirements.
Particularly, in step s3, first target second network equipment 2 resolve described http request, to determine the resource status type information corresponding to described http request, if described resource status type information is regime type resource, then in step s3, described http request is sent to corresponding php-fpm module by target second network equipment 2, to obtain described target resource by described php-fpm module.At this, described php-fpm module is PHPFastCGI manager of the prior art.
Such as, for http request as http-request 1, in step s3, first target second network equipment 2 resolve this http request, obtains analysis result to be:
GET/FileOp/fileIO.js HTTP/1.1
Accept:*/*
Referer:http://localhost:8080/FileOp/
Accept-Language:zh-cn
User-Agent:Mozilla/4.0(compatible;MSIE 6.0;Windows NT 5.1;SV1)
Host:localhost:8080
Connection:Keep-Alive
Cookie:JSESSIONID=9277F9B1D242ABB277A1E358C88833EC
In step s3, according to above http request analysis result, target second network equipment 2 finds that this http request directly asks js format resource, it is regime type resource, in step s3, this http request can be sent to corresponding php-fpm module by target second network equipment 2, to obtain described target resource by php-fpm module.
If described resource status type information is static types resource, then in step s3, target second network equipment 2 directly can search the network site of this static types resource at target second network equipment 2, thus obtains described target resource.Such as, for http request as http-request 1, in step s3, first target second network equipment 2 resolve this http request, obtains analysis result to be:
POST/sample.jspHTTP/1.1
Accept:image/gif.image/jpeg,*/*
Accept-Language:zh-cn
Connection:Keep-Alive
Host:localhost
User-Agent:Mozila/4.0(compatible;MSIE5.01;Window NT5.0)
Accept-Encoding:gzip,deflate
username=jinqiao&password=1234
In step s3, according to above http request analysis result, target second network equipment 2 finds that this http request directly asks gif format picture, it is static types resource, in step s3, target second network equipment 2 directly can search the network site of this picture at target second network equipment 2, thus obtains this picture.
Those skilled in the art will be understood that the mode of the described target resource of above-mentioned acquisition is only citing; the mode of the described target resource of other acquisitions that are existing or that may occur from now on is as being applicable to the present invention; also within scope should being included in, and this is contained at this with way of reference.
Then, in step s 4 which, described target resource, by such as socket communication mode, is sent to described first network equipment 1 by target second network equipment 2.
Correspondingly, first network equipment 1, by such as socket communication mode, receives the target resource corresponding to described http request that described target second network equipment 2 sends.
Constant work between each step of first network equipment 1 and target second network equipment 2.Particularly, in step sl, first network equipment 1 continues according to the related information items in pending http request, in conjunction with the quantity information of described second network equipment, from multiple described second network equipment, determines the target second network equipment 2 processing described http request; In step s 2, first network equipment 1 continues described http request to be sent to described target second network equipment 2; Correspondingly, the pending http request of first network equipment 1 transmission described in target second network equipment 2 continuous reception; In step s3, target second network equipment 2 continues to obtain the target resource corresponding to described http request; In step s 4 which, target second network equipment 2 continues described target resource to be sent to described first network equipment 1; Correspondingly, the target resource corresponding to described http request that described in first network equipment 1 continuous reception, target second network equipment 2 sends.At this, those skilled in the art will be understood that described " continuing " refer to constantly to carry out target resource corresponding to the determination of target second network equipment, the transmission of http request and reception, http request between first network equipment 1 and each step of target second network equipment 2 respectively acquisition, send and receive, until the http request that first network equipment 1 stops acquisition pending in a long time.
In a preferred embodiment (with reference to figure 2), the method also comprises step S5 (not shown).Particularly, in step s 5, first network equipment 1 marks and stores the port of described target second network equipment and the request number corresponding to described http request, responds for described http request.
Particularly, in step s 5, first network equipment 1 marks and stores the port of described target second network equipment and the request number corresponding to described http request, responds for described http request.At this, described request number can represent by forms such as numeral, characters, and its unique identification http request, also, each http request has unique request number.
Such as, for http request as http-request1, suppose in step sl, first network equipment 1 determines that the target second network equipment of its correspondence is worker1, then in step s 5, first first network equipment 1 can mark the port of the target second network equipment corresponding to this http request, and the request number corresponding to this http request, as http-request1 is labeled as hr1, namely the request number of http-request1 is hr1; Then, in step s 5, first network equipment 1 records the request number of this http request in request marks pond, responds for this http request.
Preferably, if described http request is target resource that is multiple and that receive corresponding at least one http request, the method also comprises step S6 (not shown).Particularly, in step s 6, first network equipment 1 is according to the end number sending the target second network equipment of the target resource of corresponding http request in the http request receiving its corresponding target resource, determine the request number corresponding to this http request, to respond this http request according to this request number.
Such as, suppose that first network equipment 1 receives the multiple http request from browser continuously, as http-request1 to http-request5, in step sl, first network equipment 1 successively determines that the target second network equipment corresponding to http-request1 to http-request5 is respectively worker1, worker3, worker1, worker2, worker2, and in step s 5, first network equipment 1 has marked the port of the target second network equipment corresponding to each http request in advance, and the request number corresponding to each http request, and the request number as http-request1 to http-request5 is respectively hr1, hr2, hr3, hr4, hr5, if in step s 4 which, first network equipment 1 have received the target resource of http-request1 to http-request3 in the plurality of http request, and also namely in step s 4 which, first network equipment 1 receives from second network equipment worker1, worker3, the target resource that worker1 returns, then in step s 6, first network equipment 1 is according to second network equipment worker1, worker3, the port numbers of worker1, obtains and second network equipment worker1 in request marks pond, worker3, the request number that the port numbers of worker1 is corresponding is respectively hr1, hr2, hr3, to respond corresponding http request according to these requests number, is namely the http-request1 of hr1 to request number respectively, request number is the http-request2 of hr2, request number is that the http-request3 of hr3 responds.
At this, the present invention is by marking and storing the request number corresponding to the port of the target second network equipment corresponding to each http request and each http request, for each http request, establish port and request number between mapping relations, in a particular embodiment, first network equipment 1 poll scans the port marked, also namely perform and read response process, and read to respond the I/O model for unblock, as found that there is response, just can according to the port with response, the request number corresponding with this port is obtained from mark request pond, to respond corresponding http request, thus, first network equipment 1 in the present invention can carry out the high concurrent multiple http request of process.
In another preferred embodiment (with reference to figure 2), the method also comprises step S7 (not shown).Particularly, in the step s 7, target second network equipment 2 carries out preliminary treatment to described http request; Wherein, acquisition device obtains the target resource corresponding to pretreated described http request.
Particularly, in the step s 7, target second network equipment 2 carries out preliminary treatment to described http request.Preferably, described preliminary treatment comprises following at least any one:
-checking treatment is carried out to the item of information comprised in described http request;
-attack shielding processing is carried out to described http request.
Such as, the http request received in step s 2 for target second network equipment 2 is as http-request1, in the step s 7, first target second network equipment 2 can carry out preliminary treatment to described http request, as carried out checking treatment to the item of information comprised in this http request, at this, described item of information refers to that the item of information comprised in http request form is as request line, request header, null, optional messages body etc., in a particular embodiment, in the step s 7, target second network equipment 2 can adopt regular expression to carry out checking treatment to the item of information comprised in this http request, such as, can adopt regular expression as ", ^ (?: https?: //)? [w-] ++ (?:. [w-] ++) ++ .*, i " whether the URL domain name part verified in this http request be legal URL, and for example, adopt regular expression as ", (.*?) (?: ([^)] *))? $, " whether verify in this http request containing bracket etc.
For another example, the http request received in step s 2 for target second network equipment 2 is as http-request1, in the step s 7, target second network equipment 2 also can carry out xss (cross-site scripting attack to this http request, Cross Site Scripting) and sql (structuring script, Structured Query Language) injection wait attack shield, to filter the unsafe factor in http request.
Those skilled in the art will be understood that above-mentioned pretreatment mode is only citing, and other pretreatment modes that are existing or that may occur from now on, as being applicable to the present invention, within also should being included in scope, and are contained in this at this with way of reference.
Then, in step s3, target second network equipment 2 obtains the target resource corresponding to pretreated described http request.At this, the mode that target second network equipment 2 obtains the target resource corresponding to pretreated described http request is in step s3 identical with the mode obtaining the target resource corresponding to described http request more than it in step s3, for simplicity's sake, therefore do not repeat them here, and be contained in this by reference.
It should be noted that the present invention can be implemented in the assembly of software and/or software restraint, such as, application-specific integrated circuit (ASIC) (ASIC), general object computer or any other similar hardware device can be adopted to realize.In one embodiment, software program of the present invention can perform to realize step mentioned above or function by processor.Similarly, software program of the present invention (comprising relevant data structure) can be stored in computer readable recording medium storing program for performing, such as, and RAM memory, magnetic or CD-ROM driver or floppy disc and similar devices.In addition, steps more of the present invention or function can adopt hardware to realize, such as, as coordinating with processor thus performing the circuit of each step or function.
In addition, a part of the present invention can be applied to computer program, such as computer program instructions, when it is performed by computer, by the operation of this computer, can call or provide according to method of the present invention and/or technical scheme.And call the program command of method of the present invention, may be stored in fixing or moveable recording medium, and/or be transmitted by the data flow in broadcast or other signal bearing medias, and/or be stored in the working storage of the computer equipment run according to described program command.At this, comprise a device according to one embodiment of present invention, this device comprises the memory for storing computer program instructions and the processor for execution of program instructions, wherein, when this computer program instructions is performed by this processor, trigger this plant running based on the aforementioned method according to multiple embodiment of the present invention and/or technical scheme.
To those skilled in the art, obviously the invention is not restricted to the details of above-mentioned one exemplary embodiment, and when not deviating from spirit of the present invention or essential characteristic, the present invention can be realized in other specific forms.Therefore, no matter from which point, all should embodiment be regarded as exemplary, and be nonrestrictive, scope of the present invention is limited by claims instead of above-mentioned explanation, and all changes be therefore intended in the implication of the equivalency by dropping on claim and scope are included in the present invention.Any Reference numeral in claim should be considered as the claim involved by limiting.In addition, obviously " comprising " one word do not get rid of other unit or step, odd number does not get rid of plural number.Multiple unit of stating in device claim or device also can be realized by software or hardware by a unit or device.First, second word such as grade is used for representing title, and does not represent any specific order.

Claims (19)

1. in the first network equipment end based on php for the treatment of the method for http request, wherein, the second network equipment based on php of corresponding multiple its process http request collaborative of this first network equipment, the method comprises:
According to the related information items in pending http request, in conjunction with the quantity information of described second network equipment, from multiple described second network equipment, determine the target second network equipment processing described http request;
Described http request is sent to described target second network equipment;
Receive the target resource corresponding to described http request that described target second network equipment sends.
2. method according to claim 1, wherein, determine that the target second network equipment processing described http request comprises:
MD5 process is carried out to the related information items in described http request, to obtain corresponding MD5 result;
According to the delivery value of the quantity information of described MD5 result and described second network equipment, from multiple described second network equipment, determine the target second network equipment processing described http request.
3. method according to claim 1 and 2, wherein, determine that the target second network equipment processing described http request comprises:
According to the related information items in pending http request, in conjunction with the quantity information of described second network equipment and the resource state information of described second network equipment, from multiple described second network equipment, determine the target second network equipment processing described http request.
4. according to the method in any one of claims 1 to 3, wherein, the method also comprises:
Mark and store the port of described target second network equipment and the request number corresponding to described http request, responding for described http request.
5. method according to claim 4, wherein, if described http request is target resource that is multiple and that receive corresponding at least one http request, the method also comprises:
According to the end number sending the target second network equipment of the target resource of corresponding http request in the http request receiving its corresponding target resource, determine the request number corresponding to this http request, to respond this http request according to this request number.
6. assist method for the treatment of http request in the target second network equipment end based on php for one kind, wherein, this target second network equipment determines from collaborative the multiple of first network device processes http request based on php based on the second network equipment of php, and the method comprises:
Receive the pending http request that described first network equipment sends;
Obtain the target resource corresponding to described http request;
Described target resource is sent to described first network equipment.
7. method according to claim 6, wherein, the method also comprises:
Preliminary treatment is carried out to described http request;
Wherein, the target resource obtained corresponding to described http request comprises:
Obtain the target resource corresponding to pretreated described http request.
8. method according to claim 7, wherein, described preliminary treatment comprises following at least any one:
-checking treatment is carried out to the item of information comprised in described http request;
-attack shielding processing is carried out to described http request.
9. the method according to any one of claim 6 to 8, wherein, the target resource obtained corresponding to described http request comprises;
-described http request is resolved, to determine the resource status type information corresponding to described http request;
Resource status type information described in-Ruo is regime type resource, described http request is sent to corresponding php-fpm module, to obtain described target resource by described php-fpm module.
10. for the treatment of the first network equipment based on php of http request, wherein, the second network equipment based on php of corresponding multiple its process http request collaborative of this first network equipment, this first network equipment comprises:
For according to the related information items in pending http request, in conjunction with the quantity information of described second network equipment, from multiple described second network equipment, determine the device of the target second network equipment processing described http request;
For described http request being sent to the device of described target second network equipment;
For receiving the device of the target resource corresponding to described http request that described target second network equipment sends.
11. first network equipment according to claim 10, wherein, determine the device of the target second network equipment processing described http request for:
MD5 process is carried out to the related information items in described http request, to obtain corresponding MD5 result;
According to the delivery value of the quantity information of described MD5 result and described second network equipment, from multiple described second network equipment, determine the target second network equipment processing described http request.
12. first network equipment according to claim 10 or 11, wherein, the target second network equipment determining to process described http request for:
According to the related information items in pending http request, in conjunction with the quantity information of described second network equipment and the resource state information of described second network equipment, from multiple described second network equipment, determine the target second network equipment processing described http request.
13. according to claim 10 to the first network equipment according to any one of 12, and wherein, this first network equipment also comprises:
For marking and storing the request number corresponding to the port of described target second network equipment and described http request, for the device responded described http request.
14. first network equipment according to claim 13, wherein, if described http request is target resource that is multiple and that receive corresponding at least one http request, this first network equipment also comprises:
The end number sending the target second network equipment of the target resource of corresponding http request in the http request of its corresponding target resource is received for basis, determine the request number corresponding to this http request, with according to this request number device responded this http request.
15. 1 kinds of auxiliary target second network equipment based on php for the treatment of http request, wherein, this target second network equipment determines from collaborative the multiple of first network device processes http request based on php based on the second network equipment of php, and this target second network equipment comprises:
For receiving the device of the pending http request that described first network equipment sends;
For obtaining the device of the target resource corresponding to described http request;
For described target resource being sent to the device of described first network equipment.
16. target second network equipment according to claim 15, wherein, this target second network equipment also comprises:
For carrying out pretreated device to described http request;
Wherein, the device of the target resource obtained corresponding to described http request is used for:
Obtain the target resource corresponding to pretreated described http request.
17. target second network equipment according to claim 16, wherein, described preliminary treatment comprises following at least any one:
-checking treatment is carried out to the item of information comprised in described http request;
-attack shielding processing is carried out to described http request.
18. according to claim 15 to the target second network equipment according to any one of 17, and wherein, the device obtaining the target resource corresponding to described http request is used for;
-described http request is resolved, to determine the resource status type information corresponding to described http request;
Resource status type information described in-Ruo is regime type resource, described http request is sent to corresponding php-fpm module, to obtain described target resource by described php-fpm module.
19. 1 kinds of systems for the treatment of http request, wherein, this system comprises first network equipment according to any one of claim 10 to 14 and at least one target second network equipment according to any one of claim 15 to 18.
CN201410714452.6A 2014-11-28 2014-11-28 Method and equipment for processing http request Pending CN104539645A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410714452.6A CN104539645A (en) 2014-11-28 2014-11-28 Method and equipment for processing http request

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410714452.6A CN104539645A (en) 2014-11-28 2014-11-28 Method and equipment for processing http request

Publications (1)

Publication Number Publication Date
CN104539645A true CN104539645A (en) 2015-04-22

Family

ID=52855112

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410714452.6A Pending CN104539645A (en) 2014-11-28 2014-11-28 Method and equipment for processing http request

Country Status (1)

Country Link
CN (1) CN104539645A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105376325A (en) * 2015-12-07 2016-03-02 青岛农业大学 Methods, devices and system for obtaining HTTP message status
CN106210058A (en) * 2016-07-13 2016-12-07 成都知道创宇信息技术有限公司 A kind of reverse proxy method of multi-core parallel concurrent
CN106911808A (en) * 2017-04-28 2017-06-30 福建中金在线信息科技有限公司 A kind of processing method of http request, device and the network equipment
CN108089927A (en) * 2016-11-23 2018-05-29 阿里巴巴集团控股有限公司 The method and device of message communicating are realized based on Web Worker
CN111177513A (en) * 2019-12-31 2020-05-19 北京百度网讯科技有限公司 Method and device for determining abnormal access address, electronic equipment and storage medium
CN112448977A (en) * 2019-08-30 2021-03-05 北京京东尚科信息技术有限公司 System, method, apparatus and computer readable medium for assigning tasks
CN114051022A (en) * 2021-11-17 2022-02-15 山石网科通信技术股份有限公司 HTTP request processing method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030097564A1 (en) * 2000-08-18 2003-05-22 Tewari Anoop Kailasnath Secure content delivery system
CN101860493A (en) * 2009-04-08 2010-10-13 华为软件技术有限公司 Method, server and system for distributing application server address for clients
CN102780768A (en) * 2012-06-29 2012-11-14 北京奇虎科技有限公司 Processing method and processing system for highly-concurrent requests
CN103023797A (en) * 2011-09-23 2013-04-03 百度在线网络技术(北京)有限公司 Data center system and device and method for providing service
CN103051717A (en) * 2012-12-25 2013-04-17 北京小米科技有限责任公司 Method, device and equipment for processing http request
CN103516785A (en) * 2013-08-19 2014-01-15 上海艾泰网络信息有限公司 Web page proxy system and communication method thereof
CN103731482A (en) * 2013-12-24 2014-04-16 浪潮电子信息产业股份有限公司 Cluster load balancing system and achieving method thereof

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030097564A1 (en) * 2000-08-18 2003-05-22 Tewari Anoop Kailasnath Secure content delivery system
CN101860493A (en) * 2009-04-08 2010-10-13 华为软件技术有限公司 Method, server and system for distributing application server address for clients
CN103023797A (en) * 2011-09-23 2013-04-03 百度在线网络技术(北京)有限公司 Data center system and device and method for providing service
CN102780768A (en) * 2012-06-29 2012-11-14 北京奇虎科技有限公司 Processing method and processing system for highly-concurrent requests
CN103051717A (en) * 2012-12-25 2013-04-17 北京小米科技有限责任公司 Method, device and equipment for processing http request
CN103516785A (en) * 2013-08-19 2014-01-15 上海艾泰网络信息有限公司 Web page proxy system and communication method thereof
CN103731482A (en) * 2013-12-24 2014-04-16 浪潮电子信息产业股份有限公司 Cluster load balancing system and achieving method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
唐四薪 主编: "《PHP Web程序设计与Ajax技术》", 31 January 2014 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105376325A (en) * 2015-12-07 2016-03-02 青岛农业大学 Methods, devices and system for obtaining HTTP message status
CN106210058A (en) * 2016-07-13 2016-12-07 成都知道创宇信息技术有限公司 A kind of reverse proxy method of multi-core parallel concurrent
CN106210058B (en) * 2016-07-13 2019-04-16 成都知道创宇信息技术有限公司 A kind of reverse proxy method of multi-core parallel concurrent
CN108089927A (en) * 2016-11-23 2018-05-29 阿里巴巴集团控股有限公司 The method and device of message communicating are realized based on Web Worker
CN108089927B (en) * 2016-11-23 2022-01-14 阿里巴巴集团控股有限公司 Method and device for realizing message communication based on Web Worker
CN106911808A (en) * 2017-04-28 2017-06-30 福建中金在线信息科技有限公司 A kind of processing method of http request, device and the network equipment
CN112448977A (en) * 2019-08-30 2021-03-05 北京京东尚科信息技术有限公司 System, method, apparatus and computer readable medium for assigning tasks
CN111177513A (en) * 2019-12-31 2020-05-19 北京百度网讯科技有限公司 Method and device for determining abnormal access address, electronic equipment and storage medium
CN111177513B (en) * 2019-12-31 2023-10-31 北京百度网讯科技有限公司 Determination method and device of abnormal access address, electronic equipment and storage medium
CN114051022A (en) * 2021-11-17 2022-02-15 山石网科通信技术股份有限公司 HTTP request processing method and device

Similar Documents

Publication Publication Date Title
CN104539645A (en) Method and equipment for processing http request
US8880710B2 (en) Website monitoring and cookie setting
US20170185678A1 (en) Crawler system and method
CN101917490B (en) Method and system for reading cache data
JP2015167014A (en) Method, apparatus, sever and system for implementing web application
CN101159762B (en) Method and device of accelerating download of web page contents
CN102737019A (en) Machine behavior determining method, webpage browser and webpage server
CN102307220B (en) Cross-domain webpage information interaction method
CN103347092A (en) Method and device for recognizing cacheable file
EP2690555A3 (en) Hardware resource accessing systems and methods for accessing hardware resources in browser-based operating systems and machine-readable storage medium thereof
CN104378399A (en) Data push method, platform server, client terminal and system
CN103475749A (en) Cross-domain communication method and device
CN103973812A (en) Service interface providing method and system based on uniform resource locator in HTTP
CN104618388A (en) Quick registration and login method and corresponding reset server and information server
CN112235262A (en) Message analysis method and device, electronic equipment and computer readable storage medium
CN104253783A (en) Web application realization code loading method, device, system and server
CN105787750A (en) Information pushing method and information pushing device
CN104615597A (en) Method, device and system for clearing cache file in browser
US9571555B2 (en) Methods circuits devices systems and associated computer executable code for web augmentation
CN107105004B (en) Cross-platform service calling method and device
US20140040502A1 (en) Scaling of stateful enterprise services
JP6199844B2 (en) Suspicious part estimation device and suspected part estimation method
CN103780680A (en) Server real-time pushing system based on JMS message bus and method
CN104881605B (en) A kind of webpage redirects leak detection method and device
Kim et al. Design of smart platform-based event-log analysis and parameter-modifying software for naval combat systems

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: 20150422

RJ01 Rejection of invention patent application after publication