CN108040085A - Method for network access, device and server - Google Patents

Method for network access, device and server Download PDF

Info

Publication number
CN108040085A
CN108040085A CN201711157742.5A CN201711157742A CN108040085A CN 108040085 A CN108040085 A CN 108040085A CN 201711157742 A CN201711157742 A CN 201711157742A CN 108040085 A CN108040085 A CN 108040085A
Authority
CN
China
Prior art keywords
server
application
cdn
domain name
domain names
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201711157742.5A
Other languages
Chinese (zh)
Inventor
韩方
王辉
刘湛卢
黄�俊
赵丁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Huaduo Network Technology Co Ltd
Original Assignee
Guangzhou Huaduo Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Huaduo Network Technology Co Ltd filed Critical Guangzhou Huaduo Network Technology Co Ltd
Priority to CN201711157742.5A priority Critical patent/CN108040085A/en
Publication of CN108040085A publication Critical patent/CN108040085A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1023Server selection for load balancing based on a hash applied to IP addresses or costs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4552Lookup mechanisms between a plurality of directories; Synchronisation of directories, e.g. metadirectories
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/58Caching of addresses or names
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/59Network arrangements, protocols or services for addressing or naming using proxies for addressing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • H04L67/5682Policies or rules for updating, deleting or replacing the stored data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/69Types of network addresses using geographic information, e.g. room number

Abstract

The present invention relates to Internet technical field, and specifically, the present invention discloses a kind of method for network access, device and server, the described method includes:GSLB servers receive the domain name mapping request of application;If the domain name of domain name analysis request is directed toward CDN domain names, the CDN domain names are searched in local cache;When the CDN domain names in local cache there are corresponding server ip, the server ip is returned into application, so as to be connected to corresponding server using according to the server ip;When corresponding server ip is not present in the CDN domain names in local cache, to CDN domain names described in CDN HTTPDNS cluster request analysis, and the server ip after parsing is returned into application, so as to be connected to corresponding server using according to the server ip.The present invention realizes CDN proxy resolutions, acceleration in GSLB server sides, merges multiple analysis request once, optimal access IP, reduction domain name mapping time delay and network transfer delay as short as possible to be provided for application.

Description

Method for network access, device and server
Technical field
The present invention relates to Internet technical field, and specifically, the present invention discloses a kind of method for network access, device and clothes Business device.
Background technology
With the development of Internet technology, in recent years, all kinds of internet products bring a lot to work, the life of people Facility and amusement, and internet product be unable to do without network mostly, and user experience is extremely important, and user is wished using interconnection There can be response feedback faster during net product, that is, wish that The faster the better for network insertion speed, thus how allow terminal applies Faster, it is the problem of putting urgent need to resolve at present at utmost to reduce network delay to network access request more, using not only needing to visit Ask the background server of oneself, it is also necessary to access CDN server, and consider for commercial affairs, the CDN producers of application developers cooperation More families are generally had, and since the situation that single CDN producers break down in regional area has certain probability, in order to ensure Service experience, another CDN is accessed using the trial after a CDN failure is also required to, and how quick terminal applies are, simple More CDN are accessed, on the premise of quick access is ensured, avoid the influence that CDN is replaced and list CDN possible breakdowns carry out service band from being The problem of urgent need to resolve.
The content of the invention
The primary and foremost purpose of the present invention is to provide a kind of method for network access and device, for providing optimal access for application IP, reduces domain name mapping time delay and realizes network transfer delay as short as possible.
Another object of the present invention is to provide a kind of server for realizing above-mentioned method for network access.
In order to realize the purpose, the present invention adopts the following technical scheme that:
In a first aspect, the present invention provides a kind of method for network access, including:
GSLB servers receive the domain name mapping request of application;
If the domain name of domain name analysis request is directed toward CDN domain names, the CDN domain names are searched in local cache;
When the CDN domain names in local cache there are corresponding server ip, the server ip is returned into application, So as to it is connected to corresponding server using according to the server ip;
When corresponding server ip is not present in the CDN domain names in local cache, please be solve to CDNHTTPDNS clusters Domain name is analysed, and the server ip after parsing is returned into application, so as to be connected to correspondence using according to the server ip Server.
Further, the core domain name for obtaining application, corresponds to core domain name described in GSLB server request analysis Application server IP, save as application server IP caching after, further include:
According to the corresponding application server of core domain name described in the ttl value to GSLB server request analysis of each core domain name IP, to update application server IP cachings.
Further, if the domain name of the domain name analysis request is directed toward CDN domain names, in local cache described in lookup CDN domain names, including:
The outlet for obtaining application accesses the ISP of IP and using the geography information reported;
The corresponding server ip of CDN domain names is searched in local cache according to domain name, ISP and geography information.
Further, if the CDN domain names do not have corresponding server ip in local cache, to CDN After CDN domain names described in HTTPDNS cluster request analysis, further include:
The CDN domain names and corresponding server ip are saved in the local cache, in the local cache by CDN Domain name, ISP, geography information and server ip associated storage using outlet access IP.
Further, it is described that server ip is returned into application, including:
If the CDB domain names are corresponding with multiple server ips, the multiple server ip is carried out according to preset strategy Sequence, the server ip list after generation sequence return to application.
Specifically, the preset strategy includes priority policy and Weight Algorithm, it is described according to preset strategy to described more A server ip is ranked up, and the server ip list after generation sequence returns to application, including:
When the preset strategy is priority policy, by the high server ip sequence of priority preceding, priority is low Rear, the server ip list after generation sequence returns to application for server ip sequence;
When the preset strategy is Weight Algorithm, each server ip is sorted in turn according to the allocation proportion of server ip Preceding, the server ip list after generation sequence returns to application.
Further, it is described the multiple server ip is ranked up according to preset strategy before, further include:
Obtain the load of each server;
When the load of server exceedes default load, reduce the priority of the server ip or reduce the server ip Allocation proportion.
Further, it is described the server ip is returned into application before, further include:
The Delay that the application that application reports connects the server is received, when the time delay of the server is more than default During numerical value, it is down state to determine server ip;
When the server ip is down state, by the service of down state before application server IP is returned to Device IP is rejected.
Further, it is described the server ip is returned into application before, further include:
The Delay that the application that application reports connects the server is received, and combination detection system and DDOS attack are led to The data known judge the upstate information of server ip;
When the server ip is down state, returned to by server ip using the preceding clothes by down state Business device IP is rejected.
Second aspect, the present invention provide a kind of network access device, and described device is stored with a plurality of instruction, and described instruction is fitted In being loaded by processor and performed:
Receive the domain name mapping request of application;
If the domain name of domain name analysis request is directed toward CDN domain names, the CDN domain names are searched in local cache;
When the CDN domain names in local cache there are corresponding server ip, the server ip is returned into application, So as to it is connected to corresponding server using according to the server ip;
When corresponding server ip is not present in the CDN domain names in local cache, please be solve to CDNHTTPDNS clusters Domain name is analysed, and the server ip after parsing is returned into application, so as to be connected to correspondence using according to the server ip Server.
The third aspect, the present invention provide a kind of server, including:
One or more processors;
Memory;
One or more application program, wherein one or more of application programs are stored in the memory and quilt It is configured to be performed by one or more of processors, one or more of application programs are configured to carry out first aspect institute The method for network access stated.
Compared with prior art, the present invention possesses following advantage:
The present invention caches CDN by realizing CDN proxy resolutions in GSLB server sides, accelerating in GSLB server locals Domain name and corresponding server ip, when domain name inquiry request is initiated in application, whether preferential nslookup can hit local slow Deposit, if hit if directly return to corresponding server ip, otherwise to CDN HTTPDNS servers initiate domain name analysis request with Obtain corresponding server ip so that being applied to GSLB servers from mobile terminal only needs one parsing to obtain domain name Corresponding server ip, merges repeatedly request once, to avoid the time-consuming operation that common DNS proxy needs to parse twice, allowing Faster, mode is simpler for domain name mapping, provides optimal access IP for application, reduces parsing time delay and ensure net as short as possible Network propagation delay time.
Meanwhile the present invention when domain name is corresponding with multiple server ips, according to it is default strategy to multiple server ips into Row sequence, is handed down to application, using can be tasted successively according to the server ip list after the server ip list after generation sequence Examination is connected to corresponding CDN server, and can be switched to another server ip after a server failure is connected is connected Connect, can effectively avoid the influence that CDN is replaced or list CDN possible breakdowns carry out service band, ensure that the success rate of application access.
Furthermore GSLB servers of the present invention are also received using the Delay for being connected to application, and believed according to the time delay Breath determines whether server ip is down state, picks the server ip of down state before application server IP is handed down to Remove, provide data supporting for the optimal access IP of GSLB server sides adjustment application, ensure that the success rate of application access.
The additional aspect of the present invention and advantage will be set forth in part in the description, these will become from the following description Obtain substantially, or recognized by the practice of the present invention.
Brief description of the drawings
Of the invention above-mentioned and/or additional aspect and advantage will become from the following description of the accompanying drawings of embodiments Substantially and it is readily appreciated that, wherein:
Fig. 1 is an embodiment flow diagram of inventive network cut-in method;
Fig. 2 is an embodiment schematic diagram of inventive network access device.
Embodiment
The embodiment of the present invention is described below in detail, the example of the embodiment is shown in the drawings, wherein from beginning to end Same or similar label represents same or similar element or has the function of same or like element.Below with reference to attached The embodiment of figure description is exemplary, and is only used for explaining the present invention, and is not construed as limiting the claims.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singulative " one " used herein, " one It is a ", " described " and "the" may also comprise plural form.It is to be further understood that what is used in the specification of the present invention arranges Diction " comprising " refer to there are the feature, integer, step, operation, element and/or component, but it is not excluded that in the presence of or addition One or more other features, integer, step, operation, element, component and/or their groups.
Those skilled in the art of the present technique are appreciated that unless otherwise defined, all terms used herein (including technology art Language and scientific terminology), there is the meaning identical with the general understanding of the those of ordinary skill in fields of the present invention.Should also Understand, those terms such as defined in the general dictionary, it should be understood that have with the context of the prior art The consistent meaning of meaning, and unless by specific definitions as here, idealization or the implication of overly formal otherwise will not be used To explain.
In one embodiment, the present invention provides a kind of method for network access in GSLB server sides, as shown in Figure 1, bag Include:
S100:Receive the domain name mapping request of application.
The method for network access of the present embodiment is performed by GSLB servers as executive agent, specifically, using passing through HTTPDNS directly initiates domain name analysis request to GSLB servers, and GSLB servers are correspondingly received using the domain name solution initiated Analysis request, GSLB (abbreviation of Global Server Load Balance, the global load balancing) server are used for realization Flow allocating between the server of different geographical on a wide area network, ensures using the optimal server service visitor nearest from oneself Family, so that it is guaranteed that access efficiency and quality.Preferably, GSLB servers and the performed network insertion work(of application in the present embodiment It can be developed, be disposed to reach more preferable synergistic effect by same manufacturer.
S200:If the domain name of domain name analysis request is directed toward CDN domain names, the CDN domain names are searched in local cache.
In the present embodiment, after GSLB servers receive domain name analysis request, judge whether domain name is directed toward CDN Domain name, the i.e. domain name of domain name analysis request are directed toward another domain name (CDN domain names), and IP address is provided by another domain name, GSLB servers search the CDN domains after the CDN domain names that domain name analysis request is directed toward are determined in local cache Name, to find out the corresponding server ip of the CDN domain names.Specifically, multiple CDN domain names pair are cached with the local cache The server ip answered.
S300:When the CDN domain names in local cache there are corresponding server ip, the server ip is returned to Using so as to be connected to corresponding server using according to the server ip.
GSLB servers search the CDN domain names in local cache, when there are in local cache the CDN domain names and During its corresponding server ip, equivalent to the local cache for having hit GSLB servers, then GSLB servers are from local cache The corresponding server ip of the CDN domain names is obtained, the server ip is then returned into application, using getting server ip Afterwards, TCP connections just can directly be established with corresponding server according to server ip, then application can be initiated to answer to the server Asked with the article, picture, video asked on such as browsing web sites.
S400:When corresponding server ip is not present in the CDN domain names in local cache, to CDN HTTPDNS clusters CDN domain names described in request analysis, and the server ip after parsing is returned into application, so as to connect using according to the server ip It is connected to corresponding server.
Further, the time preserved due to the solution new record of domain name or the limitation of bar number, can not retain in local cache The solution new record of the corresponding server ip of all CDN domain names, when the CDN domain names do not have corresponding server in local cache During IP, i.e., described CDN domain names do not hit the local cache on GSLB servers, and GSLB servers are to CDN HTTPDNS clusters Request analysis domain name, CDN HTTPDNS clusters parse to return to after obtaining corresponding server ip according to domain name GSLB servers, the server ip is returned to application by GSLB servers again, after server ip is got, according to service Device IP just can directly establish TCP connections with corresponding server, and it is for example clear can to initiate application request to the server for then application Look at the request such as article on website, picture, video.
The present embodiment is cached by realizing CDN proxy resolutions in GSLB server sides, accelerating in GSLB server locals CDN domain names and corresponding server ip, when domain name inquiry request is initiated in application, whether preferential nslookup can hit local Caching, corresponding server ip is directly returned if hit, otherwise initiates domain name analysis request to CDN HTTPDNS servers To obtain corresponding server ip so that being applied to GSLB servers from mobile terminal only needs one parsing to obtain domain name Corresponding server ip, merge repeatedly request and for once, avoid the time-consuming operation that common DNS proxy needs to parse twice, Allowing domain name mapping, faster mode is simpler, provides optimal access IP for application, reduces parsing time delay and guarantee is as short as possible Network transfer delay.
A kind of embodiment of the present invention, if the domain name of the S200 domain names analysis request is directed toward CDN domain names, in local The CDN domain names are searched in caching, including:
The outlet for obtaining application accesses the ISP of IP and using the geography information reported;
The corresponding server ip of CDN domain names is searched in local cache according to domain name, ISP and geography information.
In the present embodiment, using the geography information reported to GSLB servers residing for its terminal, GSLB servers are correspondingly Obtain ISP (Internet Service Provider, internet that application reports the outlet of geography information and application to access IP Service provider, i.e., integrate to users and provide Internet access business, information service and the telecom operation of value-added service Business), then searched according to domain name, ISP and geography information in local cache near geography information, the CDN of identical ISP The server ip that manufacturer provides.For example, GSLB servers navigate to the geographical location of terminal according to the geography information that application reports For " Tianhe District, Guangzhou City, Guangdong Province ", and determine that the network type that terminal accesses be " telecommunications " according to ISP, then GSLB services Device just searches CDN manufacturers from local cache and provides " Tianhe District, Guangzhou City, Guangdong Province ISP:The CDN node of telecommunications ", subsequently Those CDN nodes IP, that is, server ip is sent to application.
Further, a kind of embodiment of the invention, after S400, further includes:
The CDN domain names and corresponding server ip are saved in the local cache, in the local cache by domain Name, ISP, geography information and server ip associated storage using outlet access IP.
In the present embodiment, when in local cache without application requested domain name corresponding server ip, to CDN After CDN domain names described in HTTPDNS cluster request analysis, the CDN domain names and corresponding server ip are saved in the local In caching, that is, local cache is updated, before this, GSLB servers obtain application and report the outlet of geography information and application to access The ISP of IP, ISP, geography information and the server ip for then accessing IP by CDN domain names, using outlet in local cache associate Storage, corresponding service can be rapidly obtained to receive next time during the domain name mapping of application request from local cache Device IP simultaneously returns to application.
It is preferred that in local cache each domain name solution new record cache-time be each domain name ttl value, TTL (Time To Live, life span) be domain name mapping life cycle, represent the caching of domain name mapping record on a dns Time, in the present embodiment, each domain name is both provided with corresponding ttl value in the local cache of GSLB servers, then basis The ttl value of each domain name is periodically to the corresponding server ip of CDN HTTPDNS server request analysis domain names, acquisition request domain Corresponding newest, the optimal server ip of name, to update local cache.For example, the ttl value of domain name www.abc.com is arranged to It is 600 seconds, then just corresponding to CDN HTTPDNS server request analysis domain names www.abc.com every 600 seconds GSLB servers Server ip, to update the server ip of domain name www.abc.com in local cache.
In the above embodiments of the present invention, server ip is returned to the process of application to be included:
If the CDN domain names are corresponding with multiple server ips, the multiple server ip is carried out according to preset strategy Sequence, the server ip list after generation sequence return to application.
In order to ensure service experience, the service of Duo Jia CDN manufacturers is employed in the present embodiment, a corresponding domain name can match somebody with somebody Multiple server ips are equipped with, when domain name is corresponding with multiple server ips, according to strategy set in advance to the multiple service Device IP is ranked up, so as to generate the server ip list after sequence, the server ip list then is returned to application, is applied Another server ip can be switched to after a server failure is connected to be attached, and can effectively avoid CDN replacements or single The influence that CDN possible breakdowns carry out service band.
Preferably, the server ip for choosing predetermined number in the present embodiment according to preset strategy generates server ip list, Attempt to connect to server successively using according to server ip list, when 3 server ips are all connected with unsuccessfully, using can and When switch to the parsing of LOCALDNS servers, avoid excessive server ip from causing using attempting for a long time and domain name mapping occur Speed is excessively slow or parses the phenomenon of failure.
Specifically, the preset strategy includes priority policy and Weight Algorithm, it is described according to preset strategy to described more A server ip is ranked up, and the server ip list after generation sequence returns to application, including:
When the preset strategy is priority policy, by the high server ip sequence of priority preceding, priority is low Rear, the server ip list after generation sequence returns to application for server ip sequence;
When the preset strategy is Weight Algorithm, each server ip is sorted in turn according to the allocation proportion of server ip Preceding, the server ip list after generation sequence returns to application.
In the above-described embodiments, when a domain name is configured with multiserver IP, GSLB servers are according to preset strategy pair The plurality of server ip is ranked up, and in one embodiment, the preset strategy is priority policy, when the default plan Slightly priority policy when, by the high server ip sequence of priority preceding, the low server ip sequence of priority rear, such as Service in view of CDN vendor As is more stablized, and the priority of CDN vendor As is set to highest, CDN manufacturers B priority sets Lowermost level is set to for secondary advanced, CDN manufacturers C priority, will when CDN vendor As, B, C are each equipped with the server ip of domain name The server ip sequence that CDN vendor As provide is in server ip preceding, that rearrangement CDN manufacturers B, C is provided successively, generation service Application is returned to after device IP lists;When the preset strategy is Weight Algorithm, according to the allocation proportion of server ip by each clothes Business device IP sorts preceding in turn, such as CDN vendor As, the allocation proportion of B, C are 3:2:1, when sorting to server ip, CDN factories The ratio that the server ip sequence of business A offers is most preceding is 3/6, the server ip that CDN manufacturers B is provided sorts, and most preceding ratio is 2/ 6th, the most preceding ratio of the server ip sequence of CDN manufacturers C offers is 1/6, allows different CDN server IP to sort in turn successively Before, avoid the occurrence of the server of one overload and other server frees it is present.
Preferably, it is described the multiple server ip is ranked up according to preset strategy before, further include:
Obtain the load of each server;
When the load of server exceedes default load, reduce the priority of the server ip or reduce the server ip Allocation proportion.
Further, before being sorted according to preset strategy to multiple server ips, GSLB servers also obtain each service The load of the corresponding servers of device IP, when the server load exceedes default load, reduce the server ip priority or Reduce the allocation proportion of the server ip;For example, the priority of CDN vendor As is set to highest, the priority of CDN manufacturers B is set to Secondary advanced, CDN manufacturers C priority is set to lowermost level, when the load excessive of the server of CDN vendor As, by CDN manufacturers tune It is whole for it is time advanced, CDB manufacturers B is adjusted to highest;Alternatively, the allocation proportion 50% of adjustment CDN vendor As is 35%, adjustment The allocation proportion 35% of CDN manufacturers B is 50%, and the influence that CDN is replaced or list CDN possible breakdowns carry out service band is avoided with this.
Further, a kind of embodiment of the invention, further includes:
The Delay for the application access Connection Service device that application reports is received, is preset when the time delay of the server is more than During numerical value, it is down state to determine server ip;
When the server ip is down state, by the service of down state before application server IP is returned to Device IP is rejected.
After application is connected to server, the time spent by server is connected to using record, the present embodiment is determined Justice is Delay, and Delay then is reported to GSLB servers, and GSLB servers judge to take according to the Delay The upstate information of business device IP, when the time delay is more than preset value, such as application is connected to server (IP 2.2.2.2) 1 minute is expended, more than default value 30 seconds, judges that the server ip (2.2.2.2) is down state at this time, when the service When device IP is down state, when subsequently having the application request domain name, GSLB servers will before application server IP is returned to The server ip of down state is rejected.
Further, after application is connected to server, using can also record the success rate that is connected to server, such as should With unsuccessful when being connected to server (IP 2.2.2.2), switching is connected to server (IP 3.3.3.3) success, then records Using the number of success for being connected to server, can be counted using connection using the number for obtaining multiple successful connection/failure To the success rate of server, success rate is then reported to GSLB servers, GSLB servers equally can according to the data into The adjustment of row server ip allocation strategy.
Further, a kind of embodiment of the invention, further includes:
The Delay that the application that application reports connects the server is received, and combination detection system and DDOS attack are led to The data known judge the upstate information of server ip;
When the server ip is down state, returned to by server ip using the preceding clothes by down state Business device IP is rejected.
In the present embodiment, GSLB servers not only receive the Delay that the server is connected using the application reported, The data notified herein in connection with detection system and DDOS attack judge the upstate information of server ip, preferably determine server The upstate of IP, more preferably server ip is provided for terminal applies, to allow application faster, preferably to connect, access domain name pair The server answered.
In another embodiment, the present invention provides a kind of network access device, and described device is stored with a plurality of instruction, institute Instruction is stated to be suitable for being loaded by processor and performing above-mentioned method for network access, including:
Receive the domain name mapping request of application;
If the domain name of domain name analysis request is directed toward CDN domain names, the CDN domain names are searched in local cache;
When the CDN domain names have corresponding server ip in local cache, the server ip is returned into application, with Make to apply and corresponding server is connected to according to the server ip;
When the CDN domain names do not have corresponding server ip in local cache, to CDNHTTPDNS cluster request analysis Domain name, and the server ip after parsing is returned into application, so that corresponding using being connected to according to the server ip Server.
For the ease of description, the network access device is split as functional module framework, as shown in Fig. 2, including:
Receiving module 100:For receiving the domain name mapping request of application;
Cache module 200:If the domain name for domain name analysis request is directed toward CDN domain names, searched in local cache The CDN domain names;
First respond module 300:For when the CDN domain names in local cache there are corresponding server ip, by institute State server ip and return to application, so as to be connected to corresponding server using according to the server ip;
Second respond module 400:For corresponding server ip to be not present in local cache when the CDN domain names, to CDN domain names described in CDN HTTPDNS cluster request analysis, and the server ip after parsing is returned into application, so that using root Corresponding server is connected to according to the server ip.
In the present embodiment, domain name analysis request, GSLB services directly are initiated to GSLB servers using by HTTPDNS Receiving module 100 in device is correspondingly received using the domain name mapping request initiated.Preferably, GSLB servers in the present embodiment And developed, disposed to reach more preferable synergistic effect by same manufacturer using performed network access facility
After receiving module 100 receives domain name analysis request, judge whether domain name is directed toward CDN domain names, i.e. institute The domain name for stating domain name mapping request is directed toward another domain name (CDN domain names), and IP address, GSLB servers are provided by another domain name After the CDN domain names that domain name analysis request is directed toward are determined, cache module 200 searches the CDN domains in local cache Name, to find out the corresponding server ip of the CDN domain names.
Cache module 200 searches the CDN domain names in local cache, when there are the CDN domain names in local cache And its during corresponding server ip, equivalent to the local cache for having hit GSLB servers, then the first respond module 300 is from local The corresponding server ip of the CDN domain names is obtained in caching, the server ip is then returned into application, is taken using getting It is engaged in after device IP, TCP connections just can be directly established with corresponding server according to server ip, then applying can be to the server Initiate application request such as browse web sites on article, picture, video request.
When the CDN domain names do not have corresponding server ip in local cache, i.e., described CDN domain names are not hit Local cache on GSLB servers, the second respond module 400 is to CDNHTTPDNS cluster request analysis domain names, CDN HTTPDNS clusters parse to return to the second respond module 400, the second response after obtaining corresponding server ip according to domain name The server ip is returned to application by module 400 again, after server ip is got, according to server ip just can directly with Corresponding server establishes TCP connections, then application can to the server initiate application request such as browse web sites on article, Picture, video etc. are asked.
In another embodiment, the present invention also provides a kind of server, which can be understood as being used for realization The GSLB servers of the method for network access described in embodiment are stated, including:
One or more processors;
Memory:For storing the candidate's intermediate data produced during above-mentioned method for network access is realized and number of results According to;
One or more application program, one or more of application programs are stored in the memory and are configured To perform above-mentioned method for network access by one or more of processors.
The present invention caches CDN by realizing CDN proxy resolutions in GSLB server sides, accelerating in GSLB server locals Domain name and corresponding server ip, when domain name inquiry request is initiated in application, whether preferential nslookup can hit local slow Deposit, if hit if directly return to corresponding server ip, otherwise to CDN HTTPDNS servers initiate domain name analysis request with Obtain corresponding server ip so that being applied to GSLB servers from mobile terminal only needs one parsing to obtain domain name Corresponding server ip, avoids the time-consuming operation that common DNS proxy needs to parse twice, and allowing domain name mapping, faster mode is more Simply, optimal access IP is provided for application, reduces parsing time delay and ensure network transfer delay as short as possible.
Meanwhile the present invention when domain name is corresponding with multiple server ips, according to it is default strategy to multiple server ips into Row sequence, is handed down to application, using can be tasted successively according to the server ip list after the server ip list after generation sequence Examination is connected to corresponding CDN server, and can be switched to another server ip after a server failure is connected is connected Connect, can effectively avoid the influence that CDN is replaced or list CDN possible breakdowns carry out service band, ensure that the success rate of application access.
Furthermore GSLB servers of the present invention are also received using the Delay for being connected to application, and believed according to the time delay Breath determines whether server ip is down state, picks the server ip of down state before application server IP is handed down to Remove, provide data supporting for the optimal access IP of GSLB server sides adjustment application, ensure that the success rate of application access.
The above is only some embodiments of the present invention, it is noted that for the ordinary skill people of the art For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications also should It is considered as protection scope of the present invention.

Claims (10)

  1. A kind of 1. method for network access, it is characterised in that including:
    GSLB servers receive the domain name mapping request of application;
    If the domain name of domain name analysis request is directed toward CDN domain names, the CDN domain names are searched in local cache;
    When the CDN domain names in local cache there are corresponding server ip, the server ip is returned into application so that Corresponding server is connected to using according to the server ip;
    When corresponding server ip is not present in the CDN domain names in local cache, to CDNHTTPDNS clusters request analysis institute CDN domain names are stated, and the server ip after parsing is returned into application, so that corresponding using being connected to according to the server ip Server.
  2. 2. according to the method described in claim 1, it is characterized in that, if the domain name of the domain name analysis request is directed toward CDN Domain name, searches the CDN domain names in local cache, including:
    The outlet for obtaining application accesses the ISP of IP and using the geography information reported;
    The corresponding server ip of CDN domain names is searched in local cache according to domain name, ISP and geography information.
  3. It is 3. according to the method described in claim 1, it is characterized in that, described when the CDN domain names are no pair in local cache The server ip answered, to after CDN domain names described in CDN HTTPDNS cluster request analysis, further includes:
    The CDN domain names and corresponding server ip are saved in the local cache, in the local cache by CDN domains Name, ISP, geography information and server ip associated storage using outlet access IP.
  4. 4. according to the method described in claim 1, it is characterized in that, described return to application by server ip, including:
    If the CDN domain names are corresponding with multiple server ips, the multiple server ip is ranked up according to preset strategy, Server ip list after generation sequence returns to application.
  5. 5. according to the method described in claim 4, it is characterized in that, the preset strategy includes priority policy and weight plan Slightly, described that the multiple server ip is ranked up according to preset strategy, the server ip list after generation sequence returns to Using, including:
    When the preset strategy is priority policy, the high server ip of priority is sorted in preceding, the low service of priority Rear, the server ip list after generation sequence returns to application for device IP sequences;
    When the preset strategy is Weight Algorithm, each server ip is sorted in turn according to the allocation proportion of server ip Before, the server ip list after generation sequence returns to application.
  6. 6. according to the method described in claim 5, it is characterized in that, it is described according to preset strategy to the multiple server ip into Before row sequence, further include:
    Obtain the load of each server;
    When the load of server exceedes default load, reduce the priority of the server ip or reduce the distribution of the server ip Ratio.
  7. 7. according to the method described in claim 1, it is characterized in that, it is described the server ip is returned into application before, also Including:
    The Delay that the application that application reports connects the server is received, when the time delay of the server is more than default value When, it is down state to determine server ip;
    When the server ip is down state, by the server ip of down state before application server IP is returned to Reject.
  8. 8. according to the method described in claim 1, it is characterized in that, it is described the server ip is returned into application before, also Including:
    Receive the application that application reports and connect the Delay of the server, and combine detection system and DDOS attack notifies Data judge the upstate information of server ip;
    When the server ip is down state, returned to by server ip using the preceding server by down state IP is rejected.
  9. 9. a kind of network access device, it is characterised in that described device is stored with a plurality of instruction, and described instruction is suitable for by processor Load and perform:
    Receive the domain name mapping request of application;
    If the domain name of domain name analysis request is directed toward CDN domain names, the CDN domain names are searched in local cache;
    When the CDN domain names in local cache there are corresponding server ip, the server ip is returned into application so that Corresponding server is connected to using according to the server ip;
    When corresponding server ip is not present in the CDN domain names in local cache, to CDNHTTPDNS clusters request analysis institute Domain name is stated, and the server ip after parsing is returned into application, so as to be connected to corresponding clothes using according to the server ip Business device.
  10. A kind of 10. server, it is characterised in that including:
    One or more processors;
    Memory;
    One or more application program, wherein one or more of application programs are stored in the memory and are configured To be performed by one or more of processors, one or more of application programs are configured to carry out according to claim 1 ~8 any one of them method for network access.
CN201711157742.5A 2017-11-20 2017-11-20 Method for network access, device and server Pending CN108040085A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711157742.5A CN108040085A (en) 2017-11-20 2017-11-20 Method for network access, device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711157742.5A CN108040085A (en) 2017-11-20 2017-11-20 Method for network access, device and server

Publications (1)

Publication Number Publication Date
CN108040085A true CN108040085A (en) 2018-05-15

Family

ID=62093983

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711157742.5A Pending CN108040085A (en) 2017-11-20 2017-11-20 Method for network access, device and server

Country Status (1)

Country Link
CN (1) CN108040085A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109769030A (en) * 2019-02-02 2019-05-17 京东数字科技控股有限公司 The method and apparatus of access for control applications
CN109981766A (en) * 2019-03-19 2019-07-05 广州华多网络科技有限公司 HTTP request processing method, processing system, server and storage medium
CN110049145A (en) * 2018-11-23 2019-07-23 阿里巴巴集团控股有限公司 Address acquiring method, device, electronic equipment and computer readable storage medium
CN110225149A (en) * 2019-06-25 2019-09-10 北京天融信网络安全技术有限公司 A kind of domain name analytic method and device
CN110839049A (en) * 2018-08-15 2020-02-25 阿里巴巴集团控股有限公司 Data scheduling method and system based on domain name system
CN110855806A (en) * 2019-09-27 2020-02-28 网宿科技股份有限公司 Domain name request processing method and device and server
CN110891184A (en) * 2018-09-07 2020-03-17 阿里巴巴集团控股有限公司 Multimedia stream service method and system
CN110891077A (en) * 2018-09-07 2020-03-17 阿里巴巴集团控股有限公司 CDN node detection method and device
CN111556178A (en) * 2020-04-26 2020-08-18 北京达佳互联信息技术有限公司 Analytic system, method, equipment and storage medium
CN111901362A (en) * 2020-08-11 2020-11-06 深圳墨世科技有限公司 Client dynamic CDN switching method and system
CN112866424A (en) * 2019-11-28 2021-05-28 华为技术有限公司 Domain name query method and related equipment

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102301682A (en) * 2011-04-29 2011-12-28 华为技术有限公司 Method and system for network caching, domain name system redirection sub-system thereof
CN102457440A (en) * 2012-01-13 2012-05-16 华为软件技术有限公司 Method for realizing load balancing, DNS server, and Client
CN103051717A (en) * 2012-12-25 2013-04-17 北京小米科技有限责任公司 Method, device and equipment for processing http request
CN103124265A (en) * 2013-01-31 2013-05-29 深信服网络科技(深圳)有限公司 Method for visiting websites and gateway device
CN103166985A (en) * 2011-12-09 2013-06-19 上海盛霄云计算技术有限公司 Global load balancing scheduling method and data transmission method and device and system
CN103595825A (en) * 2013-10-25 2014-02-19 北京奇虎科技有限公司 Domain name resolution detection method, domain name resolution detection device and server
CN103685056A (en) * 2014-01-14 2014-03-26 互联网域名系统北京市工程研究中心有限公司 Load balancing method and load balancing system
CN104954401A (en) * 2014-03-27 2015-09-30 阿里巴巴集团控股有限公司 Flow scheduling method and apparatus
CN105100294A (en) * 2014-05-20 2015-11-25 阿里巴巴集团控股有限公司 Webpage acquiring method, system, network server, browser and GSLB
CN105491173A (en) * 2014-09-18 2016-04-13 中国电信股份有限公司 DNS analysis method, server and network system
CN106331215A (en) * 2016-08-30 2017-01-11 常州化龙网络科技股份有限公司 Data request processing system and processing method
CN106899621A (en) * 2015-12-17 2017-06-27 中国联合网络通信集团有限公司 One kind scheduling system and method
CN107104921A (en) * 2016-02-19 2017-08-29 阿里巴巴集团控股有限公司 Ddos attack defence method and device

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102301682A (en) * 2011-04-29 2011-12-28 华为技术有限公司 Method and system for network caching, domain name system redirection sub-system thereof
CN103166985A (en) * 2011-12-09 2013-06-19 上海盛霄云计算技术有限公司 Global load balancing scheduling method and data transmission method and device and system
CN102457440A (en) * 2012-01-13 2012-05-16 华为软件技术有限公司 Method for realizing load balancing, DNS server, and Client
CN103051717A (en) * 2012-12-25 2013-04-17 北京小米科技有限责任公司 Method, device and equipment for processing http request
CN103124265A (en) * 2013-01-31 2013-05-29 深信服网络科技(深圳)有限公司 Method for visiting websites and gateway device
CN103595825A (en) * 2013-10-25 2014-02-19 北京奇虎科技有限公司 Domain name resolution detection method, domain name resolution detection device and server
CN103685056A (en) * 2014-01-14 2014-03-26 互联网域名系统北京市工程研究中心有限公司 Load balancing method and load balancing system
CN104954401A (en) * 2014-03-27 2015-09-30 阿里巴巴集团控股有限公司 Flow scheduling method and apparatus
CN105100294A (en) * 2014-05-20 2015-11-25 阿里巴巴集团控股有限公司 Webpage acquiring method, system, network server, browser and GSLB
CN105491173A (en) * 2014-09-18 2016-04-13 中国电信股份有限公司 DNS analysis method, server and network system
CN106899621A (en) * 2015-12-17 2017-06-27 中国联合网络通信集团有限公司 One kind scheduling system and method
CN107104921A (en) * 2016-02-19 2017-08-29 阿里巴巴集团控股有限公司 Ddos attack defence method and device
CN106331215A (en) * 2016-08-30 2017-01-11 常州化龙网络科技股份有限公司 Data request processing system and processing method

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110839049A (en) * 2018-08-15 2020-02-25 阿里巴巴集团控股有限公司 Data scheduling method and system based on domain name system
CN110891184A (en) * 2018-09-07 2020-03-17 阿里巴巴集团控股有限公司 Multimedia stream service method and system
CN110891077A (en) * 2018-09-07 2020-03-17 阿里巴巴集团控股有限公司 CDN node detection method and device
CN110049145A (en) * 2018-11-23 2019-07-23 阿里巴巴集团控股有限公司 Address acquiring method, device, electronic equipment and computer readable storage medium
CN109769030A (en) * 2019-02-02 2019-05-17 京东数字科技控股有限公司 The method and apparatus of access for control applications
CN109769030B (en) * 2019-02-02 2022-01-11 京东科技控股股份有限公司 Method and apparatus for controlling access of applications
CN109981766A (en) * 2019-03-19 2019-07-05 广州华多网络科技有限公司 HTTP request processing method, processing system, server and storage medium
CN110225149A (en) * 2019-06-25 2019-09-10 北京天融信网络安全技术有限公司 A kind of domain name analytic method and device
CN110855806A (en) * 2019-09-27 2020-02-28 网宿科技股份有限公司 Domain name request processing method and device and server
CN112866424A (en) * 2019-11-28 2021-05-28 华为技术有限公司 Domain name query method and related equipment
CN111556178A (en) * 2020-04-26 2020-08-18 北京达佳互联信息技术有限公司 Analytic system, method, equipment and storage medium
CN111901362A (en) * 2020-08-11 2020-11-06 深圳墨世科技有限公司 Client dynamic CDN switching method and system

Similar Documents

Publication Publication Date Title
CN108040085A (en) Method for network access, device and server
US6795434B1 (en) Replicated server discovery in client-proxy servers
US7908337B2 (en) System and method for using network layer uniform resource locator routing to locate the closest server carrying specific content
CN105530324B (en) The method and system of process resource request
US6850980B1 (en) Content routing service protocol
CN108173976B (en) Domain name resolution method and device
CN103167044B (en) The method of the intelligently parsing of domain name system DNS, testing device and system
CN101610222A (en) Client-based server selection method and device
CN106067890B (en) A kind of domain name analytic method, apparatus and system
US20020016860A1 (en) System and method for resolving network layer anycast addresses to network layer unicast addresses
US20020199014A1 (en) Configurable and high-speed content-aware routing method
WO2017084274A1 (en) Method and apparatus for selecting retrieval server
US20020010737A1 (en) System and method for using uniform resource locators to map application layer content names to network layer anycast addresses
US20030172163A1 (en) Server load balancing system, server load balancing device, and content management device
US20020040402A1 (en) System and method for implementing a clustered load balancer
WO2001084356A2 (en) Method for server selection
WO2006101310A1 (en) Local domain name service system and method for providing service using domain name service system
CN105930528A (en) Webpage cache method and server
CN106412063A (en) CDN node detection and resource scheduling system and method in education network
CN113452808B (en) Domain name resolution method, device, equipment and storage medium
CN112600868A (en) Domain name resolution method, domain name resolution device and electronic equipment
CN108111639A (en) A kind of method and system for improving domain name system availability
CN110708385A (en) CDN scheduling algorithm and system based on network delay
CN115297088A (en) Domain name resolution system and method in cloud computing environment
US20160323365A1 (en) Content delivery method, apparatus, and system

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