CN108900598A - Network request forwarding and response method, device, system, medium and electronic equipment - Google Patents
Network request forwarding and response method, device, system, medium and electronic equipment Download PDFInfo
- Publication number
- CN108900598A CN108900598A CN201810671156.0A CN201810671156A CN108900598A CN 108900598 A CN108900598 A CN 108900598A CN 201810671156 A CN201810671156 A CN 201810671156A CN 108900598 A CN108900598 A CN 108900598A
- Authority
- CN
- China
- Prior art keywords
- network request
- region
- console
- data
- access region
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 77
- 230000004044 response Effects 0.000 title claims abstract description 38
- 238000012545 processing Methods 0.000 claims abstract description 54
- 230000002159 abnormal effect Effects 0.000 claims abstract description 29
- 238000001514 detection method Methods 0.000 claims description 16
- 235000014510 cooky Nutrition 0.000 claims description 11
- 238000004590 computer program Methods 0.000 claims description 5
- 238000005516 engineering process Methods 0.000 abstract description 3
- 239000003795 chemical substances by application Substances 0.000 description 41
- 230000003993 interaction Effects 0.000 description 14
- 238000010586 diagram Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000007689 inspection Methods 0.000 description 2
- 230000005291 magnetic effect Effects 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012805 post-processing Methods 0.000 description 2
- 241000208340 Araliaceae Species 0.000 description 1
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 description 1
- 235000003140 Panax quinquefolius Nutrition 0.000 description 1
- 230000005856 abnormality Effects 0.000 description 1
- 230000003190 augmentative effect Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 238000012512 characterization method Methods 0.000 description 1
- 239000004020 conductor Substances 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 238000013497 data interchange Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 235000008434 ginseng Nutrition 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000001568 sexual effect Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
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
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0654—Management of faults, events, alarms or notifications using network fault recovery
- H04L41/0668—Management of faults, events, alarms or notifications using network fault recovery by dynamic selection of recovery network elements, e.g. replacement by the most appropriate element after failure
-
- 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/14—Session management
- H04L67/148—Migration or transfer of sessions
Abstract
Embodiments of the present invention are related to field of computer technology, more specifically, embodiments of the present invention are related to network request retransmission method and device, network request response method and device, network request processing system, storage medium and electronic equipment.This method includes:Network request is received, and access region is determined according to the network request;It detects target proxy server and whether the connection of the console of the access region is normal;When the connection is normal, the network request is forwarded to the console of the access region;When the connection is abnormal, the network request is forwarded to the console of alternative area;Wherein, the access region is different geographic areas from the alternative area.The long-distance disaster of distributed system may be implemented in the present invention, and the wind resistance for improving system is dangerous.
Description
Technical field
Embodiments of the present invention are related to field of computer technology, more specifically, embodiments of the present invention are related to one kind
Network request retransmission method and device, network request response method and device, network request processing system, storage medium and electronics
Equipment.
Background technique
This part intends to provides background or context for the embodiments of the present invention stated in claim, retouching herein
It states and recognizes it is the prior art not because not being included in this section.
With the development of computer and Internet technology, the backstage of more and more large-scale websites or App (application program) are taken
Business device and database schema use the distributed deployment of multizone, multimachine room.For the system of distributed deployment, wherein a certain section
Point is abnormal, and will affect the normal operation of whole system, it is therefore desirable to formulate corresponding high availability scheme.Existing distribution
System high availability scheme majority is the active and standby configuration in single machine room, and when primary server delay machine, can be switched to standby server makes
With to guarantee the normal work in computer room.
Summary of the invention
However, in existing distributed system high availability scheme, in case of computer room or zonal exception, such as machine
Room fire, regional power-off, backbone network exception etc., the service that will lead to entire computer room or region is unavailable.Therefore, the prior art
The long-distance disaster ability of scheme is poor.
Thus, it is also very desirable to a kind of improved network request retransmission method, to ensure generation area in a distributed system
When the exception of property, network request can normally be forwarded, to guarantee the normal operation of whole system.
In the present context, embodiments of the present invention are intended to provide a kind of network request retransmission method and device, network
Request responding method and device, network request processing system, storage medium and electronic equipment.
In the first aspect of embodiment of the present invention, a kind of network request retransmission method is provided, is applied to include multiple
A target proxy server in the Agent layer of proxy server, the method includes:Network request is received, and according to the net
Network requests to determine access region;Whether just to detect the connection of the console of the target proxy server and the access region
Often;When the connection is normal, the network request is forwarded to the console of the access region;When the connection is abnormal
When, the network request is forwarded to the console of alternative area;Wherein, the access region is different from the alternative area
Geographic area.
In certain embodiments of the present invention, aforementioned schemes are based on, when the target proxy server and the access
When the connection exception of the console in region, the method also includes:Obtain at least one other agency service in the Agent layer
The connection status of device and the console of the access region;When the console of described other proxy servers and the access region
Connection it is normal when, the network request is forwarded to other described proxy servers, makes other described proxy servers by institute
State the console that network request is forwarded to the access region;When the control of described other proxy servers and the access region
When the connection exception of platform, the step of network request is forwarded to the console of the alternative area is executed.
In certain embodiments of the present invention, aforementioned schemes are based on, access region packet is determined according to the network request
It includes:Detect the network request whether inclusion region handoff parameter;If do not included, by the affiliated session of the network request
Initial request region is determined as the access region;If comprising the region that the region handoff parameter is specified is determined as
The access region.
In certain embodiments of the present invention, aforementioned schemes are based on, further include:According to the affiliated session of the network request
At least one of initial access domain name, initial cookie and initial positioning information determine the initial request region.
In certain embodiments of the present invention, aforementioned schemes, the initial request of the affiliated session of network request are based on
Region and target proxy server region are the same area.
In certain embodiments of the present invention, aforementioned schemes are based on, the console of the access region includes multiple controls
Platform node processed;When the connection of the target proxy server and the console of the access region is normal, the network is asked
The console for being forwarded to the access region is asked to include:When detecting the target proxy server and a console section
When point connection is normal, the network request is forwarded to and connect the normal console section with the target proxy server
Point;It is equal according to load when detecting that the target proxy server and at least two console nodes all connect normal
Method is accounted, the network request is forwarded to and connect the normal one console node with the target proxy server.
In certain embodiments of the present invention, aforementioned schemes are based on, the target proxy server includes major heading generation
Manage server and standby target proxy server, wherein the major heading proxy server is used to take to the standby target proxy
Business device sends state representation information;The standby target proxy server be used for according to the state representation information determine it is described
When major heading proxy server exception, replace the major heading proxy server.
In certain embodiments of the present invention, aforementioned schemes are based on, further include:By access region described in areal
Adjacent area be determined as the alternative area.
In certain embodiments of the present invention, aforementioned schemes are based on, further include:When the detection target proxy server
When connection with the console of whole region in area belonging to the access region is all abnormal, the main region of adjoining area is determined
For the alternative area.
In the second aspect of embodiment of the present invention, a kind of network request response method is provided, is applied to network request
The console of processing system, the network request processing system further include Agent layer and data-base cluster;The method includes:It connects
Receive the network request of the Agent layer forwarding;Identify the access region of the network request;The network request is forwarded to
The data-base cluster of the access region and/or from the data-base cluster called data of the access region and handle the network
Request.
In certain embodiments of the present invention, aforementioned schemes are based on, further include:After receiving the network request, sentence
Break the corresponding type of interaction of the network request;If the network request corresponds to console type of interaction, separate responses
The network request;If the network request corresponds to database type of interaction, the visit for identifying the network request is executed
The step of asking region.
In certain embodiments of the present invention, aforementioned schemes are based on, the network request is forwarded to the access region
It the data-base cluster in domain and/or from the data-base cluster called data of the access region and handles the network request and includes:
Judge the corresponding service type of the network request;When the network request corresponds to local service, by the network request
It is forwarded to the data-base cluster of the access region and/or from the data-base cluster called data of the access region and handles institute
State network request;When the network request corresponds to regional sex service, the network request is forwarded to the access region
The data-base cluster tune of the data-base cluster of the main region in affiliated area and/or regional main region belonging to the access region
Access evidence simultaneously handles the network request;When the network request corresponds to global service, the network request is forwarded to
The data-base cluster of any region and/or from the data-base cluster called data of any region and handle the network request.
In certain embodiments of the present invention, aforementioned schemes are based on, further include:When detecting that the network request includes
When the handoff parameter of region, the region handoff parameter is added in the URL (uniform resource locator) of the network request, and
Redirect the network request.
In certain embodiments of the present invention, aforementioned schemes are based on, further include:By the URL of the network request and in advance
If white list matches;When successful match, the region handoff parameter is made into invalidation.
In certain embodiments of the present invention, aforementioned schemes are based on, when the network request corresponds to global service,
By the network request be forwarded to the data-base cluster of any region and/or from the data-base cluster called data of any region simultaneously
Handling the network request includes:When the network request corresponds to global service, the network request is forwarded to local
Data-base cluster and/or from local data-base cluster called data and handle the network request.
In certain embodiments of the present invention, aforementioned schemes are based on, further include:Periodically sent to the Agent layer
State representation information, so that whether just the Agent layer determines the connection with the console according to the state representation information
Often.
In the third aspect of embodiment of the present invention, a kind of network request retransmission unit is provided, is applied to include multiple
A target proxy server in the Agent layer of proxy server, described device include:Area determination module, for receiving network
Request, and access region is determined according to the network request;Connecting detection module, for detect the target proxy server with
Whether the connection of the console of the access region is normal;Forwarding module is requested, is used for when the connection is normal, by the net
Network requests the console for being forwarded to the access region, and when the connection is abnormal, the network request is forwarded to standby
The console of favored area;Wherein, the access region is different geographic areas from the alternative area.
In certain embodiments of the present invention, aforementioned schemes are based on, the connecting detection module is also used to when the mesh
When marking the connection exception of the console of proxy server and the access region, at least one other generation in the Agent layer is obtained
Manage the connection status of the console of server and the access region;The request forwarding module is also used to when the target proxy
The connection of server and the console of the access region is abnormal, and when other described proxy servers and the access region
When the connection of console is normal, the network request is forwarded to other described proxy servers, makes other described agency services
The network request is forwarded to the console of the access region by device, and when the target proxy server and the access
The connection of the console in region is abnormal, and the connection of other described proxy servers and the console of the access region is also abnormal
When, the network request is forwarded to the console of the alternative area.
In certain embodiments of the present invention, aforementioned schemes are based on, the area determination module further includes:Parameter detecting
Unit, for detect the network request whether inclusion region handoff parameter;Conversation region determination unit detects institute for working as
When stating network request not comprising region handoff parameter, the initial request region of the affiliated session of the network request is determined as described
Access region;Zone switched determination unit, for when detecting the network request inclusion region handoff parameter, by the area
Handoff parameter specified region in domain is determined as the access region.
In certain embodiments of the present invention, aforementioned schemes are based on, the conversation region determination unit is also used to basis
At least one of initial access domain name, initial cookie and initial positioning information of the affiliated session of network request determine institute
State initial request region.
In certain embodiments of the present invention, aforementioned schemes, the initial request of the affiliated session of network request are based on
Region and target proxy server region are the same area.
In certain embodiments of the present invention, aforementioned schemes are based on, the console of the access region includes multiple controls
Platform node processed;The request forwarding module, which is also used to work as, detects the target proxy server and a console node
When connecting normal, when detecting that the target proxy server connect normal with a console node, by the net
Network request, which is forwarded to, connect the normal console node with the target proxy server, and works as and detect the target
When proxy server and at least two console nodes all connect normal, according to load balancing principle, the network is asked
It asks to be forwarded to and connect the normal one console node with the target proxy server.
In certain embodiments of the present invention, aforementioned schemes are based on, the target proxy server includes major heading generation
Manage server and standby target proxy server, wherein the major heading proxy server is used to take to the standby target proxy
Business device sends state representation information;The standby target proxy server be used for according to the state representation information determine it is described
When major heading proxy server exception, replace the major heading proxy server.
In certain embodiments of the present invention, aforementioned schemes are based on, the area determination module further includes:Alternative area
Determination unit, for the adjacent area of access region described in areal to be determined as the alternative area.
In certain embodiments of the present invention, aforementioned schemes are based on, the alternative area determination unit is also used to work as institute
State the connection of the console of whole region in area belonging to target proxy server and the access region it is all abnormal when, will be adjacent
The main region in area is determined as the alternative area.
In the fourth aspect of embodiment of the present invention, a kind of network request responding device is provided, is applied to network request
The console of processing system, the network request processing system further include Agent layer and data-base cluster;Described device includes:It connects
Module is received, for receiving the network request of the Agent layer forwarding;Identification module, for identification access of the network request out
Region;Processing module, for the network request to be forwarded to the data-base cluster of the access region and/or from the access
The data-base cluster called data in region simultaneously handles the network request.
In certain embodiments of the present invention, aforementioned schemes are based on, the identification module is also used to judge the network
Request corresponding type of interaction;The processing module further includes:Separate responses unit, for corresponding to control when the network request
When platform type of interaction processed, network request described in separate responses;Database response unit, for corresponding to number when the network request
When according to library type of interaction, by the network request be forwarded to the access region of the network request data-base cluster and/or from
The data-base cluster called data of the access region of the network request simultaneously handles the network request.
In certain embodiments of the present invention, aforementioned schemes are based on, the identification module is also used to judge the network
Request corresponding service type;The processing module further includes:Local service unit, for corresponding to this when the network request
When ground services, the network request is forwarded to the data-base cluster of the access region and/or from the number of the access region
According to library cluster called data and handle the network request;Provincialism service unit, for corresponding to ground when the network request
When area's sex service, the network request is forwarded to main region regional belonging to the access region data-base cluster and/or
The data-base cluster called data of regional main region belonging to the access region simultaneously handles the network request;Global service
Unit, for when the network request corresponds to global service, the network request to be forwarded to the database of any region
Cluster and/or from the data-base cluster called data of any region and handle the network request.
In certain embodiments of the present invention, aforementioned schemes are based on, the identification module is also used to detect the network
The region handoff parameter that request includes;The processing module is also used to the region handoff parameter being added to the network request
URL in, and redirect the network request.
In certain embodiments of the present invention, aforementioned schemes are based on, the identification module is also used to ask on the network
The URL asked is matched with default white list;The processing module is also used in successful match, and the region handoff parameter is made nothing
Effect processing.
In certain embodiments of the present invention, aforementioned schemes are based on, the global service unit is also used to when the net
When network request corresponds to global service, the network request is forwarded to local data-base cluster and/or from local data
Library cluster called data simultaneously handles the network request.
In certain embodiments of the present invention, aforementioned schemes are based on, described device further includes:State representation module is used
In periodically sending state representation information to the Agent layer, so that the Agent layer is determined according to the state representation information
Whether the connection with the console is normal.
In the 5th aspect of embodiment of the present invention, a kind of network request processing system is provided, including:Agent layer, packet
The multiple proxy servers for being distributed in multiple regions are included, for determining access region according to the network request that receives, and by institute
State the console that network request is forwarded to access region;Control layer, multiple consoles including being distributed in the multiple region are used
In the network request for receiving the Agent layer forwarding, the network request is forwarded to the data-base cluster of the access region
And/or from the data-base cluster called data of the access region and handle the network request;Data Layer, including it is distributed in institute
Multiple data-base clusters of multiple regions are stated, are supported for providing reading and writing data to the console.
In certain embodiments of the present invention, aforementioned schemes are based on, the Agent layer is also used to ask according to the network
The location information asked specifies a target proxy server in the Agent layer to receive the network request.
In certain embodiments of the present invention, aforementioned schemes are based on, the Agent layer is also used to when the target proxy
When server exception, other proxy servers in the Agent layer is specified to receive the network request.
In the 6th aspect of embodiment of the present invention, a kind of storage medium is provided, computer program is stored thereon with, institute
It states and realizes network request retransmission method described in above-mentioned any one or above-mentioned any one when computer program is executed by processor
Network request response method described in.
In the 7th aspect of embodiment of the present invention, a kind of electronic equipment is provided, including:Processor;And memory,
For storing the executable instruction of the processor;Wherein, the processor is configured to next via the executable instruction is executed
Execute network request response method described in network request retransmission method or above-mentioned any one described in above-mentioned any one.
Network request retransmission method and device, the network request response method and device, net of embodiment according to the present invention
Network demand processing system, storage medium and electronic equipment are forwarded by proxy server and the double-deck of console, make network request
It is formed and is interacted between the data-base cluster of access region, when the console of access region breaks down, can be switched to standby
The console of favored area, to realize the long-distance disaster of console, the wind resistance for improving system is dangerous.And it establishes and passes through
The mechanism of the connection status auto-changeover control platform between proxy server and console is detected, manpower intervention is few, and user is noninductive
Know, ensure that the fluency of system processing network request.
Detailed description of the invention
The following detailed description is read with reference to the accompanying drawings, above-mentioned and other mesh of exemplary embodiment of the invention
, feature and advantage will become prone to understand.In the accompanying drawings, if showing by way of example rather than limitation of the invention
Dry embodiment, wherein:
Fig. 1 schematically shows the example architecture figure of the network request processing system of embodiment according to the present invention;
Fig. 2 schematically shows the flow charts of the network request retransmission method of embodiment according to the present invention;
Fig. 3 schematically shows the sub-process figure of the network request retransmission method of embodiment according to the present invention;
Fig. 4 schematically shows the flow charts of the network request response method of embodiment according to the present invention;
Fig. 5 schematically shows the example architecture figure of the network request processing system of embodiment according to the present invention;
Fig. 6 schematically shows the sub-process figure of the network request response method of embodiment according to the present invention;
Fig. 7 schematically shows the structural block diagram of the network request retransmission unit of embodiment according to the present invention;
Fig. 8 schematically shows the structural block diagram of the network request responding device of embodiment according to the present invention;
Fig. 9 shows the schematic diagram of the storage medium of embodiment according to the present invention;And
Figure 10 diagrammatically illustrates the structural block diagram of the electronic equipment according to invention embodiment.
In the accompanying drawings, identical or corresponding label indicates identical or corresponding part.
Specific embodiment
The principle and spirit of the invention are described below with reference to several illustrative embodiments.It should be appreciated that providing this
A little embodiments are used for the purpose of making those skilled in the art can better understand that realizing the present invention in turn, and be not with any
Mode limits the scope of the invention.On the contrary, thesing embodiments are provided so that the present invention is more thorough and complete, and energy
It enough will fully convey the scope of the invention to those skilled in the art.
One skilled in the art will appreciate that embodiments of the present invention can be implemented as a kind of system, device, equipment, method
Or computer program product.Therefore, the present invention can be with specific implementation is as follows, i.e.,:Complete hardware, complete software
The form that (including firmware, resident software, microcode etc.) or hardware and software combine.
Embodiment according to the present invention provides a kind of network request retransmission method and device, network request response method
And device, network request processing system, storage medium and electronic equipment.
Herein, any number of elements in attached drawing is used to example rather than limitation and any name are only used for
It distinguishes, without any restrictions meaning.
Below with reference to several representative embodiments of the invention, the principle and spirit of the invention are elaborated.
Summary of the invention
The inventors discovered that in existing distributed system high availability scheme, in case of computer room or zonal different
Often, such as computer room fire, regionality power off, backbone network is abnormal etc., and the service that will lead to entire computer room or region is unavailable.Cause
This, the long-distance disaster ability of prior art is poor.
In view of above content, basic thought of the invention is:A kind of network request retransmission method and device, network are provided
Request responding method and device, network request processing system, storage medium and electronic equipment, pass through proxy server and console
The double-deck forwarding, make to be formed between network request and the data-base cluster of access region and interact, when the console hair of access region
When raw failure, it can be switched to the console of alternative area, to realize the long-distance disaster of console, improve the anti-of system
Risk.And establish the machine by the connection status auto-changeover control platform between detection proxy server and console
System, manpower intervention is few, user's unaware, ensure that the fluency of system processing network request.
After introduced the basic principles of the present invention, lower mask body introduces various non-limiting embodiment party of the invention
Formula.
Application scenarios overview
It should be noted which is shown only for the purpose of facilitating an understanding of the spirit and principles of the present invention for following application scenarios, this
The embodiment of invention is unrestricted in this regard.On the contrary, embodiments of the present invention can be applied to it is applicable any
Scene.
Application scenarios:Much the customer service of Web or App is relevant to region, and the data of different zones usually store
In different databases, such as dining room, bank, hospital near user's search etc., console or the usual root of background server
The database that storage user's location message is determined according to the positioning of user, searches corresponding data from the database;In another example
User accesses the news pages in some city, and the news pages in the city are by console or background server from the new of the city
Hear what called data in database generated.In the such network request for receiving user's transmission, can implement through the invention
Method in mode is forwarded or responds to the network request.
Illustrative methods
Example embodiment of the present invention first proposed a kind of network request retransmission method, and Fig. 1 shows to apply and be somebody's turn to do
The exemplary system architecture of method.
Refering to what is shown in Fig. 1, the system 100 may include proxy server 111,121, console 112,122, data base set
Group 113,123, link-local 114,115,124,125, foreign link 116,126,117,127 and reserve link 108.Its
In, proxy server 111,121 is used to receive the network request of user's transmission, corresponding console 112,122 is transferred it to,
Such as can be Nginx server, Apache Server etc..Console 112,122 is for continuing network request to be forwarded to number
It feeds back according to library cluster 113,123, or after transferring corresponding data from data-base cluster 113,123 to user, usually can be industry
Business control centre, front-end server etc..Data-base cluster 113,123 is used to store data, the basic-level support for providing each business etc.,
It usually can be back-end server or database.
System 100 can be divided into multiple regions from transverse direction.In this example embodiment, region refers to storage data base set
The minimal geographical unit of group, the data-base cluster in each region are deposited in same computer room.Such as the data in a city are whole
It is stored in the data-base cluster in a computer room, then region can represent city, if the data storage in a city is in more
In the data-base cluster of a computer room, the data-base cluster of each computer room stores the data in a district, then region can be with Representative Region
County.In each region, the main distinction of console 112,122 and data-base cluster 113,123 is that console 112,122 is integrated
Each business module in region, and the business that data-base cluster 113,123 is console rear end is segmented, such as console can be with
Map in integrated region, call a taxi, the front end of every business module such as service for life is shown, and data-base cluster can be to these
Business module provides the data of rear end respectively or application is supported, each database or server in data-base cluster are responsible for wherein
A business.
Region 1 and region 2 in Fig. 1 are mutually independent geographic area.By taking region 1 as an example, proxy server 111, control
Platform 112 processed can deposit in the computer room in the region where data-base cluster 113, can also deposit in other machines in the region
Room, but the proxy server 111 of the same area, console 112 and data-base cluster 113 should have operational relevance.
System 100 can be divided into multiple response layers from longitudinal direction:First response layer is Agent layer, by multiple proxy servers
111,121 composition;Second response layer is control layer, is made of multiple consoles 112,122;Third response layer is data Layer, by
Multiple data-base clusters 113,123 form.
Based on above description, the network request retransmission method of this example embodiment can be applied to initial in Agent layer
The proxy server (111 or 121) for receiving the network request that user sends, is known as target proxy clothes in this example embodiment
Business device.
It should be appreciated that region shown in FIG. 1, proxy server, console, data-base cluster quantity be only exemplary
, according to actual needs, any number of region can be set, any number of proxy server can be set in each region
With console, data-base cluster can be made of any number of database or server.
Fig. 2 shows a kind of flow charts of network request retransmission method of this example embodiment.Refering to what is shown in Fig. 2, should
Method may comprise steps of:
S21 receives network request, and determines access region according to network request.
In this example embodiment, network request can be any form of request, such as accessing page request, data are write
Enter request, data read request etc., wherein the access domain name of network request, cookie, location information etc. may include access region
The relevant content in domain.Target proxy server does not carry out substantive processing to network request, only identifies access region therein
Domain, to carry out subsequent forwarding.Target proxy server can be the proxy server of access region, be also possible to other regions
Proxy server, by taking system 100 shown in FIG. 1 as an example, when access region is region 1, target proxy server be can be
The proxy server 111 in region 1 is also possible to the proxy server 121 in region 2.
Whether S22, the connection for detecting the console of target proxy server and access region are normal.
Connection normal need meets that console is normal and connecting link is normal simultaneously, wherein there is an exception all companies of will lead to
Connect exception.For example, needing console 112 and link-local 114 normal simultaneously, proxy server 111 and console 112 in Fig. 1
It could normally connect.Detection can be accomplished in several ways, such as can be with the period between target proxy server and console
Property mutual transmission heartbeat message illustrate that connection is abnormal if can not receive the heartbeat message of console;Or target proxy clothes
Business device can send test post to console when detecting, if can not receive feedback in the predetermined time, illustrate that connection is abnormal
Etc., this example embodiment is not specially limited this.
Network request is forwarded to the console of access region when connecting normal by S23.
Network request is forwarded to the console of alternative area when connecting abnormal by S24.
Wherein, access region is different geographic areas from alternative area.By taking Fig. 1 as an example, if the access of network request
Region is region 1, then network request is preferentially forwarded to the console 112 in region 1, when target proxy server and console
When 112 connections are abnormal, network request can be forwarded to the console of alternative area, such as the control in region 2 can be forwarded to
Platform 122, since console 122 is connect with the data-base cluster 113 in region 1 by foreign link 126, console 122 can be incited somebody to action
Network request is normally forwarded to data-base cluster 113, or feeds back after 113 called data of data-base cluster to network request,
That is response results identical with the console of access region may be implemented in the console of alternative area, are not influencing network request just
Often processing.
In the above method, when the console of access region breaks down, it can be switched to the console of alternative area, from
And the long-distance disaster of console is realized, the wind resistance for improving system is dangerous.And establish by detection proxy server with
The mechanism of connection status auto-changeover control platform between console, manpower intervention is few, user's unaware, ensure that system is handled
The fluency of network request.
In certain embodiments of the present invention, if target proxy server and the connection of the console of access region are different
Often, it caused by order to confirm console exception or connecting link exception, can attempt to connect by other proxy servers
The console.Refering to what is shown in Fig. 3, when the connection exception of target proxy server and the console of access region, network request
Retransmission method can also include the following steps:
S31 obtains the connection status of at least one other proxy server and the console of access region in Agent layer.
S32 forwards network request when the connection of other above-mentioned proxy servers and the console of access region is normal
To other proxy servers, make other proxy servers that network request to be forwarded to the console of access region.
S33 is executed when the connection exception of other above-mentioned proxy servers and the console of access region by network request
The step of being forwarded to the console of alternative area.
It is target proxy server with proxy server 111 in Fig. 1, region 1 is illustrated for access region.When agency takes
When business device 111 connect abnormal with console 112, the proxy server 121 of detection zone 2 and the connection status of console 112, such as
Fruit connection is normal, illustrates that link-local 114 is abnormal, can be different by reserve link 108- proxy server 121- by network request
The route of ground link 127 is forwarded to console 112;If connection is abnormal, illustrate that the abnormal probability of console 112 is larger, it can be with
Network request is forwarded to console 122 by foreign link 117.
Certainly, when detecting the connection status of console of other proxy servers and access region, other agency services
The quantity of device can be not limited to one, and link-local 114 and foreign link 127 may be abnormal simultaneously as shown in figure 1 for example, then can be again
The proxy server of detection zone 3 and the connection status of console 112, and pass through the agency service in region 3 when connecting normal
Network request is forwarded to console 112 by device.The quantity for detecting other proxy servers can be usually set in systems, such as
When being set as 3, the connection status of the console of 3 other proxy servers and access region is detected, if all connection is abnormal,
Then judge console exception.
It should be noted that the logic of network request forwarding is preferentially to be forwarded to the control of access region in present embodiment
Platform processed, only when target proxy server all connect exception with the console with other proxy servers of detection, just by net
Network requests the console for being forwarded to alternative area.
In certain embodiments of the present invention, determine that access region can be by following steps reality according to network request
It is existing:Detect network request whether inclusion region handoff parameter;If do not included, by the initial request of the affiliated session of network request
Region is determined as access region;If comprising the region that region handoff parameter is specified is determined as access region.
Wherein, region handoff parameter refers to the order parameter in the active handover access region for including in network request, usually
It is to be generated by the active operation of user, such as user clicks the network request that region handoff options are initiated in the page, user
The network request that region of search keyword is initiated, user click the network that GPS (global positioning system) orient control is initiated
Request etc. can include the handoff parameter of direction specific region.
Network request is usually the single request in session, when network request does not include region handoff parameter, Ke Yiwei
Hold the initial request region of session.In certain embodiments of the present invention, the initial of session can be determined by following steps
Request region:According in the initial access domain name of the affiliated session of network request, initial cookie and initial positioning information at least
A kind of determining initial request region.For example, client request accesses " region1.news.163.com " to establish session, or
When client request establishes session, system reading area from client cookie is region1 or client request is established
When session, the GPS signal or IP address (network protocol landlord) of system detection to client belong to the region region1, are ok
The initial request region of session is determined as region1.
For determining the initial request region of session by cookie, region handoff parameter is not included in network request
When, system can keep strategy using access region, and access region is determined as to the initial request region of session, proxy server
Pseudocode can be as follows:
In network request inclusion region handoff parameter, access region preferentially can be determined according to region handoff parameter.Generation
The pseudocode for managing server can be as follows:
It should be noted that the region that region handoff parameter is specified is usually different from the initial request region of session, but
It can also be identical under some cases.Such as user establishes browsing news page by input domain name " region1.news.163.com "
The session in face, if user initiates access by selection " region2 " option in conversation procedure
The network request of " region2.news.163.com ", then initial request region is region1, the specified area of region handoff parameter
Domain is region2, and the two is different zones;If user clicks positioning control in the page of " region1.news.163.com "
Part is to initiate the network request of the access local news page, and system is located according to the GPS signal of user side client
Region1, then the region that initial request region and region handoff parameter are specified all is region1.
In certain embodiments of the present invention, the initial request region of the affiliated session of network request and target proxy service
Device region can be the same area.Agent layer contains multiple proxy servers, can by the initial request region of session
To determine which proxy server sent by network request.For example, user can input special domain in Web browser
Name logs in Web by the corresponding proxy server of the domain name;Or user requests access to Web, system reads cookie, will ask
Seek the proxy server for being assigned to the history access region recorded in cookie;Or user requests access to Web, system according to
Request is assigned to the proxy server etc. of the IP affiliated area by the IP address at family.
In addition, when connecting abnormal, the net for causing user to issue by client between client and target proxy server
When network request can not reach target proxy server, system can be by dividing again in DNS (domain name system) modification domain name, Agent layer
With etc. modes, network request is connected to the proxy server in other regions, service is made to remain normal.
In certain embodiments of the present invention, the console of access region may include multiple console nodes;Work as mesh
When the connection status of mark proxy server and the console of access region is normal, network request is forwarded to the control of access region
Platform may comprise steps of:When detecting that target proxy server connect normal with a console node, network is asked
It asks to be forwarded to and connect the normal console node with target proxy server;When detecting target proxy server and at least two
When a console node all connects normal, according to load-balancing algorithm, network request is forwarded to and is connected with target proxy server
Connect normal console node.
Disposing multiple console nodes may be implemented High Availabitity in access region, when a console node occur it is different
Often, other console nodes can be rapidly switched to;On the other hand, it is distributed at multiple console nodes by load-balancing algorithm
The efficiency of console processing concurrent tasks can be improved in the task amount for managing network request.
It should be appreciated that above scheme is not limited to access region, multiple console nodes, shape can be disposed in each region
At the console cluster in region, to realize console High Availabitity and the load balancing in each region.
It is similar with console, High Availabitity deployment can be carried out to proxy server.In some embodiment party of the invention
In formula, target proxy server may include major heading proxy server and standby target proxy server, wherein major heading generation
Server is managed to be used to send state representation information to standby target proxy server;Standby target proxy server is used for according to state table
Reference is ceased when determining major heading proxy server exception, replaces major heading proxy server.Wherein, state representation information can
To be the heartbeat message of periodicity sending, it is also possible to the alert message etc. of exception-triggered.In addition to target proxy server, each
Proxy server in region can be carried out active and standby configuration, when master proxy server exception, be immediately switched to standby agency's clothes
Business device, realizes the proxy server High Availabitity in region.
In this example embodiment, Regional Representative stores the minimal geographical unit of data-base cluster, level-one bigger than region
Geographical unit can be area, area is made of several regions, such as when region is city, area can be province, and region is
When district, area can be city.It in certain embodiments of the present invention, can be by access region above-mentioned in areal
Adjacent area is determined as alternative area.Adjacent area can be the nearest region of geographic distance, and forwarding network is asked in areal
Asking has lower cost compared to trans-regional forwarding, and forwarding can further speed up response speed between adjacent area.
Further, a main region can be set up in each area, such as can be by data volume in each area most
Big region is determined as main region, or operation maintenance personnel office region in each area is determined as main region etc..At this
In some embodiments of invention, when the console of detection target proxy server and whole region in area belonging to access region
Connection it is all abnormal when, the main region of adjoining area can be determined as alternative area.Area belonging to usual access region occurs
When regional sexual abnormality, target proxy server all can not may normally be connect with whole consoles in this area, at this time can be with
Trans-regional High Availabitity is realized in trans-regional forwarding.
Example embodiment of the present invention also proposed a kind of network request response method, can be applied to network request processing
The console of system, the network request processing system may include Agent layer, console and data-base cluster.With reference to above-mentioned Fig. 1
Shown, network request processing system can be the system 100 in figure, and the method for this example embodiment can be applied to console
112,122.Wherein, network request response refers to processing or feedback to network request, in this example embodiment, according to network
The concrete form of request, console can choose the specific response mode of following two:Be forwarded to rear end data-base cluster or
It is post-processed from data-base cluster called data.As it can be seen that the function of console and proxy server has significant difference, agency service
Device is only capable of being forwarded network request and can not carrying out substantive processing, and console can both turn network request
Hair can also carry out substantive processing.
Refering to what is shown in Fig. 4, the method for this example embodiment may comprise steps of:
S41, the network request of Receiving Agent layer forwarding.
S42 identifies the access region of network request.
Wherein, console can be the console of the access region, be also possible to the console in other regions, such as can be with
It is the console etc. of the alternative area of access region.
Network request is forwarded to the data-base cluster of access region and/or from the data-base cluster tune of access region by S43
Access evidence simultaneously handles network request.
As shown in Figure 1, connection is formed between the console 112,122 of different zones and data-base cluster 113,123, it can be with
Realize the forwarding or called data post-processing in step S42.Forwarding usually occurs when network request is data write request, or
When person's network request needs to interact with the data-base cluster of console rear end or server etc.;Called data post-processing usually occurs
Network request be reading data or searching request when, such as network request be searching request when, console can be according to search
Keyword related data is searched in data-base cluster, specific UI (user interface) form is converted into after transferring and is gone forward side by side
Row processing.
In certain embodiments of the present invention, console can also independent of data-base cluster and to network request into
Row separate responses.The network request response method can also include:
Before the access region of identification network request, the corresponding type of interaction of network request is judged.
If network request corresponds to console type of interaction, separate responses network request.
Wherein, the network request of console type of interaction is the above-mentioned net that can be responded independent of data-base cluster
Network request, such as when request browsing pages, the page may be cached in console, then console can be with the independent process request.
On the other side is the network request of database type of interaction.
If network request corresponding to database type of interaction, executes the step of access region for identifying network request
S42 and subsequent step S43.
Refering to what is shown in Fig. 5, following three types can be classified as according to the area attribute of data-base cluster:
Local service, usually local proprietary business or data, the local service Dynamic data exchange in each region are disposed, no
It can not be shared between region, to mitigate data backup amount.
Regional sex service, usually area in share business or data, area in each region regional sex service number
According to that can share completely, it can also all be stored into the data-base cluster of regional main region, and carry out certain backup, may be used also
It is stored respectively with the data-base cluster by each region, and in regional main region centralized backup;Situation as shown in Figure 5, region 1
For regional main region, the provincialism service data in this area is all stored in the data-base cluster in region 1, and in other regions
It is backed up.
Global service, entire business towards global scope in share business or data, can with as shown in figure 5,
Data interchange is formed between all regions, can also be formed and be backed up in the main region in each area.
Based on data-base cluster framework shown in fig. 5, in certain embodiments of the present invention, refering to what is shown in Fig. 6, by net
Network request is forwarded to the data-base cluster of access region and/or from the data-base cluster called data of access region and handles network
Request may comprise steps of:
S61 judges the corresponding service type of network request.
Network request is forwarded to the data-base cluster of access region when network request corresponds to local service by S62
And/or from the data-base cluster called data of access region and handle network request.
Network request is forwarded to master regional belonging to access region when network request corresponds to regional sex service by S63
The data-base cluster in region and/or the data-base cluster called data of regional main region belonging to the access region simultaneously handle network
Request.
Network request is forwarded to the data-base cluster of any region when network request corresponds to global service by S64
And/or from the data-base cluster called data of any region and handle network request.
Network request is classified and forwarded by classification policy corresponding with data-base cluster, is conducive to patrol in business
Shunting in the level of collecting in realization system, reduces the data backup amount of system.
It in certain embodiments of the present invention, can be by following for the network request of inclusion region handoff parameter
Step process:When detecting network request inclusion region handoff parameter, region handoff parameter is added to the URL of network request
In, and redirecting network is requested.
When network request is that domain name access is requested, the domain-name information inputted in network request can be converted to URL;Work as net
When network request is request caused by other types operation, console can be generated according to the service type of network request on backstage
Corresponding URL.Region handoff parameter is added to the confirmation for being conducive to region switching in URL.
The main purpose of redirecting network request is to realize region handover operation, such as user is in the control panel of client
When the page carries out the operation of browsing pages region switching, client sends inclusion region switching ginseng to background system after the completion of operation
Several network requests can request the element in the page after making to refresh to refresh browsing pages by redirecting network at this time
Become the element of target area, to complete region switching.
Further, there may be conflict between the region handoff parameter of network request and service area logic, wherein industry
Business area logic refers to the logic that region is determined by the service type of network request and service feature etc..Such as network request is visited
It asks the data-base cluster of specific region, network request is switched to other regions in the process and is then unable to complete the business.It lifts
For example, in the object storage service of a certain cloud storage service, East China, North China are different areas, when the use of East China
When family logs in object storage system and accesses personal data, if the user also requests the page for being switched to North China, by
Data-base cluster in North China can not transfer the object storing data of the user, and console can be determined that region handoff parameter
It is logically present and conflicts with service area.In view of the situation, in certain embodiments of the present invention, network request response method
It can also include the following steps:The URL of network request is matched with default white list;When successful match, region is switched and is joined
Number makees invalidation.
In URL can simultaneously inclusion region switching and the relevant information of business, default white list refer to count this two
The case where the case where category information conflicts is single in detail, and conflict has occurred in successful match explanation, can be sentenced according to service area logic
It is fixed, and region handoff parameter is made into invalidation.Such as in above-mentioned example, the page that user's request is switched to North China is generated
The region handoff parameter can be made invalidation by the region handoff parameter of network request, still maintain access East China.It lifts
For example, the pseudocode that console handles URL can be as follows:
It should be noted that special default white list can be configured for each console, it can also be in whole system
It is unified in control layer to configure default white list, each console can also be made in the default of unification in such a way that two kinds combine
On the basis of white list, white list is preset to this according to the demand of one's respective area and is augmented.
Obtain network request URL after, console can according to URL matching logic by network request transparent forwarding to have
The data-base cluster or back-end services of body, pseudocode can be as follows:
So as to realize the decoupling of network request and back-end services, the flexibility of Strengthens network request forwarding.
When the data of global service are shared between all areas, network request can be forwarded to the data of any region
Library cluster from the database called data of any region and is fed back.In certain embodiments of the present invention, for the ease of number
According to read-write, and shorten the response time of network request, when network request corresponds to global service, network request can be turned
It is sent to local data-base cluster and/or from local data-base cluster called data and handles network request.Wherein, it is locally
Refer to the region where console.
In certain embodiments of the present invention, for the connection status of real-time inspection and control platform and Agent layer, console
State representation information periodically can also be sent to Agent layer, so that Agent layer is determined and controlled according to the state representation information
Whether the connection of platform is normal.Specifically, state representation information can be sent from console to the proxy server in same region,
Specific one or several proxy servers can be sent by the state representation information of all consoles, be convenient for Centralizing inspection,
The state representation information of the console in the areal region Nei Ge can also be sent to the proxy server of this area's main region
Etc., this example embodiment is not specially limited this.
Exemplary means
In the network request retransmission method for describing exemplary embodiment of the invention, after network request response method,
Next, with reference to Fig. 7 and Fig. 8 to the network request retransmission unit and network request responding device of exemplary embodiment of the invention
It is illustrated.
The network request retransmission unit of exemplary embodiment of the invention can be applied to include multiple proxy servers
A target proxy server in Agent layer, refering to what is shown in Fig. 7, the network request retransmission unit 700 may include:Region determines
Module 710, connecting detection module 720 and request forwarding module 730.Specifically, area determination module 710 is for receiving network
Request, and access region is determined according to network request;Connecting detection module 720 is for detecting target proxy server and access region
Whether the connection of the console in domain is normal;Forwarding module 730 is requested to be used to that network request to be forwarded to access when connecting normal
The console in region, and when connecting abnormal, network request is forwarded to the console of alternative area;Wherein, access region
It is different geographic areas from alternative area.
In certain embodiments of the present invention, aforementioned schemes are based on, connecting detection module can be also used for when target generation
When managing the connection exception of the console of server and access region, obtains at least one other proxy server in Agent layer and visit
Ask the connection status of the console in region;Request forwarding module can be also used for the control when target proxy server and access region
The connection of platform processed is abnormal, and when the connection of other proxy servers and the console of access region is normal, and network request is turned
Other proxy servers are sent to, make other proxy servers that network request to be forwarded to the console of access region, and work as mesh
The connection for marking the console of proxy server and access region is abnormal, and other proxy servers and the console of access region
When connection is also abnormal, network request is forwarded to the console of alternative area.
In certain embodiments of the present invention, aforementioned schemes are based on, refering to what is shown in Fig. 7, area determination module 710 may be used also
To include:Parameter detecting unit 711, for detect network request whether inclusion region handoff parameter;Conversation region determination unit
712, for when detect network request do not include region handoff parameter when, by the initial request region of the affiliated session of network request
It is determined as access region;Zone switched determination unit 713, for inciting somebody to action when detecting network request inclusion region handoff parameter
Handoff parameter specified region in region is determined as access region.
In certain embodiments of the present invention, aforementioned schemes are based on, conversation region determination unit can be also used for basis
The determination of at least one of initial access domain name, initial cookie and initial positioning information of the affiliated session of network request is initially asked
Ask region.
In certain embodiments of the present invention, aforementioned schemes, the initial request region of the affiliated session of network request are based on
It can be the same area with target proxy server region.
In certain embodiments of the present invention, aforementioned schemes are based on, the console of access region may include multiple controls
Platform node processed;Request forwarding module, which can be also used for working as, detects that target proxy server is connect normally with a console node
When, network request is forwarded to and connect the normal console node with target proxy server, and works as and detects target generation
Reason server and at least two console nodes are when all connecting normal, according to load balancing principle, by network request be forwarded to
Target proxy server connects normal console node.
In certain embodiments of the present invention, aforementioned schemes are based on, target proxy server may include major heading generation
Manage server and standby target proxy server, wherein major heading proxy server can be used for standby target proxy server
Send state representation information;Standby target proxy server can be used for determining major heading agency's clothes according to state representation information
When device exception of being engaged in, replace major heading proxy server.
In certain embodiments of the present invention, aforementioned schemes are based on, refering to what is shown in Fig. 7, area determination module 710 may be used also
To include:Alternative area determination unit 714, for the adjacent area of access region in areal to be determined as alternative area.
In certain embodiments of the present invention, aforementioned schemes are based on, alternative area determination unit can be also used for working as mesh
When the connection of the console of whole region is all abnormal in area belonging to mark proxy server and access region, by the master of adjoining area
Region is determined as alternative area.
The network request responding device of embodiment of the present invention can be applied to the console of network request processing system, should
Network request processing system can also include Agent layer and data-base cluster.Refering to what is shown in Fig. 8, the device 800 may include:It connects
Receive module 810, identification module 820 and processing module 830.Wherein, receiving module 810 is used for the network of Receiving Agent layer forwarding
Request;Identification module 820 goes out the access region of network request for identification;Processing module 830 is for network request to be forwarded to
The data-base cluster of access region and/or from the data-base cluster called data of access region and handle network request.
In certain embodiments of the present invention, aforementioned schemes are based on, identification module can be also used for judging network request
Corresponding type of interaction;Processing module can also include:Separate responses unit, for when network request is corresponding to console interaction
When type, separate responses network request;Database response unit is used for when network request corresponds to database type of interaction,
Network request is forwarded to the data-base cluster of the access region of network request and/or the data of the access region from network request
Library cluster called data simultaneously handles network request.
In certain embodiments of the present invention, aforementioned schemes are based on, identification module can be also used for judging network request
Corresponding service type;Refering to what is shown in Fig. 8, processing module 830 can also include:Local service unit 831, for being asked when network
It asks when corresponding to local service, network request is forwarded to the data-base cluster of access region and/or from the data of access region
Library cluster called data simultaneously handles network request;Provincialism service unit 832, for corresponding to regional sex service when network request
When, network request is forwarded to the data-base cluster of main region regional belonging to access region and/or from access region institute possession
The data-base cluster called data of the main region in area simultaneously handles network request;Global service unit 833, for working as network request pair
Network request should be forwarded to the data-base cluster of any region and/or from the data base set of any region when global service
Group's called data simultaneously handles network request.
In certain embodiments of the present invention, aforementioned schemes are based on, identification module can be also used for detection network request
The region handoff parameter for including;Processing module can be also used for for region handoff parameter being added in the URL of network request, lay equal stress on
Oriented network request.
In certain embodiments of the present invention, aforementioned schemes are based on, identification module can be also used for network request
URL is matched with default white list;Processing module can be also used in successful match, and region handoff parameter is made invalidation.
In certain embodiments of the present invention, aforementioned schemes are based on, global service unit can be also used for asking when network
It asks when corresponding to global service, network request is forwarded to local data-base cluster and/or from local data-base cluster tune
Access evidence simultaneously handles network request.
In certain embodiments of the present invention, aforementioned schemes are based on, refering to what is shown in Fig. 8, the device 800 can also wrap
It includes:State representation module 840, for periodically sending state representation information to Agent layer, so that Agent layer is according to the state
Whether characterization information determination is normal with the connection of console.
Exemplary system
In network request retransmission method and device, the network request response method for describing exemplary embodiment of the invention
And after device, next, being illustrated with reference to network request processing system of the Fig. 1 to exemplary embodiment of the invention.
Refering to what is shown in Fig. 1, the network request processing system 100 of example embodiment of the present invention may include generation from longitudinal direction
Manage layer, control layer and data Layer.Wherein, Agent layer may include the multiple proxy servers 111,121 for being distributed in multiple regions,
For determining the access region of network request according to the network request that receives, and network request is forwarded to the control of access region
Platform processed;Control layer may include the multiple consoles 112,122 for being distributed in multiple regions, the network for the forwarding of Receiving Agent layer
Network request is forwarded to the data-base cluster of access region and/or from the data-base cluster called data of access region by request
And handle network request;Data Layer may include the multiple data-base clusters 113,123 for being distributed in multiple regions, be used for control
Platform provides reading and writing data and supports.
In certain embodiments of the present invention, aforementioned schemes are based on, Agent layer can be also used for according to network request
Location information, authorized agency layer in a target proxy server receive network request.Wherein, the location information of network request can be with
It is the access domain name of network request, cookie, IP address etc..Special routing node can be set in Agent layer, by net
Network request is assigned to corresponding proxy server, and can also making each proxy server of Agent layer, there are specific domains in DNS
Name mapping, to receive the network request of corresponding domain name, this example embodiment is for being specifically designated inside Agent layer and distributes
Mode is not specially limited.
In certain embodiments of the present invention, aforementioned schemes are based on, Agent layer can be also used for when target proxy service
When device exception, other proxy servers receive network request in authorized agency's layer.Other proxy server, that is, target proxies
The alternative of server, it is specified to follow certain logic, such as the proxy server of alternative area can be specified
For other proxy servers, the determination method of alternative area can request the invention embodiment portion of retransmission method with grid of reference
The description divided.
In addition, other details of embodiment of the present invention are in above-mentioned network request retransmission method invention embodiment
It has been be described in detail that, details are not described herein.
Exemplary storage medium
Describe exemplary embodiment of the invention retransmission method and device, network request response method and device,
After network request processing system, next, being illustrated with reference to storage medium of the Fig. 9 to exemplary embodiment of the invention.
Refering to what is shown in Fig. 9, describing the program product for realizing the above method of embodiment according to the present invention
900, can using portable compact disc read only memory (CD-ROM) and including program code, and can in equipment, such as
It is run on PC.However, program product of the invention is without being limited thereto, in this document, readable storage medium storing program for executing, which can be, appoints
What include or the tangible medium of storage program that the program can be commanded execution system, device or device use or and its
It is used in combination.
The program product can be using any combination of one or more readable mediums.Readable medium can be readable signal
Medium or readable storage medium storing program for executing.Readable storage medium storing program for executing for example can be but be not limited to electricity, magnetic, optical, electromagnetic, infrared ray or half
System, device or the device of conductor, or any above combination.The more specific example of readable storage medium storing program for executing is (non exhaustive
List) include:Electrical connection, portable disc, hard disk, random access memory (RAM) with one or more conducting wires read-only are deposited
Reservoir (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read only memory (CD-
ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
In carry readable program code.The data-signal of this propagation can take various forms, including but not limited to electromagnetic signal,
Optical signal or above-mentioned any appropriate combination.Readable signal medium can also be any readable Jie other than readable storage medium storing program for executing
Matter, the readable medium can send, propagate or transmit for by instruction execution system, device or device use or and its
The program of combined use.
The program code for including on readable medium can transmit with any suitable medium, including but not limited to wirelessly, have
Line, optical cable, RF etc. or above-mentioned any appropriate combination.
The program for executing operation of the present invention can be write with any combination of one or more programming languages
Code, programming language include object oriented program language-Java, C++ etc., further include conventional process type
Programming language-such as " C " language or similar programming language.Program code can be fully in user calculating equipment
It is upper execute, part on the user computing device part execute on a remote computing or completely in remote computing device or
It is executed on server.In the situation for being related to remote computing device, remote computing device can be wrapped by the network of any kind
Local area network (LAN) or wide area network (WAN) are included, user calculating equipment is connected to, or, it may be connected to external computing device (example
It is such as connected using ISP by internet).
Example electronic device
After describing the storage medium of exemplary embodiment of the invention, next, showing with reference to Figure 10 the present invention
The electronic equipment of example property embodiment is illustrated.
The electronic equipment 1000 that Figure 10 is shown is only an example, function to the embodiment of the present invention and should not use model
Shroud carrys out any restrictions.
As shown in Figure 10, electronic equipment 1000 is showed in the form of universal computing device.The component of electronic equipment 1000 can
To include but is not limited to:At least one above-mentioned processing unit 1010, connects not homologous ray at least one above-mentioned storage unit 1020
The bus 1030 of component (including storage unit 1020 and processing unit 1010), display unit 1040.
Wherein, storage unit is stored with program code, and program code can be executed with unit 1010 processed, so that processing is single
Member 1010 executes described in this specification above-mentioned " illustrative methods " part various illustrative embodiments according to the present invention
Step.For example, processing unit 1010 can execute such as
Step S21 shown in Fig. 2 can execute step as shown in Figure 3 to step S24 or processing unit 1010
S31 to step S33 etc..
Storage unit 1020 may include volatile memory cell, for example, Random Access Storage Unit (RAM) 1021 and/or
Cache memory unit 1022 can further include read-only memory unit (ROM) 1023.
Storage unit 1020 can also include program/utility with one group of (at least one) program module 1025
1024, such program module 1025 includes but is not limited to:Operating system, one or more application program, other program moulds
It may include the realization of network environment in block and program data, each of these examples or certain combination.
Bus 1030 may include data/address bus, address bus and control bus.
Electronic equipment 1000 can also be with one or more external equipments 1100 (such as keyboard, sensing equipment, bluetooth equipment
Deng) communicate, this communication can be carried out by input/output (I/O) interface 1050.Electronic equipment 1000 further includes display unit
1040, it is connected to input/output (I/O) interface 1050, for being shown.Also, electronic equipment 1000 can also pass through
Network adapter 1060 and one or more network (such as local area network (LAN), wide area network (WAN) and/or public network, example
Such as internet) communication.As shown, network adapter 1060 is logical by bus 1030 and other modules of electronic equipment 1000
Letter.It should be understood that although not shown in the drawings, can in conjunction with electronic equipment 1000 use other hardware and/or software module, including
But it is not limited to:Microcode, device driver, redundant processing unit, external disk drive array, RAID system, tape drive
And data backup storage system etc..
It should be noted that although being referred to several moulds of audio playing apparatus and audio sharing apparatus in the above detailed description
Block or submodule, but it is this division be only exemplary it is not enforceable.In fact, embodiment party according to the present invention
The feature and function of formula, two or more above-described units/modules can embody in a units/modules.Conversely,
The feature and function of an above-described units/modules can be to be embodied by multiple units/modules with further division.
In addition, although describing the operation of the method for the present invention in the accompanying drawings with particular order, this do not require that or
Hint must execute these operations in this particular order, or have to carry out shown in whole operation be just able to achieve it is desired
As a result.Additionally or alternatively, it is convenient to omit multiple steps are merged into a step and executed by certain steps, and/or by one
Step is decomposed into execution of multiple steps.
Although detailed description of the preferred embodimentsthe spirit and principles of the present invention are described by reference to several, it should be appreciated that, this
It is not limited to the specific embodiments disclosed for invention, does not also mean that the feature in these aspects cannot to the division of various aspects
Combination is benefited to carry out, this to divide the convenience merely to statement.The present invention is directed to cover appended claims spirit and
Included various modifications and equivalent arrangements in range.
Claims (10)
1. a kind of network request retransmission method, which is characterized in that applied to one in the Agent layer including multiple proxy servers
Target proxy server, the method includes:
Network request is received, and access region is determined according to the network request;
Whether the connection for detecting the target proxy server and the console of the access region is normal;
When the connection is normal, the network request is forwarded to the console of the access region;
When the connection is abnormal, the network request is forwarded to the console of alternative area;
Wherein, the access region is different geographic areas from the alternative area.
2. the method according to claim 1, wherein when the target proxy server and the access region
When the connection exception of console, the method also includes:
Obtain the connection status of at least one other proxy server and the console of the access region in the Agent layer;
When the connection of other described proxy servers and the console of the access region is normal, the network request is forwarded
To other described proxy servers, make other described proxy servers that the network request to be forwarded to the control of the access region
Platform processed;
When the connection exception of other described proxy servers and the console of the access region, execute the network request
The step of being forwarded to the console of the alternative area.
3. the method according to claim 1, wherein determining that access region includes according to the network request:
Detect the network request whether inclusion region handoff parameter;
If do not included, the initial request region of the affiliated session of the network request is determined as the access region;
If comprising the region that the region handoff parameter is specified is determined as the access region.
4. according to the method described in claim 3, it is characterized in that, further including:
According at least one in the initial access domain name of the affiliated session of the network request, initial cookie and initial positioning information
Kind determines the initial request region.
5. a kind of network request response method, the console applied to network request processing system, which is characterized in that the network
Demand processing system further includes Agent layer and data-base cluster;The method includes:
Receive the network request of the Agent layer forwarding;
Identify the access region of the network request;
The network request is forwarded to the data-base cluster of the access region and/or from the data base set of the access region
Group's called data simultaneously handles the network request.
6. a kind of network request retransmission unit, which is characterized in that applied to one in the Agent layer including multiple proxy servers
Target proxy server, described device include:
Area determination module determines access region for receiving network request, and according to the network request;
Connecting detection module, for detect the target proxy server and the access region console connection whether just
Often;
Forwarding module is requested, for when the connection is normal, the network request to be forwarded to the control of the access region
Platform, and when the connection is abnormal, the network request is forwarded to the console of alternative area;
Wherein, the access region is different geographic areas from the alternative area.
7. a kind of network request responding device, the console applied to network request processing system, which is characterized in that the network
Demand processing system further includes Agent layer and data-base cluster;Described device includes:
Receiving module, for receiving the network request of the Agent layer forwarding;
Identification module, for identification access region of the network request out;
Processing module, for the network request to be forwarded to the data-base cluster of the access region and/or from the access
The data-base cluster called data in region simultaneously handles the network request.
8. a kind of network request processing system, which is characterized in that including:
Agent layer, multiple proxy servers including being distributed in multiple regions are visited for being determined according to the network request received
It asks region, and the network request is forwarded to the console of the access region;
Control layer, multiple consoles including being distributed in the multiple region, the network for receiving the Agent layer forwarding are asked
It asks, the network request is forwarded to the data-base cluster of the access region and/or from the data base set of the access region
Group's called data simultaneously handles the network request;
Data Layer, multiple data-base clusters including being distributed in the multiple region are read for providing data to the console
Write support.
9. a kind of storage medium, is stored thereon with computer program, which is characterized in that the computer program is executed by processor
The response of network request described in Shi Shixian network request retransmission method according to any one of claims 1 to 4 or claim 5
Method.
10. a kind of electronic equipment, which is characterized in that including:
Processor;And
Memory, for storing the executable instruction of the processor;
Wherein, the processor is configured to come described in any one of perform claim requirement 1~4 via the execution executable instruction
Network request retransmission method or claim 5 described in network request response method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810671156.0A CN108900598B (en) | 2018-06-26 | 2018-06-26 | Network request forwarding and responding method, device, system, medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810671156.0A CN108900598B (en) | 2018-06-26 | 2018-06-26 | Network request forwarding and responding method, device, system, medium and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108900598A true CN108900598A (en) | 2018-11-27 |
CN108900598B CN108900598B (en) | 2021-06-11 |
Family
ID=64346318
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810671156.0A Active CN108900598B (en) | 2018-06-26 | 2018-06-26 | Network request forwarding and responding method, device, system, medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108900598B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110324205A (en) * | 2019-07-05 | 2019-10-11 | 视联动力信息技术股份有限公司 | A kind of monitor method, monitoring device, electronic equipment and storage medium |
CN111698197A (en) * | 2020-02-26 | 2020-09-22 | 中国银联股份有限公司 | Method, system, service system and storage medium for collecting information of named Web applications |
CN111741077A (en) * | 2020-05-29 | 2020-10-02 | 北京百度网讯科技有限公司 | Network service scheduling method and device, electronic equipment and storage medium |
CN113708992A (en) * | 2021-08-13 | 2021-11-26 | 绿盟科技集团股份有限公司 | Reverse proxy test method, device, electronic equipment and storage medium |
CN114760233A (en) * | 2022-03-22 | 2022-07-15 | 中国工商银行股份有限公司 | Service processing method and device, electronic equipment and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103458372A (en) * | 2012-05-29 | 2013-12-18 | 中兴通讯股份有限公司 | Method and device for processing cluster calling |
CN103973819A (en) * | 2013-01-25 | 2014-08-06 | 搜房媒体技术(北京)有限公司 | Method, related device and system for responding to request for community domain name |
CN105515799A (en) * | 2014-09-25 | 2016-04-20 | 上海嘉速网络科技发展有限公司 | Method and system for realizing network meeting drift |
CN105959413A (en) * | 2016-06-30 | 2016-09-21 | 上海智臻智能网络科技股份有限公司 | Network proxy method and system |
CN106209411A (en) * | 2015-05-08 | 2016-12-07 | 阿里巴巴集团控股有限公司 | Distributed network system (DNS) fault-tolerance approach, device and fault tolerant type distributed network system (DNS) |
CN107809450A (en) * | 2017-07-09 | 2018-03-16 | 孝感市青谷信息科技有限公司 | A kind of system for realizing offlineization DNS service |
CN108123963A (en) * | 2018-01-19 | 2018-06-05 | 深圳市易仓科技有限公司 | The API auxiliary systems and processing method of a kind of cross-border electric business |
-
2018
- 2018-06-26 CN CN201810671156.0A patent/CN108900598B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103458372A (en) * | 2012-05-29 | 2013-12-18 | 中兴通讯股份有限公司 | Method and device for processing cluster calling |
CN103973819A (en) * | 2013-01-25 | 2014-08-06 | 搜房媒体技术(北京)有限公司 | Method, related device and system for responding to request for community domain name |
CN105515799A (en) * | 2014-09-25 | 2016-04-20 | 上海嘉速网络科技发展有限公司 | Method and system for realizing network meeting drift |
CN106209411A (en) * | 2015-05-08 | 2016-12-07 | 阿里巴巴集团控股有限公司 | Distributed network system (DNS) fault-tolerance approach, device and fault tolerant type distributed network system (DNS) |
CN105959413A (en) * | 2016-06-30 | 2016-09-21 | 上海智臻智能网络科技股份有限公司 | Network proxy method and system |
CN107809450A (en) * | 2017-07-09 | 2018-03-16 | 孝感市青谷信息科技有限公司 | A kind of system for realizing offlineization DNS service |
CN108123963A (en) * | 2018-01-19 | 2018-06-05 | 深圳市易仓科技有限公司 | The API auxiliary systems and processing method of a kind of cross-border electric business |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110324205A (en) * | 2019-07-05 | 2019-10-11 | 视联动力信息技术股份有限公司 | A kind of monitor method, monitoring device, electronic equipment and storage medium |
CN111698197A (en) * | 2020-02-26 | 2020-09-22 | 中国银联股份有限公司 | Method, system, service system and storage medium for collecting information of named Web applications |
CN111741077A (en) * | 2020-05-29 | 2020-10-02 | 北京百度网讯科技有限公司 | Network service scheduling method and device, electronic equipment and storage medium |
CN113708992A (en) * | 2021-08-13 | 2021-11-26 | 绿盟科技集团股份有限公司 | Reverse proxy test method, device, electronic equipment and storage medium |
CN114760233A (en) * | 2022-03-22 | 2022-07-15 | 中国工商银行股份有限公司 | Service processing method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN108900598B (en) | 2021-06-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108900598A (en) | Network request forwarding and response method, device, system, medium and electronic equipment | |
US11683263B1 (en) | Preferential loading in data centers | |
US10791181B1 (en) | Method and apparatus for web based storage on-demand distribution | |
CN104823170B (en) | Distributed caching cluster management | |
US11734611B2 (en) | Artificial intelligence delivery edge network | |
US7783763B2 (en) | Managing stateful data in a partitioned application server environment | |
CN103608796B (en) | Large-scale storage systems | |
CN108027805B (en) | Load distribution in a data network | |
CN100544342C (en) | Storage system | |
WO2018094909A1 (en) | Node connection method and distributed computing system | |
CN104811392B (en) | For handling the method and system of the resource access request in network | |
JP2003030012A (en) | Demand adaptive storage system in global san environment and method therefor | |
US20120250697A1 (en) | Inter-cluster communications technique for event and health status communications | |
CN106933548A (en) | Global information is obtained, processes and updated, methods, devices and systems | |
US20140122918A1 (en) | Method and Apparatus For Web Based Storage On Demand | |
CN110113188A (en) | Across subdomain communication O&M method, total O&M server and medium | |
CN111966482A (en) | Edge computing system | |
CN105681413A (en) | Method and device for cooperative processing of data between CDN (Content Delivery Network) and ISP (Internet Service Provider) | |
CN110012111B (en) | Data service cluster system and data processing method | |
CN108737527A (en) | One kind being suitable for platform large-scale consumer access method and system | |
CN105791370A (en) | Data processing method and related server | |
US20230412471A1 (en) | Edge-based artificial intelligence enablement | |
WO2019200751A1 (en) | Host and backup computer switching method, apparatus, computing device and storage medium | |
CN117632374A (en) | Container mirror image reading method, medium, device and computing equipment | |
CN106534234A (en) | Relationship chain processing system, method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder | ||
CP01 | Change in the name or title of a patent holder |
Address after: 310052 Room 301, Building No. 599, Changhe Street Network Business Road, Binjiang District, Hangzhou City, Zhejiang Province Patentee after: Hangzhou NetEase Shuzhifan Technology Co.,Ltd. Address before: 310052 Room 301, Building No. 599, Changhe Street Network Business Road, Binjiang District, Hangzhou City, Zhejiang Province Patentee before: HANGZHOU LANGHE TECHNOLOGY Ltd. |