CN105915655B - Network agent method and agency plant - Google Patents
Network agent method and agency plant Download PDFInfo
- Publication number
- CN105915655B CN105915655B CN201610506654.0A CN201610506654A CN105915655B CN 105915655 B CN105915655 B CN 105915655B CN 201610506654 A CN201610506654 A CN 201610506654A CN 105915655 B CN105915655 B CN 105915655B
- Authority
- CN
- China
- Prior art keywords
- server
- access request
- group
- cluster
- formal
- 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.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/564—Enhancement of application control based on intercepted application data
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/566—Grouping or aggregating service requests, e.g. for unified processing
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
- Hardware Redundancy (AREA)
Abstract
The present invention provides a kind of Proxy Methods for network, comprising: executes domain name mapping to access request, which is parsed to first agent's server;And the access request is acted on behalf of based on the configuration information of itself by the formal publisher server group into first server cluster by first agent's server, the first server cluster includes accessing the formal publisher server group serviced and for the pre- publisher server group of server updating for providing, the pre- publisher server group is switched to formal publisher server group after upgrading to service for providing access, and the formal publisher server group is correspondingly switched to the pre- publisher server group for server updating.
Description
Technical field
The present invention relates to Internet technology more particularly to network agent method and agency plants.
Background technique
Network agent function is the common internet function executed by proxy server, i.e. agency network user goes to take
Obtain the network information.Figuratively, proxy server is the terminal of the network information.Under normal circumstances, we use client,
Such as web browser must send out access request to be returned when directly removing to connect other Internet websites and obtaining the network information
It answers, then other side sends back information to come again.Proxy server is a service between browser and Web server
Device, after having it, browser is not directly to go to fetch webpage to Web server but issue request to proxy server.It visits
It asks that request can first be sent to proxy server, information required for browser is fetched by proxy server and sends your browsing to
Device.Moreover, most of proxy server all has the function of buffering, just as a big Cache, it has very big storage empty
Between, it is constantly obtained new in data storage to the memory of its machine, if the requested data of browser are in its machine
It is had existed on memory and is newest, then it is just not again from Web server access evidence, and directly will be on memory
Data transmission to the browser of user, can thus significantly improve surfing and efficiency.
Summary of the invention
A brief summary of one or more aspects is given below to provide to the basic comprehension in terms of these.This general introduction is not
The extensive overview of all aspects contemplated, and be both not intended to identify critical or decisive element in all aspects also non-
Attempt to define the range in terms of any or all.Its unique purpose is to provide the one of one or more aspects in simplified form
A little concepts are with the sequence for more detailed description given later.
According to an aspect of the present invention, a kind of Proxy Method for network is provided, comprising:
Domain name mapping is executed to access request, which is parsed to first agent's server;And
The access request is acted on behalf of to first server cluster based on the configuration information of itself by first agent's server
In formal publisher server group, the first server cluster include for provide access service formal publisher server group and
For the pre- publisher server group of server updating, which is switched to formal issuing service after upgrading
Device group for providing access to service, and the formal publisher server group is switched to the pre- publisher server group correspondingly to be used for
Server updating.
In one example, which includes: the launch position based on the access request by the access request solution
First agent's server into multiple proxy servers is analysed, multiple proxy server is deployed in different regions, each
Corresponding server cluster is deployed in region, the launch position of the access request is fallen in locating for first agent's server
In one region, which is the server set in the configuration information of first agent's server in preferred region
Group.
In one example, this by the access request act on behalf of the formal publisher server group into the first server cluster into
One step includes: that the access request is acted on behalf of into the first server cluster the formal publisher server based on load balancing
Server in group.
In one example, Proxy Method further include: if in the formal publisher server group of the first server cluster
The equal response abnormality of Servers-all, then by first agent's server based on the configuration information of itself by the access request act on behalf of to
Formal publisher server group in server cluster in next region is until the access request obtains normal response.
In one example, Proxy Method further include: if the formal publisher server of the server cluster in all regions
The equal response abnormality of group is then acted on behalf of the access request to first clothes based on the configuration information of itself by first agent's server
The pre- publisher server group being engaged in device cluster.
In one example, Proxy Method further include: if the institute in the pre- publisher server group of the first server cluster
There is the equal response abnormality of server, is then acted on behalf of the access request to this based on the configuration information of itself by first agent's server
Pre- publisher server group in server cluster in next region is until the access request obtains normal response, wherein subsequent
If having detected, formal publisher server group is worked normally, and subsequent access request is acted on behalf of to the formal publication clothes of normal work
Business device group.
In one example, Proxy Method further include: after the access request obtains normal response, modification should match confidence
Breath is to configure preferred region for the region where providing the server cluster of normal response.
In one example, the load balancing include it is following at least one: repeating query is balanced, weight repeating query is balanced, random
Balanced, response speed equilibrium, minimum connection number is balanced, processing capacity is balanced, DNS response is balanced.
In one example, which includes head portion and main part, further includes: by first agent's server
The main part of the access request is parsed to obtain User ID, with the mark for the load balancing.
In one example, first agent's server is based on the request format about the access request being locally stored to this
The main part of access request executes parsing.
According to another aspect of the present invention, a kind of agency plant for network is provided, comprising:
Domain name resolution server, for executing domain name mapping to access request;
At least one proxy server, each proxy server is for executing agent functionality;And
At least one server cluster, each server cluster include for providing the formal publisher server of access service
Group and pre- publisher server group for server updating, the pre- publisher server group are switched to formal publication after upgrading
Server group with for provide access service, and the formal publisher server group be correspondingly switched to the pre- publisher server group with
For server updating,
Wherein the access request is parsed the first generation at least one proxy server by the domain name resolution server
Server is managed, which is acted on behalf of the access request at least one server based on the configuration information of itself
The formal publisher server group of first server cluster in cluster.
In one example, which includes the multiple proxy servers for being deployed in different regions,
At least one server cluster includes the multiple server clusters for being deployed in different geographical, which is based on should
The launch position of access request parses the access request to first agent's server, and the launch position of the access request is fallen in
In first region locating for first agent's server, which is the configuration information of first agent's server
Server cluster in middle first choice region.
In one example, which is further used for acting on behalf of the access request based on load balancing
Server into the first server cluster in the formal publisher server group.
In one example, if first agent's server is further used for the formal issuing service of the first server cluster
The equal response abnormality of Servers-all in device group, then acted on behalf of the access request to next region based on the configuration information of itself
Server cluster in formal publisher server group until the access request obtain normal response.
In one example, if first agent's server is further used for the formal hair of the server cluster in all regions
The equal response abnormality of cloth server group is then acted on behalf of the access request into the first server cluster based on the configuration information of itself
Pre- publisher server group, wherein if subsequent detected that formal publisher server group works normally, by subsequent access request
The formal publisher server group that agency extremely works normally.
In one example, if first agent's server is further used for the pre- publisher server of the first server cluster
The equal response abnormality of Servers-all in group is then acted on behalf of the access request to next region based on the configuration information of itself
Server cluster in pre- publisher server group until the access request obtain normal response.
In one example, which is further used for after the access request obtains normal response, repairs
Change the configuration information to configure preferred region for the region where providing the server cluster of normal response.
In one example, the load balancing include it is following at least one: repeating query is balanced, weight repeating query is balanced, random
Balanced, response speed equilibrium, minimum connection number is balanced, processing capacity is balanced, DNS response is balanced.
In one example, which includes head portion and main part, first agent's server further include: solution
Module is analysed, for parsing the main part of the access request to obtain User ID, with the mark for the load balancing.
In one example, which further includes database, and there are many request types for storage in the database
Request format, the request format which searches the database to request according to the user is come the master to the access request
Body portion executes parsing.
In the present invention, by providing the real-time switching of formal publication and pre- publication environment, all agency services are solved
With the problem of coming into force after needs are restarted is postponed, which does not need to restart server for device modification, and it is i.e. raw in real time to modify any configuration
Effect, realizes the effect of dynamic proxy.On the other hand, by the way that the concept of region is added, individually some region can be acted on behalf of
Load, can also configure multiple regions, carry out load agent to multiple regions, and multiple regions switch over, and provide agency's
Flexibility.
In addition, can only obtain load strategy related content from request header information compared to nginx, the present invention is asked by parsing
Ask body acquisition of information load strategy content, to strengthen load strategy, it is single to solve general load strategy executive mode
Problem to support Proxy load equilibrium diversity, such as can support the diversified forms such as wechat and webservice.
Detailed description of the invention
After the detailed description for reading embodiment of the disclosure in conjunction with the following drawings, it better understood when of the invention
Features described above and advantage.In the accompanying drawings, each component is not necessarily drawn to scale, and has similar correlation properties or feature
Component may have same or similar appended drawing reference.
Fig. 1 is to show the block diagram of agency plant according to an aspect of the present invention;
Fig. 2 is to show the flow chart of Proxy Method according to an aspect of the present invention;
Fig. 3 is to show the block diagram of agency plant according to another aspect of the present invention;And
Fig. 4 is to show the flow chart of Proxy Method according to another aspect of the present invention.
Specific embodiment
Below in conjunction with the drawings and specific embodiments, the present invention is described in detail.Note that below in conjunction with attached drawing and specifically real
The aspects for applying example description is merely exemplary, and is understood not to carry out any restrictions to protection scope of the present invention.
Fig. 1 is to show the block diagram of agency plant 100 according to an aspect of the present invention.As shown in Figure 1, agency plant
100 may include domain name resolution server 101, proxy server 121,122 and server cluster 131,132.
User initiates an access request via client.Here it is for example micro- that client can be web browser, APP software
Letter etc..The access request initiated via client carries out domain name mapping via domain name resolution server 101 first.Domain name mapping
Server 101 one of is responsible for parsing access request to proxy server 121,122.
According to an aspect of the present invention, by " region " Lai Zhihang agent functionality.Proxy server 121,122 is deployed in not
Same region, server cluster 131,132 are also deployed in different regions.In example shown in Fig. 1,121 and of proxy server
Server cluster 131 is deployed in identical region 1;Proxy server 122 and server cluster 132 are deployed in identical region
2。
It illustrate only two regions in example shown in Fig. 1, region 1, region 2 also only illustrate the two ground
The proxy server and server cluster in domain, however, it will be understood by those skilled in the art that more than two regions may be present,
And corresponding proxy server and server cluster are disposed in each region, such as deposits the agency service being deployed in the n of region
Device 12n and server cluster 13n (wherein n > 2) (not shown).
In one embodiment, domain name resolution server 101 can be determined based on the initiation address of access request by the access
Request analysis is to which proxy server.It is taken for example, domain name resolution server 101 can parse access request to first agent
Business device, wherein the initiation address of the access request falls in region locating for first agent's server.
As an example, first agent's server can be proxy server 121, i.e. domain name resolution server 101 will visit
Ask the proxy server 121 of request analysis to region 1.
Proxy server 121 for example receives the access request by monitoring 80 ports.Proxy server 121 can be based on certainly
The configuration information of body determines the server cluster acted on behalf of access request in preferred region.First choice is can store in configuration information
Region, so-called first choice region refer to that proxy server 121 is preferentially acted on behalf of access request to the server cluster of the first choice region.
The sorted lists of other regions sorted by priority can also be stored in configuration information.
As an example, the preferred region in the configuration information of lower proxy server of normal condition is the proxy server
Region locating for itself.Such as proxy server 121, preferred region is region 1, for proxy server 122
For, preferred region is region 2.Certainly, the preferred region in configuration information can be changed, such as the clothes in preferred region
Business device cluster occur delay machine can not normal response when, preferred region can be changed, this is described in detail below.
In example shown in Fig. 1, proxy server 121 can be acted on behalf of access request to region based on own configuration information
Server cluster 131 in 1.
Contain multiple servers, such as server A, B, C, D in server cluster 131, illustrates only 4 services here
Device, however it will be appreciated that may exist more servers.
Proxy server 121 can be acted on behalf of access request to the server cluster in preferred region based on load balancing
The server in server cluster 131 i.e. in region 1.
Common load balancing includes following several types:
Repeating query equilibrium (Round Robin): server in inside is distributed in the request for carrying out automatic network each time in turn, from
Then 1 to N restarts.The Servers-all that such equalization algorithm is suitable in server group has identical software and hardware configuration
And average service requests the case where relative equilibrium.
Weight repeating query is balanced (Weighted Round Robin): according to the different disposal ability of server, giving each clothes
Business device distributes different weights, can receive the service request of corresponding weight value number.Such as: the weight of server A is designed
Weight at 1, B is that the weight of 3, C is 6, then server A, B, C by receive respectively 10%, 30%, 60% service request.
Such equalization algorithm can ensure that high performance server obtains more utilization rates, avoid the server load of low performance overweight.
Stochastic Equilibrium (Random): the multiple servers request for carrying out automatic network being randomly assigned in inside.
Weight Stochastic Equilibrium (Weighted Random): such equalization algorithm is similar to weight Round-Robin Algorithm, but is locating
Reason request is a randomly selected process when sharing.
Response speed equilibrium (Response Time): load-balancing device issues a detection to internal each server and asks
(such as Ping) is asked, which platform server is then determined to the fastest response time of probe requests thereby according to server each in inside
Carry out the service request at customer in response end.Such equalization algorithm can preferably reflect the current operating conditions of server, but this is most fast
Response time only refers only to the fastest response time between load-balancing device and server, rather than between client and server
The fastest response time.
Minimum connection number is balanced (Least Connection): what the service of request each time of client was stopped in server
Time might have biggish difference, with longer working time, if using simple repeating query or Stochastic Equilibrium algorithm, it is each
Connection process on platform server, which may generate, to be differed greatly from, and does not reach real load balancing.Minimum connection number
Equalization algorithm has a data record to each server for needing load in inside, records the current server and is handling
Connection quantity current request will be distributed to the least server of connection number when there is new service attachment request, and make equilibrium
Actual conditions are more in line with, are loaded more balanced.The request service that such equalization algorithm is handled when being suitble to long, such as FTP.
Processing capacity is balanced: such equalization algorithm, which will distribute to service request, handles load (according to server in inside
CPU model, CPU quantity, memory size and current connection number etc. convert) most light server, due to consideration that internal
The processing capacity and current network operation conditions of server are especially suitable for so such equalization algorithm is comparatively more accurate
In the case where applying to layer 7 (application layer) load balancing.
DNS responds balanced (Flash DNS): on internet, either HTTP, FTP or other service requests,
Client is typically all that the exact IP address of server is found by domain name mapping.Under this equalization algorithm, divides and be in not
The domain name mapping request of the same client is received with the load-balancing device in geographical location, and this domain name within the same time
Be parsed into respective corresponding server IP address (i.e. with this load-balancing device the server in same position geographical location IP
Address) and return to client, then client will be serviced with the domain name mapping IP address received at first to continue request, and be ignored
Other IP address responses.In the case where kind of a balance policy is suitably applied in global load balancing, it is to local load balancing
Nonsensical.
Such as proxy server 121 can be acted on behalf of access request into server cluster 131 based on load balancing
Server A can be again based on load balancing and act on behalf of access request to the server set if server A response abnormality
Other servers in group 131, if response or exception, act on behalf of next server into the server cluster 131 again,
This operation is repeated until access request obtains normal response.
In extreme circumstances, if the Servers-all in server cluster in preferred region is all unable to normal response,
Proxy server 121 can be acted on behalf of access request to the server cluster in another region, such as with confidence based on configuration information
Priority is only second to the server cluster in next region of preferred region in breath.As an example, for example can proxy server 121
Access request can be acted on behalf of to the server cluster 132 in region 2.
If server cluster 132 is capable of providing normal response, proxy server 121 can modify configuration information with will be preferred
Region is changed to region 2.More preferably, when the server cluster 131 in region 1 restores normally, the preferred region of proxy server 121
Region 1 can be changeed back again.
Access request generally comprises head portion and main part.As discussed previously, access request, which is likely to be, to be passed through
The network platforms such as wechat platform issue, at this point, the information of the head portion of access request be it is the same, cannot function as some general
The mark of logical load strategy.
In the present invention, proxy server may include database and parsing module (not shown).It can be in database
Prestore the request format there are many request type.Parsing module can request by searching for database to be requested according to the user
Format parses the main part of access request, to obtain User ID, it is possible thereby to the mark as load balancing.
Fig. 2 is to show the flow chart of Proxy Method 200 according to an aspect of the present invention.As shown in Fig. 2, Proxy Method
200 can comprise the following steps that
In step 201: executing domain name mapping to access request, access request is parsed to the into multiple proxy servers
One proxy server, multiple proxy server are deployed in different regions.
The parsing can be the launch position based on access request to carry out, such as the launch position of the access request is fallen
In the first region locating for first agent's server.
In step 202: being acted on behalf of access request to preferred region based on the configuration information of itself by first agent's server
Interior server cluster.
Preferred region is can store in configuration information, so-called first choice region refers to that proxy server is preferential by access request
It acts on behalf of to the server cluster of the first choice region.The row of other regions sorted by priority can also be stored in configuration information
Sequence table.As an example, the preferred region in the configuration information of lower proxy server of normal condition is the proxy server
Region locating for itself.
Further, first agent's server can be acted on behalf of access request to preferred region based on load balancing
A server in server cluster.As previously mentioned, the load balancing often having may include that repeating query is balanced, weight repeating query is equal
Weighing apparatus, Stochastic Equilibrium, response speed are balanced, minimum connection number is balanced, processing capacity is balanced, DNS responds equilibrium etc..
If the server response abnormality acted on behalf of, is again based on load balancing and acts on behalf of access request to first choice
Other servers in server cluster in region are until access request obtains normal response.
If the equal response abnormality of Servers-all in the server cluster in the first choice region, by first agent's server
Access request is acted on behalf of to the server cluster in another region, such as according to excellent in configuration information based on the configuration information of itself
First grade sequence is located at the server cluster in next region of preferred region.
After access request being acted on behalf of to the server cluster in another region and access request obtains normal response,
The configuration information is modified to configure preferred region for another region.It preferably, can be in the server in first region
When cluster can be with normal response, selection of land domain headed by the first region is changeed back.
In one example, can by first agent's server parse access request main part to obtain User ID, with
In the mark of load balancing.For example, first agent's server can be based on the request lattice about access request being locally stored
Formula executes parsing to the main part of access request.
Fig. 3 is to show the block diagram of agency plant 300 according to another aspect of the present invention.
As shown in figure 3, agency plant 300 may include domain name resolution server 301, proxy server 321,322 and clothes
Business device cluster 331,332.Two proxy servers 321,322 and two server clusters 331,332 shown in Fig. 3 are only
It is example, in practice, may exist a proxy server and a server cluster, there may also be the agencies for being greater than two
Server and server cluster greater than two.
According to an aspect of the present invention, each server cluster may include two server groups, one of server group
To provide the formal publisher server group of access service, another group is the pre- publisher server group for server updating.This two
Group server group be it is duplicate, the role that difference both is only that is different, that is, the role of each server group is " formal
It is switched between publisher server group " and " pre- publisher server group ".When a server group is " formal publisher server
When group ", another group is then " pre- publisher server group ", and ought originally be that the server group of " formal publisher server group " role is cut
When being changed to " pre- publisher server group ", original server group for " pre- publisher server group " role is switched to " formal hair simultaneously
Cloth server group ".
By taking the example in Fig. 3 as an example, server cluster 331 includes two server groups 3311,3312.Server group 3311
Two server groups mapped each other are originally used for server group 3312, i.e., the two is identical.However by server group 3311
For providing a user access response, another server group 3312, which is not used in, provides a user access response, but for servicing
Device upgrading.At this point, server group 3311 can be described as formal publisher server group, server group 3312 can be described as pre- publication at this time
Server group.
It in one example, is in the time for undertaking pre- publisher server group role, if necessary in server group 3312
Any upgrading is made to server, then any operation is not done to the server group 3311 for undertaking formal publisher server group role, and
It is only to upgrade to server group 3312, server updating here can be update or the server of server content
The modification of configuration.
After the server group 3312 for undertaking pre- publisher server group role upgrades, server group 3312 can be from pre- hair
The role switching of cloth server group is formal publisher server group, and correspondingly, server group 3311 is then from formal publisher server
The role switching of group is pre- publisher server group, and the two realizes role exchange.
It in another example, is in the time for undertaking pre- publisher server group role, if needed in server group 3312
To make any upgrading to server, server group 3312 first can be switched to formal server group, while by server group
3311 are switched to pre- publisher server group;Then, server group 3311 is upgraded.
After upgrading to server group 3311, server group 3312 is switched to pre- publisher server group again,
Server group 3311 after upgrading is switched to formal server group.It should be noted that above-mentioned be switched between server group
Passive switching.But pre- publisher server group can also be switched in the case where formal server group whole exception in the present invention
For formal server group, and formal server group is switched to pre- publisher server group.It is subsequent periodically to detect the pre- of exception
Whether publisher server group is restored normally, after restoring normal to pre- publisher server group, restores normal pre- publisher server
It is switched to formal server group, and formal server group switches back into pre- publisher server group again.
User initiates an access request via client.Here it is for example micro- that client can be web browser, APP software
Letter etc..The access request initiated via client carries out domain name mapping via domain name resolution server 301 first.Domain name mapping
Server 301 one of is responsible for parsing access request to proxy server 321,322, such as proxy server 321.Agency
Server 321 can be acted on behalf of access request to a server cluster, such as server cluster 331 based on the configuration information of itself
Formal publisher server group.
From the foregoing, it will be observed that access request is always acted on behalf of the formal publisher server into server cluster by proxy server
Group.Since formal publisher server group always by upgrading and can provide the server group of normal access response, access is asked
Normal response can be obtained by asking.In addition, although formal publisher server group is cut between two server groups of server cluster
Change, but the switching be for a user it is sightless, therefore, the upgrading of server can not be needed again with seamless switching
Start server.
There are multiple proxy servers and multiple server clusters, agency can be executed by " region "
Function.For example, proxy server 321,322 is deployed in different geographical, server cluster 331,332 is also deployed in different ground
Domain.In examples as shown in figure 3, proxy server 321 and server cluster 331 are deployed in identical region 1;Agency's clothes
Business device 322 and server cluster 332 are deployed in identical region 2.
In one embodiment, domain name resolution server 301 can be determined based on the initiation address of access request by the access
Request analysis is to which proxy server.It is taken for example, domain name resolution server 301 can parse access request to first agent
Business device, wherein the initiation address of the access request falls in region locating for first agent's server.
Proxy server 321 for example receives the access request by monitoring 80 ports.In one example, proxy server
321 can determine the server cluster acted on behalf of access request in preferred region based on the configuration information of itself.It can in configuration information
To be stored with preferred region, so-called first choice region refers to that proxy server 321 is preferentially acted on behalf of access request to the first choice region
Server cluster.The sorted lists of other regions sorted by priority can also be stored in configuration information.
As an example, the preferred region in the configuration information of lower proxy server of normal condition is the proxy server
Region locating for itself.Such as proxy server 321, preferred region is region 1, for proxy server 322
For, preferred region is region 2.
In examples as shown in figure 3, proxy server 321 can be acted on behalf of access request to region based on own configuration information
Server cluster 331 in 1.
Proxy server 321 can be acted on behalf of access request to the server cluster in preferred region based on load balancing
The server in formal publisher server group such as server group 3311 in server cluster 331 i.e. in region 1.
Common load balancing may include repeating query equilibrium, weight repeating query equilibrium, Stochastic Equilibrium, response speed equilibrium,
Minimum connection number is balanced, processing capacity is balanced, DNS responds equilibrium etc..
Such as proxy server 321 can be acted on behalf of access request into server cluster 331 just based on load balancing
Server A in formula publisher server group 3311, if server A response abnormality, can be again based on load balancing will be visited
Other servers of request agency into the server group 3311 are asked, if response or exception, are acted on behalf of again to the server
Next server in group 3311 repeats this operation until access request obtains normal response.
In extreme circumstances, if the Servers-all in the formal publisher server group 3311 of server cluster 331 not
Energy normal response, then proxy server 321 can be acted on behalf of access request to next region based on configuration information, such as with confidence
Priority is only second to the formal publisher server group in the server cluster in next region of preferred region in breath.As showing
Example, such as proxy server 321 can act on behalf of access request to the formal issuing service in the server cluster 332 in region 2
Device group.If formal publisher server group at this time in server cluster 332 is server group 3321, by access request act on behalf of to
Otherwise server group 3321 is acted on behalf of to server group 3322.
In more extreme cases, if the formal publisher server group of the server cluster in all regions respond it is different
Often, then proxy server 321 can be acted on behalf of access request again to the pre- issuing service of the server cluster in preferred region
Pre- publisher server group 3312 in device group, such as the server cluster 331 of region 1.
If pre- publisher server group 3312 in the server cluster 331 of the region 1 also can not normal response, can will visit
It asks in request agency to next region, such as priority is only second to the server in next region of preferred region in configuration information
Pre- publisher server group in cluster, such as pre- publisher server group 3322 in the server cluster 332 of region 2 is until access
Until request obtains normal response.
It is subsequent to be detected with interval time in the case where formal publisher server group all delay machines of Servers-all cluster
Whether formal publisher server group is normal, if formal restore, so that it may switch back into formal publisher server group.
As discussed previously, access request generally comprises head portion and main part.Access request, which is likely to be, to be passed through
The sendings such as wechat platform, webservice, at this point, the information of the head portion of access request be it is the same, cannot function as one
The mark of a little normal load strategies.
In the present invention, proxy server may include database and parsing module (not shown).It can be in database
Prestore the request format there are many request type.Parsing module can request by searching for database to be requested according to the user
Format parses the main part of access request, to obtain User ID, it is possible thereby to the mark as load balancing.
Fig. 4 is to show the flow chart of Proxy Method 400 according to an aspect of the present invention.As shown in figure 4, Proxy Method
400 can comprise the following steps that
In step 401: executing domain name mapping to access request, access request is parsed to first agent's server.
In one example, the access request is parsed into multiple proxy servers based on the launch position of access request
First agent's server, this multiple proxy server is deployed in different regions, corresponding clothes is deployed in each region
Business device cluster.The launch position of the access request is fallen in the first region locating for first agent's server
In step 402: being acted on behalf of access request to the first clothes based on the configuration information of itself by first agent's server
The formal publisher server group being engaged in device cluster, the first server cluster include for providing the formal publication clothes of access service
Business device group and the pre- publisher server group for server updating, the pre- publisher server group are switched to formally after upgrading
Publisher server group with for providing access service, and formal publisher server group be correspondingly switched to pre- publisher server group with
For server updating.
In the example of one server cluster of each ground configuration of territory, which can be the first agent
Server cluster in the configuration information of server in preferred region.
Further, first agent's server can be acted on behalf of access request to the first server based on load balancing
The server in formal publisher server group in cluster.Common load balancing may include repeating query equilibrium, weight repeating query
Equilibrium, Stochastic Equilibrium, response speed is balanced, minimum connection number is balanced, processing capacity is balanced, DNS responds equilibrium etc..
If the equal response abnormality of Servers-all in the formal publisher server group of first server cluster, can be by first
Access request is acted on behalf of the formal hair into the server cluster in next region based on the configuration information of itself by proxy server
Cloth server group is until access request obtains normal response.
In extreme situations, if the formal equal response abnormality of publisher server group of the server cluster in all regions,
Then access request can be acted on behalf of based on the configuration information of itself by the pre- hair into first server cluster by first agent's server
Cloth server group.
In more extreme cases, if the Servers-all in the pre- publisher server group of first server cluster responds
It is abnormal, then access request can be acted on behalf of to the clothes in above-mentioned next region based on the configuration information of itself by first agent's server
The pre- publisher server group being engaged in device cluster repeats this operation until access request obtains normal response.
It is subsequent to be detected with interval time in the case where formal publisher server group all delay machines of Servers-all cluster
Whether formal publisher server group is normal, if formal restore, so that it may switch back into formal publisher server group.
In one example, can by first agent's server parse access request main part to obtain User ID, with
In the mark of load balancing.For example, first agent's server can be based on the request lattice about access request being locally stored
Formula executes parsing to the main part of access request.
Although for simplify explain the above method is illustrated to and is described as a series of actions, it should be understood that and understand,
The order that these methods are not acted is limited, because according to one or more embodiments, some movements can occur in different order
And/or with from it is depicted and described herein or herein it is not shown and describe but it will be appreciated by those skilled in the art that other
Movement concomitantly occurs.
In the present invention, it by the way that the concept of region is added, can also be configured individually to some region Proxy load
Multiple regions carry out load agent to multiple regions, and multiple regions switch over, and provide the flexibility of agency.On the other hand,
By providing the real-time switching of formal publication and pre- publication environment, solves all proxy servers modifications and restart with postponing needs
After the problem of coming into force, which does not need to restart server, modifies any configuration and come into force in real time, realize the effect of dynamic proxy
Fruit.
In addition, can only obtain load strategy related content from request header information compared to nginx, the present invention is asked by parsing
Ask body acquisition of information load strategy content, to strengthen load strategy, it is single to solve general load strategy executive mode
Problem to support Proxy load equilibrium diversity, such as can support the diversified forms such as wechat and webservice.
Skilled artisans will appreciate that the various illustrative logic cards described in conjunction with the embodiments described herein
Block, module, circuit and algorithm steps can be realized as electronic hardware, computer software or combination of the two.Clearly to solve
Say that this interchangeability of hardware and software, various illustrative components, frame, module, circuit and step are with its function above
Property form make generalization description.Such functionality is implemented as hardware or software depends on concrete application and is applied to
The design constraint of total system.Technical staff can realize described function with different modes for every kind of specific application
Property, but such realization decision should not be interpreted to cause departing from the scope of the present invention.
In conjunction with presently disclosed embodiment describe various illustrative logic modules and circuit can with general processor,
Digital signal processor (DSP), specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic
Device, discrete door or transistor logic, discrete hardware component or its be designed to carry out any group of function described herein
It closes to realize or execute.General processor can be microprocessor, but in alternative, which can be any routine
Processor, controller, microcontroller or state machine.Processor is also implemented as calculating the combination of equipment, such as DSP
With the combination of microprocessor, multi-microprocessor, one or more microprocessors to cooperate with DSP core or any other this
Class configuration.
The step of method or algorithm for describing in conjunction with embodiment disclosed herein, can be embodied directly in hardware, in by processor
It is embodied in the software module of execution or in combination of the two.Software module can reside in RAM memory, flash memory, ROM and deposit
Reservoir, eprom memory, eeprom memory, register, hard disk, removable disk, CD-ROM or known in the art appoint
In the storage medium of what other forms.Exemplary storage medium is coupled to processor so that the processor can be from/to the storage
Medium reads and writees information.In alternative, storage medium can be integrated into processor.Pocessor and storage media can
It resides in ASIC.ASIC can reside in user terminal.In alternative, pocessor and storage media can be used as discrete sets
Part is resident in the user terminal.
In one or more exemplary embodiments, described function can be in hardware, software, firmware, or any combination thereof
Middle realization.If being embodied as computer program product in software, each function can be used as one or more item instructions or generation
Code may be stored on the computer-readable medium or be transmitted by it.Computer-readable medium includes computer storage medium and communication
Both media comprising any medium for facilitating computer program to shift from one place to another.Storage medium can be can quilt
Any usable medium of computer access.It is non-limiting as example, such computer-readable medium may include RAM, ROM,
EEPROM, CD-ROM or other optical disc storages, disk storage or other magnetic storage apparatus can be used to carrying or store instruction
Or data structure form desirable program code and any other medium that can be accessed by a computer.Any connection is also by by rights
Referred to as computer-readable medium.For example, if software is using coaxial cable, fiber optic cables, twisted pair, digital subscriber line
(DSL) or the wireless technology of such as infrared, radio and microwave etc is passed from web site, server or other remote sources
It send, then the coaxial cable, fiber optic cables, twisted pair, DSL or such as infrared, radio and microwave etc is wireless
Technology is just included among the definition of medium.Disk (disk) and dish (disc) as used herein include compression dish
(CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and blu-ray disc, which disk (disk) are often reproduced in a manner of magnetic
Data, and dish (disc) with laser reproduce data optically.Combinations of the above should also be included in computer-readable medium
In the range of.
Claims (18)
1. a kind of Proxy Method for network, comprising:
Domain name mapping is executed to access request, the access request is parsed to first agent's server;And
The access request is acted on behalf of to first server cluster based on the configuration information of itself by first agent's server
In formal publisher server group, the first server cluster include for provide access service formal publisher server group
With the pre- publisher server group for server updating, the pre- publisher server group is switched to formal publication after upgrading
Server group for providing access to service, and the formal publisher server group is correspondingly switched to the pre- publisher server
Group is to be used for server updating;
If the equal response abnormality of Servers-all in the formal publisher server group of the first server cluster, by described
One proxy server is acted on behalf of the access request into the server cluster in next region based on the configuration information of itself
Formal publisher server group is until the access request obtains normal response.
2. Proxy Method as described in claim 1, which is characterized in that the execution domain name mapping includes:
The access request is parsed described first into multiple proxy servers by the launch position based on the access request
Proxy server, the multiple proxy server are deployed in different regions, corresponding server set are deployed in each region
Group, the launch position of the access request are fallen in the first region locating for first agent's server, the first service
Device cluster is the server cluster in the configuration information of first agent's server in preferred region.
3. Proxy Method as claimed in claim 2, which is characterized in that described to act on behalf of the access request to first clothes
Formal publisher server group in business device cluster further comprises:
The access request is acted on behalf of to formal issuing service described in the first server cluster based on load balancing
Server in device group.
4. Proxy Method as described in claim 1, which is characterized in that further include:
If the formal equal response abnormality of publisher server group of the server cluster in all regions, is serviced by the first agent
The access request is acted on behalf of the pre- publisher server group into the first server cluster based on the configuration information of itself by device.
5. Proxy Method as claimed in claim 4, which is characterized in that further include:
If the equal response abnormality of Servers-all in the pre- publisher server group of the first server cluster, by described first
Proxy server is acted on behalf of the access request into the server cluster in next region based on the configuration information of itself
Pre- publisher server group until the access request obtain normal response, wherein if subsequent detected formal issuing service
Device group works normally, then acts on behalf of subsequent access request to the formal publisher server group of normal work.
6. Proxy Method as claimed in claim 1 or 5, which is characterized in that further include:
After the access request obtains normal response, the configuration information is modified so that the server set of normal response will be provided
Region where group is configured to preferred region.
7. Proxy Method as claimed in claim 3, which is characterized in that the load balancing include it is following at least one:
Repeating query equilibrium, weight repeating query equilibrium, Stochastic Equilibrium, response speed is balanced, minimum connection number is balanced, processing capacity is balanced, DNS is rung
Answer equilibrium.
8. Proxy Method as claimed in claim 3, which is characterized in that the access request includes head portion and main part
Point, further includes:
The main part of the access request is parsed to obtain User ID, to be used for the load by first agent's server
The mark of balance policy.
9. Proxy Method as claimed in claim 8, which is characterized in that first agent's server is based on the pass being locally stored
Parsing is executed to the main part of the access request in the request format of the access request.
10. a kind of agency plant for network, comprising:
Domain name resolution server, for executing domain name mapping to access request;
At least one proxy server, each proxy server is for executing agent functionality;And
At least one server cluster, each server cluster include for provide access service formal publisher server group and
For the pre- publisher server group of server updating, the pre- publisher server group is switched to formal publication clothes after upgrading
Device group of being engaged in for providing access to service, and the formal publisher server group is correspondingly switched to the pre- publisher server group
To be used for server updating,
Wherein the access request is parsed first at least one described proxy server by domain name resolution server
Proxy server, first agent's server are acted on behalf of the access request to described at least one based on the configuration information of itself
The formal publisher server group of first server cluster in a server cluster;
If first agent's server is further used for the institute in the formal publisher server group of the first server cluster
There is the equal response abnormality of server, is then acted on behalf of the access request to the server in next region based on the configuration information of itself
Formal publisher server group in cluster is until the access request obtains normal response.
11. agency plant as claimed in claim 10, which is characterized in that at least one described proxy server includes being deployed in
Multiple proxy servers of different regions, at least one described server cluster include the multiple services for being deployed in different geographical
Device cluster, launch position of the domain name resolution server based on the access request parse the access request to described
One proxy server, the launch position of the access request are fallen in the first region locating for first agent's server, institute
State the server cluster in the configuration information that first server cluster is first agent's server in preferred region.
12. agency plant as claimed in claim 11, which is characterized in that first agent's server is further used for being based on
Load balancing acts on behalf of the access request into formal publisher server group described in the first server cluster
Server.
13. agency plant as claimed in claim 10, which is characterized in that if first agent's server is further used for institute
There is the formal equal response abnormality of publisher server group of the server cluster in region, then based on the configuration information of itself by the visit
Ask pre- publisher server group of the request agency into the first server cluster, wherein if subsequent detected formal publication
Server group works normally, then acts on behalf of subsequent access request to the formal publisher server group of normal work.
14. agency plant as claimed in claim 13, which is characterized in that if first agent's server is further used for institute
The equal response abnormality of Servers-all in the pre- publisher server group of first server cluster is stated, then based on the configuration information of itself
The access request is acted on behalf of into the pre- publisher server group into the server cluster in next region until the access
Request obtains normal response.
15. the agency plant as described in claim 10 or 14, which is characterized in that first agent's server is further used for
After the access request obtains normal response, the configuration information is modified so that the server cluster institute of normal response will be provided
Region be configured to preferred region.
16. agency plant as claimed in claim 12, which is characterized in that the load balancing includes following at least one
Person: repeating query equilibrium, weight repeating query equilibrium, Stochastic Equilibrium, response speed is balanced, minimum connection number is balanced, processing capacity is balanced,
DNS response is balanced.
17. agency plant as claimed in claim 12, which is characterized in that the access request includes head portion and main part
Point, first agent's server further include:
Parsing module, for parsing the main part of the access request to obtain User ID, to be used for the load balancing plan
Mark slightly.
18. agency plant as claimed in claim 17, which is characterized in that first agent's server further includes database,
The request format there are many request type is stored in the database, the parsing module searches the database according to
The request format of access request to execute parsing to the main part of the access request.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610506654.0A CN105915655B (en) | 2016-06-30 | 2016-06-30 | Network agent method and agency plant |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610506654.0A CN105915655B (en) | 2016-06-30 | 2016-06-30 | Network agent method and agency plant |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105915655A CN105915655A (en) | 2016-08-31 |
CN105915655B true CN105915655B (en) | 2019-06-21 |
Family
ID=56754208
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610506654.0A Active CN105915655B (en) | 2016-06-30 | 2016-06-30 | Network agent method and agency plant |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105915655B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106657050A (en) * | 2016-12-15 | 2017-05-10 | 迈普通信技术股份有限公司 | Domain name resolution anomaly detection method, detection management server and gateway equipment |
CN106941420B (en) * | 2017-03-16 | 2019-12-13 | 北京深思数盾科技股份有限公司 | cluster application environment upgrading method and device |
CN107092511A (en) * | 2017-04-25 | 2017-08-25 | 北京百家互联科技有限公司 | Pre- dissemination method and device |
CN113596157A (en) * | 2021-07-30 | 2021-11-02 | 绿漫科技有限公司 | SpringCloud-based alliance chain non-inductive publishing method |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101431532A (en) * | 2008-12-15 | 2009-05-13 | 中国电信股份有限公司 | Content routing method, load balancing equipment and resource management equipment |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7454500B1 (en) * | 2000-09-26 | 2008-11-18 | Foundry Networks, Inc. | Global server load balancing |
CN102457557A (en) * | 2010-10-29 | 2012-05-16 | 卓望数码技术(深圳)有限公司 | Wireless network application system and wireless network application method based on C/S (client/server) structure |
-
2016
- 2016-06-30 CN CN201610506654.0A patent/CN105915655B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101431532A (en) * | 2008-12-15 | 2009-05-13 | 中国电信股份有限公司 | Content routing method, load balancing equipment and resource management equipment |
Non-Patent Citations (2)
Title |
---|
CDN关键技术的研究及其系统设计;蒋业文;《中国优秀硕士学位论文全文数据库(电子期刊)》;20150131;正文第2.2-2.3节、第3.2.2-3.2.3节、第3.3节、第4.4节 |
基于云计算的CDN平台研究及其缓存技术探索;谌丽;《中国优秀硕士学位论文全文数据库(电子期刊)》;20130331;正文第3.2.2节、第5.2.2节 |
Also Published As
Publication number | Publication date |
---|---|
CN105915655A (en) | 2016-08-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11443007B2 (en) | System and method for managing network traffic routing | |
US10785322B2 (en) | Server side data cache system | |
US7953887B2 (en) | Asynchronous automated routing of user to optimal host | |
CN108028853B (en) | System, method, and medium for customizable event-triggered computation at edge locations | |
US6324580B1 (en) | Load balancing for replicated services | |
CN104823170B (en) | Distributed cache cluster management | |
US10261938B1 (en) | Content preloading using predictive models | |
CN105915655B (en) | Network agent method and agency plant | |
CN103607424B (en) | Server connection method and server system | |
CN101557427A (en) | Method for providing diffluent information and realizing the diffluence of clients, system and server thereof | |
WO2015069912A1 (en) | Dynamic application version selection | |
CN103391312B (en) | Resource offline method for down loading and device | |
NO327863B1 (en) | Optimized network resource location | |
EP2724243A1 (en) | Dynamic content caching | |
CN105871975A (en) | Method and device for selecting source server | |
CN108632397B (en) | Method and system for controlling network connection | |
CN107317889A (en) | A kind of intelligent DNS scheduling system and dispatching method | |
CN109634753B (en) | Data processing method, device, terminal and storage medium for switching browser kernels | |
US20040243689A1 (en) | Method for accessing information and/or services of a distributed automation system | |
CN105357233A (en) | Remote call method and device | |
CN106060004A (en) | Database access method and database agent node | |
CN111770022B (en) | Capacity expansion method, system, equipment and computer storage medium based on link monitoring | |
CN104320488A (en) | Proxy server system and proxy service method | |
CN111556135A (en) | Request scheduling method, system and device and electronic equipment | |
US20170286483A1 (en) | Standing queries in memory |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
PE01 | Entry into force of the registration of the contract for pledge of patent right |
Denomination of invention: Network proxy method and proxy system Effective date of registration: 20230223 Granted publication date: 20190621 Pledgee: China Construction Bank Corporation Shanghai No.5 Sub-branch Pledgor: SHANGHAI XIAOI ROBOT TECHNOLOGY Co.,Ltd. Registration number: Y2023980033272 |
|
PE01 | Entry into force of the registration of the contract for pledge of patent right |