[go: up one dir, main page]

CN111107172A - Automatic switching method for terminal access entrance - Google Patents

Automatic switching method for terminal access entrance Download PDF

Info

Publication number
CN111107172A
CN111107172A CN201811263470.1A CN201811263470A CN111107172A CN 111107172 A CN111107172 A CN 111107172A CN 201811263470 A CN201811263470 A CN 201811263470A CN 111107172 A CN111107172 A CN 111107172A
Authority
CN
China
Prior art keywords
cache
domain name
health check
analysis
switching
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
CN201811263470.1A
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.)
Wuxi Yazuo Online Technology Co ltd
Original Assignee
Wuxi Yazuo Online 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 Wuxi Yazuo Online Technology Co ltd filed Critical Wuxi Yazuo Online Technology Co ltd
Priority to CN201811263470.1A priority Critical patent/CN111107172A/en
Publication of CN111107172A publication Critical patent/CN111107172A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
    • 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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention uses the mechanism that the terminal automatically detects and optimally accesses the access point and actively switches the access point when the fault occurs, and provides a method for automatically switching the access entrance of the terminal, which comprises the following steps: the method comprises the steps of accessing a remote access point, associating a domain name, serving an HttpDens, and detecting a URI; the method comprises the following steps: s1: the HTTP client side firstly checks whether the analysis cache already exists, and if so, directly sends out access according to a cache result; s2: recording the total request times and response abnormity of each domain name or the times of abnormity thrown by the socket, and taking the failure proportion as the basis for switching; s3: health examination; s4: updating the analysis result through a health check mechanism; s5: a locking mechanism; the invention has the beneficial effects that: the reliability of the link is improved, the failure time is shortened, and the perception of the user to the public network failure is greatly reduced.

Description

Automatic switching method for terminal access entrance
Technical Field
The invention relates to the field of internet terminal connection, in particular to an automatic switching method for a terminal access entrance.
Background
With the popularization of big data and public clouds, various industries tend to upload data generated by production and operation to the cloud in real time by using networked terminals, and due to the requirement of high real-time performance of a production and operation system, the reliability of a link between the terminal and the cloud becomes very important. In the conventional B2C architecture, the terminal usually accesses the cloud end through a single domain name or IP address, and when the cloud end or the public network fails, the problem can be solved only by switching domain name resolution, or the user manually modifies the access point address, or the terminal relies on dynamic CDN services.
However, in view of the current situation in china, domain name switching is usually very slow to take effect, and the method for modifying the range point is poor in implementability. The dynamic CDN service can provide an available access point for the user nearby, but still cannot ascertain the actual situation of the user side, and is also affected by the characteristics of weak DNS security and easy hijacking, and thus fails.
The Chinese invention patent is disclosed, the publication number is: CN1328681C, patent name: an entrance server and an information supply method for supplying music content, application date: 20020704 which discloses that a portal server connects a plurality of content providing servers via a communication network and may also connect client terminals via a communication network. Each of the plurality of content providing servers has music content. The portal server is accessed by the client terminal, and the portal server transmits a catalog of music content supplied by the content supply server to the client terminal in response to a request from the client terminal. In the client terminal, the user can select a desired music content based on the directory transmitted by the portal server, and selection information specifying the selected music content can be transmitted from the client terminal to the communication network. Then, in response to the selection information, the selected music content is supplied from the content providing server having the selected music content.
Disclosure of Invention
The invention uses the mechanism that the terminal automatically detects and optimally accesses the access point and actively switches the access point when the fault occurs, and provides a method for automatically switching the access entrance of the terminal, which comprises the following steps: the method comprises the steps of accessing a remote access point, associating a domain name, serving an HttpDens, and detecting a URI;
the method comprises the following steps:
s1: the HTTP client side firstly checks whether the analysis cache already exists, and if so, directly sends out access according to a cache result; if no cache record exists, using HTTPDNS to resolve the domain name, and sending a request through a resolution result IP;
s2: recording the total request times and response abnormity of each domain name or the times of abnormity thrown by the socket, and taking the failure proportion as the basis for switching;
s3: the health check exists in a background task mode, domain names needing to be checked are sequentially taken out from the health check task queue, all access point IPs are analyzed in an HTTPDNS mode, and health check is carried out on all the IPs. After checking, selecting the IP with the normal return and the shortest response time to be put into an analysis cache;
s4: the expiration time of the IP is recorded in the analysis cache, when the IP is taken out from the analysis cache, whether the IP is expired or not is checked, if the IP is expired, the domain name is added into the health check cache, and the analysis result is updated through a health check mechanism;
s5: a locking mechanism: when the request is intercepted and no record exists in the cache, locking other subsequent requests with the same domain name, and waiting for the completion of the resolution; when a domain name has been added to the resolution task queue, the same task is prevented from being repeatedly added.
Preferably, the ratio of failures referred to in S2 is used as a basis for switching, and in order to prevent frequent switching due to accidental abnormality, the current time minute is counted in an array cycle count manner, and then the current time minute is added to the corresponding element in the array.
Preferably, the locking mechanism described in S5 is a request lock and a resolve task lock, respectively.
The invention has the beneficial effects that: the reliability of the link is improved, the failure time is shortened, and the perception of the user to the public network failure is greatly reduced.
Drawings
FIG. 1 is a schematic illustration of a main process of the present method;
FIG. 2 is a schematic view of the failure rate checking process of the present method;
FIG. 3 is a schematic view of the health examination process of the present method.
Detailed Description
The present invention will now be described in detail with reference to the drawings, which are given by way of illustration and explanation only and should not be construed to limit the scope of the present invention in any way.
A method for automatically switching terminal access entries is provided: the method comprises the steps of accessing a remote access point, associating a domain name, serving an HttpDens, and detecting a URI;
the method comprises the following steps:
s1: the HTTP client side firstly checks whether the analysis cache already exists, and if so, directly sends out access according to a cache result; if no cache record exists, using HTTPDNS to resolve the domain name, and sending a request through a resolution result IP;
s2: recording the total request times and response abnormity of each domain name or the times of abnormity thrown by the socket, and taking the failure proportion as the basis for switching;
s3: the health check exists in a background task mode, domain names needing to be checked are sequentially taken out from the health check task queue, all access point IPs are analyzed in an HTTPDNS mode, and health check is carried out on all the IPs. After checking, selecting the IP with the normal return and the shortest response time to be put into an analysis cache;
s4: the expiration time of the IP is recorded in the analysis cache, when the IP is taken out from the analysis cache, whether the IP is expired or not is checked, if the IP is expired, the domain name is added into the health check cache, and the analysis result is updated through a health check mechanism;
s5: a locking mechanism: when the request is intercepted and no record exists in the cache, locking other subsequent requests with the same domain name, and waiting for the completion of the resolution; when a domain name has been added to the resolution task queue, the same task is prevented from being repeatedly added.
In this embodiment, it is preferable that the ratio of failures in S2 is used as a basis for switching, and in order to prevent frequent switching due to accidental abnormality, an array cycle count mode is adopted, and the current time and minute is added to the corresponding element in the array after being complemented.
Preferably, in this embodiment, the locking mechanism described in S5 is a request lock and a resolution task lock, respectively.
It should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience in describing the present invention and simplifying the description, but do not indicate or imply that the referred devices or elements must have a specific orientation, be constructed in a specific orientation, and be operated, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
The above-described embodiments of the present invention do not limit the scope of the present invention. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.

Claims (3)

1. A terminal access entrance automatic switching method comprises a remote access point, an associated domain name, an http dns service and a URI for detection;
the method is characterized by comprising the following steps:
s1: the HTTP client side firstly checks whether the analysis cache already exists, and if so, directly sends out access according to a cache result; if no cache record exists, using HTTPDNS to resolve the domain name, and sending a request through a resolution result IP;
s2: recording the total request times and response abnormity of each domain name or the times of abnormity thrown by the socket, and taking the failure proportion as the basis for switching;
s3: the health check exists in a background task mode, domain names needing to be checked are sequentially taken out from the health check task queue, all access point IPs are analyzed in an HTTPDNS mode, and health check is carried out on all the IPs. After checking, selecting the IP with the normal return and the shortest response time to be put into an analysis cache;
s4: the expiration time of the IP is recorded in the analysis cache, when the IP is taken out from the analysis cache, whether the IP is expired or not is checked, if the IP is expired, the domain name is added into the health check cache, and the analysis result is updated through a health check mechanism;
s5: a locking mechanism: when the request is intercepted and no record exists in the cache, locking other subsequent requests with the same domain name, and waiting for the completion of the resolution; when a domain name has been added to the resolution task queue, the same task is prevented from being repeatedly added.
2. The method according to claim 1, wherein the ratio of failures involved in S2 is used as a basis for switching, and in order to prevent frequent switching due to sporadic anomalies, an array cycle count is used to add the current time and minute to corresponding elements in the array after being complemented.
3. The method according to claim 2, wherein the locking mechanism in S5 is request lock and resolve task lock, respectively.
CN201811263470.1A 2018-10-28 2018-10-28 Automatic switching method for terminal access entrance Pending CN111107172A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811263470.1A CN111107172A (en) 2018-10-28 2018-10-28 Automatic switching method for terminal access entrance

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811263470.1A CN111107172A (en) 2018-10-28 2018-10-28 Automatic switching method for terminal access entrance

Publications (1)

Publication Number Publication Date
CN111107172A true CN111107172A (en) 2020-05-05

Family

ID=70419275

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811263470.1A Pending CN111107172A (en) 2018-10-28 2018-10-28 Automatic switching method for terminal access entrance

Country Status (1)

Country Link
CN (1) CN111107172A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103248725A (en) * 2013-05-23 2013-08-14 中国科学院计算机网络信息中心 Safe and reliable domain name resolution repairing method and system
CN103957239A (en) * 2014-04-04 2014-07-30 上海聚流软件科技有限公司 DNS cache information processing method, device and system
CN104144064A (en) * 2013-05-09 2014-11-12 张焰 Server fault detection and switchover method
CN106487607A (en) * 2015-08-28 2017-03-08 中国电信股份有限公司 A kind of reorientation method based on cache server status and Redirectional system
CN108599996A (en) * 2018-04-03 2018-09-28 武汉斗鱼网络科技有限公司 Fault handling method, device and the terminal of data-base cluster

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104144064A (en) * 2013-05-09 2014-11-12 张焰 Server fault detection and switchover method
CN103248725A (en) * 2013-05-23 2013-08-14 中国科学院计算机网络信息中心 Safe and reliable domain name resolution repairing method and system
CN103957239A (en) * 2014-04-04 2014-07-30 上海聚流软件科技有限公司 DNS cache information processing method, device and system
CN106487607A (en) * 2015-08-28 2017-03-08 中国电信股份有限公司 A kind of reorientation method based on cache server status and Redirectional system
CN108599996A (en) * 2018-04-03 2018-09-28 武汉斗鱼网络科技有限公司 Fault handling method, device and the terminal of data-base cluster

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
姜雪辉等: "网络封锁的探讨与研究", 《电脑知识与技术(学术交流)》 *
杨柯等: "基于Linux智能DNS系统的研究和实现", 《信息安全与通信保密》 *

Similar Documents

Publication Publication Date Title
US6728767B1 (en) Remote identification of client and DNS proxy IP addresses
CN108702397B (en) A method and system for obtaining and collecting a client's local DNS server
US8065417B1 (en) Service provider registration by a content broker
JP4965559B2 (en) Resource address request management method and related gateway device
US10931730B2 (en) Method and system for ISP network performance monitoring and fault detection
US9276901B2 (en) Method, system, and apparatus for transitioning from IPv4 to IPv6
CN110311837B (en) Online service availability detection method and device and computer equipment
CN106411629B (en) Method and equipment for monitoring state of CDN node
CN106412063B (en) CDN node detection and resource scheduling system and method in education network
CN105610867B (en) A kind of anti-abduction method and apparatus of DNS
US20100174829A1 (en) Apparatus for to provide content to and query a reverse domain name system server
CN108234207A (en) A kind of Fault Locating Method and device based on content distributing network CDN
CN110809070A (en) Website domain name resolution record processing method and device, electronic equipment and storage medium
WO2017161965A1 (en) Method, device, and system for dynamic domain name system (dns) redirection
US8423670B2 (en) Accessing distributed services in a network
CN104348661B (en) The upload of network failure data, method of reseptance and equipment and recording method and system
US10193853B1 (en) Web browser or web service based detection of internet facing DNS server
CN109729058B (en) Traffic hijacking analysis method and device
US10164943B1 (en) Detection and prediction of web interaction performance issues
US8024456B2 (en) Interactive DNS for controlling party
JP2002368781A (en) User location management domain name conversion system
CN108833424B (en) System for acquiring all resource records of domain name
CN111107172A (en) Automatic switching method for terminal access entrance
JP2008177950A (en) Video distribution system, video distribution method, distribution management system and program
Alzoubi et al. Performance implications of unilateral enabling of IPv6

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200505