WO2018192403A1 - Method and apparatus for loading and optimizing bind configuration, medium, and computer device - Google Patents
Method and apparatus for loading and optimizing bind configuration, medium, and computer device Download PDFInfo
- Publication number
- WO2018192403A1 WO2018192403A1 PCT/CN2018/082747 CN2018082747W WO2018192403A1 WO 2018192403 A1 WO2018192403 A1 WO 2018192403A1 CN 2018082747 W CN2018082747 W CN 2018082747W WO 2018192403 A1 WO2018192403 A1 WO 2018192403A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- parsing
- domain name
- group
- configuration file
- result
- 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.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/45—Network directories; Name-to-address mapping
- H04L61/4505—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
- H04L61/4511—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
Definitions
- the embodiments of the present invention relate to the field of Internet technologies, and in particular, to a BIND configuration loading optimization method, apparatus, medium, and computer device.
- Domain name resolution is a technology that points a domain name to an Internet Protocol (IP) address of a website space, allowing users to easily access the website through a registered domain name.
- IP Internet Protocol
- DNS Domain Name System
- CDN Content Delivery Network
- Intelligent DNS is one of the key components of CDN.
- users who need to access the network to their own access usually configure an alias record (for example: www.163.com.aaa.com) for the website address (for example: www.163.com).
- the domain name in the alias record (CNAME) belongs to the CDN service provider, and the A record is specified by the CDN service provider for the domain name recorded by the alias. In this way, the result of domain name resolution of the original domain name that needs to be accelerated by access is controlled by the CDN service provider, thereby achieving the effect of optimizing access.
- the CDN service provider needs to set different group views and configure differentiated intelligent DNS services according to different views.
- Different views contain the same multiple resolution group profiles and multiple split view profiles that are differentiated.
- a DNS server that provides intelligent resolution and authoritative response, mainly using the BIND software system. Due to the large number of views, you need to load the configuration by loading the same resolution group configuration file and the different disassembly view domain name configuration files in each view, and the different parsing group configuration includes the universally imported content through INCLUDE.
- the configuration file and other independent configuration contents because the content of the common configuration file is large, the time for loading the parsing group is too long, and the intelligent DNS server starts loading more time-consuming, which seriously affects the quality of the intelligent DNS service, so that the CDN service user experience is poor.
- the first layer resolves the domain name list of the parsing group, and the second layer parses the domain name list of the split view. This way, it can be implemented without modifying the BIND software at all, but its loading efficiency is low.
- the configuration is layered, if the number of DNS servers is the same, the domain name resolution of the complete resolution group is performed. Since two different levels of DNS servers are required, the QPS of each DNS server will be doubled. When the equivalent level is large, it will affect the quality of the DNS resolution service. If the QPS value of the DNS server is consistent, it is required to add a corresponding number of DNS servers, which increases the cost.
- the other is to load the configuration concurrently by view.
- This method has better loading efficiency, which is significantly larger than the first method, and the larger the concurrency, the better the loading efficiency.
- the larger the amount of concurrency the more CPU the DNS process occupies. For cost reasons, multiple services are required to run on the same server at the same time. In this way, the DNS process takes up too much CPU, even if the duration is very short, it will have unpredictable impact on other services on the same machine.
- the present invention provides a BIND configuration loading optimization method, including:
- parsing the parsing group domain name list of the parsing group configuration file In the process of parsing the parsing group configuration file of a view, parsing the parsing group domain name list of the parsing group configuration file, and configuring the parsing group of the completed loading view for each parsing group domain name in the parsing group domain name list Searching for the domain name of the parsing group in the domain name list of the file.
- the domain name of the parsing group is found, the pointer of the data structure of the parsed group domain name saved in the current view is not found.
- the domain name is resolved, the domain name of the parsing group is parsed and the corresponding data structure is saved.
- the method further includes: in the process of parsing the parsing group configuration file of a view, when it is required to load a general configuration file of the parsing group domain name in the resolving group domain name list, determine whether the parsing group domain name has been parsed and the common configuration is saved. The parsing result of the file, if not, parsing the general configuration file and saving the parsing result, and if so, loading the parsed result of the saved general configuration file.
- the data structure is uniquely identified.
- the parsing result is maintained using a global memory structure.
- the invention also provides a BIND configuration loading optimization device, comprising:
- a parsing module configured to parse a parsing group domain name list of the parsing group configuration file in a process of parsing a parsing parsing group configuration file;
- the locating module is configured to search for the resolving group domain name in the resolving group domain name list of the parsing group configuration file of the loaded view for each resolving group domain name in the resolving group domain name list;
- the processing module is configured to: when the search module finds the domain name of the resolving group, the pointer of the saved data structure of the resolving group domain name is mounted in the current view, and the domain name is not found when the domain name of the parsing group is not found.
- the group domain name is parsed and the data structure is saved.
- the above device also has the following features:
- the device also includes a determination module
- the determining module is configured to: when the parsing module parses the parsing group configuration file of a view, when the parsing group domain name list needs to be loaded into a common configuration file of the parsing group domain name, determine whether the parsing group domain name is resolved. And save the parsing result of the general configuration file;
- the processing module is further configured to: when the determination result of the determination mode is negative, parse the general configuration file and save the analysis result, and when the determination result of the determination mode is yes, load the saved general configuration. The result of parsing the file.
- the above device also has the following features:
- the processing module is further configured to uniquely identify the data structure when parsing the domain name of the parsing group and saving the corresponding data structure.
- the above device also has the following features:
- the processing module is further configured to maintain the parsing result using a global memory structure.
- the present invention provides a computer readable storage medium having stored thereon a computer program that, when executed by a processor, implements the steps of the above method.
- the computer device provided by the present invention comprises a memory, a processor and a computer program stored on the memory and operable on the processor, and the processor implements the steps of the method when the program is executed.
- the present invention solves the following problems:
- the embodiment of the invention can effectively improve the loading efficiency, and effectively control the CPU usage of the DNS process and reduce the load.
- FIG. 2 is a structural diagram of a BIND configuration load optimization apparatus in the embodiment.
- FIG. 1 is a flowchart of a BIND configuration load optimization method in an embodiment; the method includes:
- Step 101 In the process of parsing a parsing group configuration file of a view, parsing a resolving group domain name list of the parsing group configuration file;
- Step 102 Search for the domain name of the resolving group in the resolving group domain name of the parsing group configuration file of the view that has been loaded in the domain name of the resolving group domain name.
- the saved pointer of the data structure of the domain name of the resolution group is mounted in the current view.
- the domain name of the resolution group is parsed and the corresponding data structure is saved.
- the data structure is uniquely identified when the parsing group domain name is parsed and the corresponding data structure is saved.
- the method further includes: in the process of parsing the parsing group configuration file of a view, when it is required to load a common configuration file of the parsing group domain name in the resolving group domain name list, determine whether the parsing group domain name has been parsed and the general configuration file is saved. The result of the analysis, if not, parses the generic configuration file and saves the parsing result, and if so, loads the parsed result of the saved generic configuration file.
- the analysis result is maintained using the global memory structure. Therefore, the subsequent parsing group domain name saves the time for parsing the common configuration file, and the ready-made interface function can complete the saved parsing result and import the domain name data structure.
- FIG. 2 is a structural diagram of a BIND configuration load optimization apparatus in an embodiment; the apparatus includes: a parsing module, a lookup module, and a processing module.
- the parsing module is configured to parse the parsing group domain name list of the parsing group configuration file in the process of parsing the parsing group configuration file of a view;
- the locating module is configured to search for the resolving group domain name in the resolving group domain name list of the parsing group configuration file of the loaded view for each resolving group domain name in the resolving group domain name list;
- the processing module is configured to: when the lookup module finds the domain name of the resolving group, the pointer of the saved data structure of the resolving group domain name is in the current view, and the resolving group is not found when the resolving group domain name is not found.
- the domain name is parsed and the data structure is saved.
- the device also includes a determination module.
- the determining module is configured to: when the parsing module parses the parsing group configuration file of a view, when it is required to load a common configuration file of the parsing group domain name in the parsing group domain name list, determine whether the parsing group domain name has been parsed and saved.
- the parsing result of the generic configuration file is further configured to: when the determination result of the determination mode is negative, parse the general configuration file and save the analysis result, and when the determination result of the determination mode is yes, load the saved general configuration file. Analyze the results.
- the processing module is also used to uniquely identify the data structure when parsing the domain name of the parsing group and saving the corresponding data structure.
- the processing module is further configured to maintain the parsing result using a global memory structure.
- the first view consists of 2 parsing groups.
- the second view consists of 3 parsing groups.
- the data structure corresponding to each domain name is mounted in the first view.
- parsing the second resolving group domain name of the first view it is determined whether the parsing group domain name has been parsed and the parsing result of the common configuration file is saved, and the first parsing group domain name for the first view is queried. If the parsing result of the common configuration file is saved during parsing, the parsing of the common configuration file for the domain name of the second parsing group is skipped, and the saved parsing result is directly obtained, and the data structure of the second parsing group domain name is imported.
- the domain name of the resolving group contains the domain name of the resolving group.
- the data structure of the domain name of the resolving group is saved in the current view.
- the domain name of the resolving group is skipped. If the name of the resolution group domain name of the first view that has been loaded is not found, the domain name of the resolution group is normally parsed and loaded.
- the present invention solves the following problems:
- computer storage medium includes volatile and nonvolatile, implemented in any method or technology for storing information, such as computer readable instructions, data structures, program modules or other data. Sex, removable and non-removable media.
- Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridge, magnetic tape, magnetic disk storage or other magnetic storage device, or may Any other medium used to store the desired information and that can be accessed by the computer.
- communication media typically includes computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and can include any information delivery media. .
- the embodiment of the invention can effectively improve the loading efficiency, and effectively control the CPU usage of the DNS process and reduce the load.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
本申请要求在2017年4月19日提交中国专利局、申请号为201710258006.2,发明名称为“一种BIND配置加载优化方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application entitled "A BIND Configuration Loading Optimization Method and Apparatus" filed on April 19, 2017, the Chinese Patent Office, the number of which is hereby incorporated by reference. In the application.
本发明实施例涉及互联网技术领域,尤其涉及一种BIND配置加载优化方法、装置、介质及计算机设备。The embodiments of the present invention relate to the field of Internet technologies, and in particular, to a BIND configuration loading optimization method, apparatus, medium, and computer device.
域名解析是把域名指向网站空间的IP(Internet Protocol)地址,让用户通过注册的域名可以方便地访问到网站的一种技术。域名的解析工作是由域名服务系统(Domain Name System,简称DNS)服务器完成。Domain name resolution is a technology that points a domain name to an Internet Protocol (IP) address of a website space, allowing users to easily access the website through a registered domain name. The domain name resolution is done by the Domain Name System (DNS) server.
随着互联网技术的发展,为了网络内容访问加速引入了内容分发网络(Content Delivery Network,简称CDN)技术,智能DNS则是CDN关键性的基础组件之一。在CDN服务领域,需要对所属网络做访问加速的用户通常将网站的地址(例如:www.163.com)配置一个别名记录(例如:www.163.com.aaa.com)。别名记录(CNAME)中的域名属于CDN服务提供商,由CDN服务提供商为别名记录的域名指定A记录。这样一来,需要做访问加速的原始域名做域名解析的结果就由CDN服务提供商控制,从而达到了优化访问的效果。With the development of Internet technology, the Content Delivery Network (CDN) technology has been introduced for the acceleration of network content access. Intelligent DNS is one of the key components of CDN. In the field of CDN services, users who need to access the network to their own access usually configure an alias record (for example: www.163.com.aaa.com) for the website address (for example: www.163.com). The domain name in the alias record (CNAME) belongs to the CDN service provider, and the A record is specified by the CDN service provider for the domain name recorded by the alias. In this way, the result of domain name resolution of the original domain name that needs to be accelerated by access is controlled by the CDN service provider, thereby achieving the effect of optimizing access.
CDN服务商为了根据不同地区或业务需要采取不同的解析域名智能配置,需要设置不同的组别视图(view),根据不同的视图配置差异化调度的智能DNS服务。不同的视图中包含相同的多个解析组配置文件与差异化的多个拆视图配置文件。提供智能解析和权威应答的DNS服务器,主要采用BIND软件系统。由于视图的数量众多,加载配置时需要通过在每个视图中加载内容相同的解析组配置文件和内容不同的拆视图域名配置文件,且不同解析组配置中包含通过INCLUDE方式导入内容完全一致的通用配置文件和其它独立配置内容,由于该通用配置文件内容量较大,导致加载解析组的时间过长,智能DNS服务器启动加载耗时多,严重影响智能DNS服务质量,以致CDN服务用户体验差。In order to configure different domain name intelligent configurations according to different regions or service needs, the CDN service provider needs to set different group views and configure differentiated intelligent DNS services according to different views. Different views contain the same multiple resolution group profiles and multiple split view profiles that are differentiated. A DNS server that provides intelligent resolution and authoritative response, mainly using the BIND software system. Due to the large number of views, you need to load the configuration by loading the same resolution group configuration file and the different disassembly view domain name configuration files in each view, and the different parsing group configuration includes the universally imported content through INCLUDE. The configuration file and other independent configuration contents, because the content of the common configuration file is large, the time for loading the parsing group is too long, and the intelligent DNS server starts loading more time-consuming, which seriously affects the quality of the intelligent DNS service, so that the CDN service user experience is poor.
优化BIND配置加载的现有技术有两种:There are two existing techniques for optimizing BIND configuration loading:
一种是从配置结构上做调整,进行配置分层。第一层做解析组域名列表的解析,第二层做拆视图域名列表的解析。这种方式,可以在完全不修改BIND软件的情况下实现,不过其加载效率较低。同时,进行配置分层后,若DNS服务器数量一致,做完整解析组域名解析,由于需要经过两个不同层级的DNS服务器,因此,每台DNS服务器的QPS会加倍。当量级较大时,会影响DNS解析服务质量。若保持DNS服务器QPS值一致,则要求新增相应数量的DNS服务器,增加了成本。One is to make adjustments from the configuration structure and perform configuration layering. The first layer resolves the domain name list of the parsing group, and the second layer parses the domain name list of the split view. This way, it can be implemented without modifying the BIND software at all, but its loading efficiency is low. At the same time, after the configuration is layered, if the number of DNS servers is the same, the domain name resolution of the complete resolution group is performed. Since two different levels of DNS servers are required, the QPS of each DNS server will be doubled. When the equivalent level is large, it will affect the quality of the DNS resolution service. If the QPS value of the DNS server is consistent, it is required to add a corresponding number of DNS servers, which increases the cost.
另一种是按视图并发加载配置。这种方式的加载效率较好,明显大于第一种方法,并且并发量越大加载效率越好。但是,并发量越大,DNS进程占用的CPU也就越多。出于成本方面的考虑,需要多种服务同时在同一台服务器运行。这样,DNS进程占用过高的CPU,即便持续时间很短,也会对同机其它服务带来不可预期的影响。The other is to load the configuration concurrently by view. This method has better loading efficiency, which is significantly larger than the first method, and the larger the concurrency, the better the loading efficiency. However, the larger the amount of concurrency, the more CPU the DNS process occupies. For cost reasons, multiple services are required to run on the same server at the same time. In this way, the DNS process takes up too much CPU, even if the duration is very short, it will have unpredictable impact on other services on the same machine.
发明内容Summary of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.
为了解决上述技术问题,本发明提供了一种BIND配置加载优化方法,包括:In order to solve the above technical problem, the present invention provides a BIND configuration loading optimization method, including:
在解析一视图的解析组配置文件的过程中,解析所述解析组配置文件的解析组域名列表,针对所述解析组域名列表中的各解析组域名,在已完成加载的视图的解析组配置文件的解析组域名列表中查找所述解析组域名,在查找到所述解析组域名时,将已保存的所述解析组域名的数据结构的指针挂载在当前视图下,在未查找到所述解析组域名时,对所述解析组域名进行解析并保存相应的数据结构。In the process of parsing the parsing group configuration file of a view, parsing the parsing group domain name list of the parsing group configuration file, and configuring the parsing group of the completed loading view for each parsing group domain name in the parsing group domain name list Searching for the domain name of the parsing group in the domain name list of the file. When the domain name of the parsing group is found, the pointer of the data structure of the parsed group domain name saved in the current view is not found. When the group name is resolved, the domain name of the parsing group is parsed and the corresponding data structure is saved.
上述方法还具有以下特点:The above method also has the following characteristics:
所述方法还包括:在解析一视图的解析组配置文件的过程中,在需要加载解析组域名列表中一解析组域名的通用配置文件时,判断是否已解析完成解析组域名并保存了通用配置文件的解析结果,如果否,对通用配置文件进行解析并保存解析结果,如果是,加载已保存的通用配置文件的解析结果。The method further includes: in the process of parsing the parsing group configuration file of a view, when it is required to load a general configuration file of the parsing group domain name in the resolving group domain name list, determine whether the parsing group domain name has been parsed and the common configuration is saved. The parsing result of the file, if not, parsing the general configuration file and saving the parsing result, and if so, loading the parsed result of the saved general configuration file.
上述方法还具有以下特点:The above method also has the following characteristics:
所述方法中,对解析组域名进行解析并保存相应的数据结构时,对数据结构进行唯一性标识。In the method, when the parsing group domain name is parsed and the corresponding data structure is saved, the data structure is uniquely identified.
上述方法还具有以下特点:The above method also has the following characteristics:
在对通用配置文件进行解析,获得所述解析结果时,使用全局内存结构维护所述解析结果。When the general configuration file is parsed and the parsing result is obtained, the parsing result is maintained using a global memory structure.
本发明还提供了一种BIND配置加载优化装置,包括:The invention also provides a BIND configuration loading optimization device, comprising:
解析模块,用于在解析一视图的解析组配置文件的过程中,解析所述解析组配置文件的解析组域名列表;a parsing module, configured to parse a parsing group domain name list of the parsing group configuration file in a process of parsing a parsing parsing group configuration file;
查找模块,用于针对此解析组域名列表中的各解析组域名,在已完成加载的视图的解析组配置文件的解析组域名列表中查找此解析组域名;The locating module is configured to search for the resolving group domain name in the resolving group domain name list of the parsing group configuration file of the loaded view for each resolving group domain name in the resolving group domain name list;
处理模块,用于所述查找模块查找到此解析组域名时,将已保存的此解析组域名的数据结构的指针挂载在当前视图下,在未查找到此解析组域名时,对此解析组域名进行解析并保存数据结构。The processing module is configured to: when the search module finds the domain name of the resolving group, the pointer of the saved data structure of the resolving group domain name is mounted in the current view, and the domain name is not found when the domain name of the parsing group is not found. The group domain name is parsed and the data structure is saved.
上述装置还具有以下特点:The above device also has the following features:
此装置还包括判断模块;The device also includes a determination module;
所述判断模块用于在所述解析模块在解析一视图的解析组配置文件的过程中,在需要加载解析组域名列表中一解析组域名的通用配置文件时,判断是否已解析完成解析组域名并保存了通用配置文件的解析结果;The determining module is configured to: when the parsing module parses the parsing group configuration file of a view, when the parsing group domain name list needs to be loaded into a common configuration file of the parsing group domain name, determine whether the parsing group domain name is resolved. And save the parsing result of the general configuration file;
所述处理模块还用于在所述判断模的判断结果为否时,对通用配置文件进行解析并保存解析结果,用于在所述判断模的判断结果为是时,加载已保存的通用配置文件的解析结果。The processing module is further configured to: when the determination result of the determination mode is negative, parse the general configuration file and save the analysis result, and when the determination result of the determination mode is yes, load the saved general configuration. The result of parsing the file.
上述装置还具有以下特点:The above device also has the following features:
所述处理模块还用于对解析组域名进行解析并保存相应的数据结构时,对数据结构进行唯一性标识。The processing module is further configured to uniquely identify the data structure when parsing the domain name of the parsing group and saving the corresponding data structure.
上述装置还具有以下特点:The above device also has the following features:
所述处理模块还用于使用全局内存结构维护所述解析结果。The processing module is further configured to maintain the parsing result using a global memory structure.
本发明提供的计算机可读存储介质,此存储介质上存储有计算机程序,此程序被处理器执行时实现上述方法的步骤。The present invention provides a computer readable storage medium having stored thereon a computer program that, when executed by a processor, implements the steps of the above method.
本发明提供的计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行所述程序时实现上述方法的步骤。The computer device provided by the present invention comprises a memory, a processor and a computer program stored on the memory and operable on the processor, and the processor implements the steps of the method when the program is executed.
本发明解决了以下问题:The present invention solves the following problems:
1)加载解析组配置时间过长,导致智能DNS加载解析服务域名时间长,从而带来CDN服务客户体验差的问题。1) The configuration time of loading the parsing group is too long, resulting in a long time for the intelligent DNS to load and parse the service domain name, which brings about a problem of poor CDN service customer experience.
2)现有技术中任务并发所导致的服务器CPU占用高,对合机使用的其它服务带来质量抖动影响的问题。2) In the prior art, the CPU usage of the server caused by the concurrent task is high, and the quality jitter is affected by other services used by the machine.
本发明实施例可以有效提高加载效率,同时有效控制DNS进程的CPU占用率,降低负载。The embodiment of the invention can effectively improve the loading efficiency, and effectively control the CPU usage of the DNS process and reduce the load.
此处所说明的附图用来提供对本发明实施例的进一步理解,构成本申请的一部分,本发明实施例的示意性实施例及其说明用于解释本发明实施例,并不构成对本发明实施例的不当限定。在附图中:The accompanying drawings are intended to provide a further understanding of the embodiments of the embodiments of the invention Improper limitations. In the drawing:
图1是实施例中BIND配置加载优化方法的流程图;1 is a flowchart of a BIND configuration load optimization method in an embodiment;
图2是实施例中BIND配置加载优化装置的结构图。2 is a structural diagram of a BIND configuration load optimization apparatus in the embodiment.
现结合附图和具体实施方式对本发明实施例进一步说明。The embodiments of the present invention will be further described with reference to the drawings and specific embodiments.
图1是实施例中BIND配置加载优化方法的流程图;此方法包括:1 is a flowchart of a BIND configuration load optimization method in an embodiment; the method includes:
步骤101,在解析一视图的解析组配置文件的过程中,解析所述解析组配置文件的解析组域名列表;Step 101: In the process of parsing a parsing group configuration file of a view, parsing a resolving group domain name list of the parsing group configuration file;
步骤102,针对此解析组域名列表中的各解析组域名,在已完成加载的视图的解析组配置文件的解析组域名列表中查找此解析组域名,在查找到此解析组域名时,将已保存的此解析组域名的数据结构的指针挂载在当前视图下,在未查找到此解析组域名时,对此解析组域名进行解析并保存相应的数据结构。Step 102: Search for the domain name of the resolving group in the resolving group domain name of the parsing group configuration file of the view that has been loaded in the domain name of the resolving group domain name. When the domain name of the resolving group is found, The saved pointer of the data structure of the domain name of the resolution group is mounted in the current view. When the domain name of the resolution group is not found, the domain name of the resolution group is parsed and the corresponding data structure is saved.
其中,对解析组域名进行解析并保存相应的数据结构时,对数据结构进行唯一性标识。The data structure is uniquely identified when the parsing group domain name is parsed and the corresponding data structure is saved.
本方法中,针对第一个视图对其每个解析组域名完成加载解析后,生成的数据结构是完全独立,并且是可标识的。因此,后续其它视图对相同解析组域名进行查找结果是已知存在的,且指针复用简单不易出错。In this method, after the loading and parsing of each parsing group domain name is completed for the first view, the generated data structure is completely independent and identifiable. Therefore, the subsequent search results of the same parsing group domain name are known to exist, and the pointer multiplexing is simple and error-prone.
此方法还包括:在解析一视图的解析组配置文件的过程中,在需要加载解析组域名列表中一解析组域名的通用配置文件时,判断是否已解析完成解析组域名并保存了通用配置文件的解析结果,如果否,对通用配置文件进行解析并保存解析结果,如果是,加载已保存的通用配置文件的解析结果。The method further includes: in the process of parsing the parsing group configuration file of a view, when it is required to load a common configuration file of the parsing group domain name in the resolving group domain name list, determine whether the parsing group domain name has been parsed and the general configuration file is saved. The result of the analysis, if not, parses the generic configuration file and saves the parsing result, and if so, loads the parsed result of the saved generic configuration file.
在对通用配置文件进行解析,获得解析结果时,使用全局内存结构维护所述解析结果。从而使后续解析组域名省去了解析通用配置文件的时间,且有现成接口函数可完成保存的解析结果导入域名数据结构。When the general configuration file is parsed and the analysis result is obtained, the analysis result is maintained using the global memory structure. Therefore, the subsequent parsing group domain name saves the time for parsing the common configuration file, and the ready-made interface function can complete the saved parsing result and import the domain name data structure.
图2是实施例中BIND配置加载优化装置的结构图;此装置包括:解析模块、查找模块和处理模块。2 is a structural diagram of a BIND configuration load optimization apparatus in an embodiment; the apparatus includes: a parsing module, a lookup module, and a processing module.
解析模块用于在解析一视图的解析组配置文件的过程中,解析所述解析组配置文件的解析组域名列表;The parsing module is configured to parse the parsing group domain name list of the parsing group configuration file in the process of parsing the parsing group configuration file of a view;
查找模块用于针对此解析组域名列表中的各解析组域名,在已完成加载的视图的解析组配置文件的解析组域名列表中查找此解析组域名;The locating module is configured to search for the resolving group domain name in the resolving group domain name list of the parsing group configuration file of the loaded view for each resolving group domain name in the resolving group domain name list;
处理模块用于所述查找模块查找到此解析组域名时,将已保存的此解析组域名的数据结构的指针挂载在当前视图下,在未查找到此解析组域名时,对此解析组域名进行解析并保存数据结构。The processing module is configured to: when the lookup module finds the domain name of the resolving group, the pointer of the saved data structure of the resolving group domain name is in the current view, and the resolving group is not found when the resolving group domain name is not found. The domain name is parsed and the data structure is saved.
此装置还包括判断模块。判断模块用于在所述解析模块在解析一视图的解析组配置文件的过程中,在需要加载解析组域名列表中一解析组域名的通用配置文件时,判断是否已解析完成解析组域名并保存了通用配置文件的解析结果。处理模块还用于在所述判断模的判断结果为否时,对通用配置文件进行解析并保存解析结果,用于在所述判断模的判断结果为是时,加载已保存的通用配置文件的解析结果。The device also includes a determination module. The determining module is configured to: when the parsing module parses the parsing group configuration file of a view, when it is required to load a common configuration file of the parsing group domain name in the parsing group domain name list, determine whether the parsing group domain name has been parsed and saved. The parsing result of the generic configuration file. The processing module is further configured to: when the determination result of the determination mode is negative, parse the general configuration file and save the analysis result, and when the determination result of the determination mode is yes, load the saved general configuration file. Analyze the results.
处理模块还用于对解析组域名进行解析并保存相应的数据结构时,对数据结构进行唯一性标识。The processing module is also used to uniquely identify the data structure when parsing the domain name of the parsing group and saving the corresponding data structure.
所述处理模块还用于使用全局内存结构维护所述解析结果。The processing module is further configured to maintain the parsing result using a global memory structure.
具体实施例Specific embodiment
系统中包括两个视图。第一个view包括2个解析组。第二个视图包括3个解析组。Two views are included in the system. The first view consists of 2 parsing groups. The second view consists of 3 parsing groups.
针对第一个视图对解析组域名列表中的各解析组域名进行常规解析加载,对全部域名解析完成后,生成各域名对应的数据结构挂载于第一个视图下。After the domain name resolution is complete, the data structure corresponding to each domain name is mounted in the first view.
针对第一个视图的第一个解析组域名进行解析时,对通用配置文件进行解析并保存,对第一个解析组域名的通用配置文件的上下文的其它内容进行常规解析。When parsing the first parsing group domain name of the first view, parsing and saving the common configuration file, and performing regular parsing on other contents of the context of the common configuration file of the first parsing group domain name.
针对第一个视图的第二个解析组域名进行解析时,判断是否已解析完成解析组域名并保存了通用配置文件的解析结果,查询到在针对第一个view的第一个解析组域名进行解析时已保存此通用配置文件的解析结果,则跳过针对第二个解析组域名的通用配置文件的解析,直接获取已保存的解析结果,导入此第二个解析组域名的数据结构中。When parsing the second resolving group domain name of the first view, it is determined whether the parsing group domain name has been parsed and the parsing result of the common configuration file is saved, and the first parsing group domain name for the first view is queried. If the parsing result of the common configuration file is saved during parsing, the parsing of the common configuration file for the domain name of the second parsing group is skipped, and the saved parsing result is directly obtained, and the data structure of the second parsing group domain name is imported.
针对第一个视图的其它解析组域名进行解析,执行上述相同的操作,此处不再赘述。The other operations in the first view are parsed and the same operations are performed, and are not described here.
针对第二个视图,对解析组域名列表中的各解析组域名,在已完成加载的视图的解析组配置文件的解析组域名列表中查找此解析组域名,查找到已加载的第一个视图的解析组域名列表中包含此解析组域名,将已保存的此解析组域名的数据结构挂载在当前视图下,跳过该解析组域名的加载,继续对解析组域名列表中其它解析组域名进行判断,如果没有查找到已加载的第一个视图的解析组域名列表中包含此解析组域名,则对此解析组域名进行常规解析和加载。For the second view, find the domain name of the resolution group in the resolution group domain name of the resolution group configuration file of the view that has been loaded, and find the first view that has been loaded. The domain name of the resolving group contains the domain name of the resolving group. The data structure of the domain name of the resolving group is saved in the current view. The domain name of the resolving group is skipped. If the name of the resolution group domain name of the first view that has been loaded is not found, the domain name of the resolution group is normally parsed and loaded.
针对第二个视图的各解析组域名的通用配置文件的解析采用与上述第一个视图的相同的处理方法,此处不再赘述。For the parsing of the common configuration file of the resolving group domain name of the second view, the same processing method as that of the first view is used, and details are not described herein again.
本发明解决了以下问题:The present invention solves the following problems:
1)加载解析组配置时间过长,导致智能DNS加载解析服务域名时间长,从而带来CDN服务客户体验差的问题。1) The configuration time of loading the parsing group is too long, resulting in a long time for the intelligent DNS to load and parse the service domain name, which brings about a problem of poor CDN service customer experience.
2)现有技术中任务并发所导致的服务器CPU占用高,对合机使用的其它服务带来质量抖动影响的问题。2) In the prior art, the CPU usage of the server caused by the concurrent task is high, and the quality jitter is affected by other services used by the machine.
本发明具有以下优点:The invention has the following advantages:
1)对解析组域名列表仅做一次加载解析,其它视图直接复用挂载相应解析组域名的解析结果,极大减少了解析组域名重复性加载解析的时耗;1) Performing load parsing on the domain name list of the parsing group only, and other views directly multiplexing the parsing result of the domain name of the corresponding parsing group, which greatly reduces the time consumption of resolving and parsing the domain name of the parsing group;
2)在做解析组域名解析时(唯一一次),对通用配置文件的内容仅做一次解析,其它解析组域名复用导入其解析中间结果,进一步减少了解析组域名重复性加载解析的时耗;2) When doing the domain name resolution of the parsing group (only once), the content of the common configuration file is only parsed once, and the domain name multiplexing of other parsing groups is imported into the intermediate result of the parsing, thereby further reducing the time consumption of resolving the parsing of the domain name of the parsing group. ;
3)按视图串行加载配置文件,将CPU占用严格控制在100%左右,有效减少 了对合机使用的其它服务的影响;3) Load the configuration file serially according to the view, strictly control the CPU usage to about 100%, effectively reducing the impact on other services used by the combination machine;
4)优化了DNS进程的内存占用量,有效减少了对合机使用的其它服务的影响。4) Optimized the memory usage of the DNS process, effectively reducing the impact on other services used by the machine.
本领域的普通技术人员应当理解,可以对本发明的技术方案进行修改或者等同替换,而不脱离本发明技术方案的精神和范围,均应涵盖在权利要求范围当中。A person skilled in the art should understand that the technical solutions of the present invention may be modified or equivalent, without departing from the spirit and scope of the present invention, and should be included in the scope of the claims.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些组件或所有组件可以被实施为由处理器,如数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。Those of ordinary skill in the art will appreciate that all or some of the steps, systems, and functional blocks/units of the methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be composed of several physical The components work together. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer readable medium, which may include computer storage media (or non-transitory media) and communication media (or transitory media). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and nonvolatile, implemented in any method or technology for storing information, such as computer readable instructions, data structures, program modules or other data. Sex, removable and non-removable media. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridge, magnetic tape, magnetic disk storage or other magnetic storage device, or may Any other medium used to store the desired information and that can be accessed by the computer. Moreover, it is well known to those skilled in the art that communication media typically includes computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and can include any information delivery media. .
本发明实施例可以有效提高加载效率,同时有效控制DNS进程的CPU占用率,降低负载。The embodiment of the invention can effectively improve the loading efficiency, and effectively control the CPU usage of the DNS process and reduce the load.
Claims (10)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710258006.2 | 2017-04-19 | ||
| CN201710258006.2A CN107707682B (en) | 2017-04-19 | 2017-04-19 | Loaded and optimized method and device is configured in a kind of BIND |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2018192403A1 true WO2018192403A1 (en) | 2018-10-25 |
Family
ID=61169543
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2018/082747 Ceased WO2018192403A1 (en) | 2017-04-19 | 2018-04-12 | Method and apparatus for loading and optimizing bind configuration, medium, and computer device |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN107707682B (en) |
| WO (1) | WO2018192403A1 (en) |
Families Citing this family (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107707682B (en) * | 2017-04-19 | 2018-07-06 | 贵州白山云科技有限公司 | Loaded and optimized method and device is configured in a kind of BIND |
| CN110661892B (en) * | 2018-06-28 | 2022-06-28 | 贵州白山云科技股份有限公司 | Domain name configuration information processing method and device |
| CN111866197B (en) * | 2019-04-29 | 2021-09-21 | 贵州白山云科技股份有限公司 | Domain name resolution method and system |
| CN114124887B (en) * | 2021-11-29 | 2023-09-05 | 牙木科技股份有限公司 | View query method of DNS server, DNS server and readable storage medium |
| CN114448787A (en) * | 2021-12-27 | 2022-05-06 | 天翼云科技有限公司 | CDN system channel configuration method, device, equipment and storage medium |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2009088655A1 (en) * | 2007-12-31 | 2009-07-16 | Symantec Corporation | Methods and systems for addressing dns rebinding |
| CN103701817A (en) * | 2013-12-27 | 2014-04-02 | 乐视网信息技术(北京)股份有限公司 | Method and device for generating configuration file |
| WO2016082273A1 (en) * | 2014-11-27 | 2016-06-02 | 中国科学院计算机网络信息中心 | Network-based dns security updating method in mipv6 |
| CN106161668A (en) * | 2015-04-28 | 2016-11-23 | 阿里巴巴集团控股有限公司 | Generate the method for domain name mapping, device and server |
| CN107707682A (en) * | 2017-04-19 | 2018-02-16 | 贵州白山云科技有限公司 | A kind of BIND configures loaded and optimized method and device |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101610294A (en) * | 2009-07-15 | 2009-12-23 | 浪潮电子信息产业股份有限公司 | A Method of Improving Website Access Speed by Using Intelligent DNS |
| CN102055818B (en) * | 2010-12-30 | 2013-09-18 | 北京世纪互联宽带数据中心有限公司 | Distributed intelligent DNS (domain name server) library system |
| CN105610993B (en) * | 2014-11-20 | 2019-08-02 | 中国移动通信集团河南有限公司 | A kind of domain name analytic method, apparatus and system |
| CN104820674B (en) * | 2015-04-02 | 2018-04-27 | 北京网康科技有限公司 | A kind of Web page classification method and device |
| CN106506729B (en) * | 2017-01-11 | 2019-11-19 | 中国互联网络信息中心 | DNS policy analysis method and device based on DNS view |
-
2017
- 2017-04-19 CN CN201710258006.2A patent/CN107707682B/en active Active
-
2018
- 2018-04-12 WO PCT/CN2018/082747 patent/WO2018192403A1/en not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2009088655A1 (en) * | 2007-12-31 | 2009-07-16 | Symantec Corporation | Methods and systems for addressing dns rebinding |
| CN103701817A (en) * | 2013-12-27 | 2014-04-02 | 乐视网信息技术(北京)股份有限公司 | Method and device for generating configuration file |
| WO2016082273A1 (en) * | 2014-11-27 | 2016-06-02 | 中国科学院计算机网络信息中心 | Network-based dns security updating method in mipv6 |
| CN106161668A (en) * | 2015-04-28 | 2016-11-23 | 阿里巴巴集团控股有限公司 | Generate the method for domain name mapping, device and server |
| CN107707682A (en) * | 2017-04-19 | 2018-02-16 | 贵州白山云科技有限公司 | A kind of BIND configures loaded and optimized method and device |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107707682A (en) | 2018-02-16 |
| CN107707682B (en) | 2018-07-06 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2018192403A1 (en) | Method and apparatus for loading and optimizing bind configuration, medium, and computer device | |
| US11258667B2 (en) | Network management method and related device | |
| CN106982236B (en) | An information processing method, device and system | |
| JP6215850B2 (en) | Method and apparatus for user recognition and information distribution | |
| CN106933854B (en) | Short link processing method and device and server | |
| US9824119B2 (en) | Systems and methods for load balancing and connection multiplexing among database servers | |
| TWI549464B (en) | Short url service method and device | |
| US10171593B2 (en) | Validating web services for compatibility with a client device by emulating the client device by populating a template associated with the web services | |
| US20170185678A1 (en) | Crawler system and method | |
| EP2869537A1 (en) | Using Interest Messages with Payload to Configure Network Nodes in Named Data Networks | |
| CN109951323B (en) | Log analysis method and system | |
| US8706856B2 (en) | Service directory | |
| US20140317174A1 (en) | Method and device for updating client | |
| US10771358B2 (en) | Data acquisition device, data acquisition method and storage medium | |
| US11347808B1 (en) | Dynamically-adaptive bloom-filter | |
| CN112153095A (en) | CDN function module operation method, operation device, electronic equipment and storage medium | |
| US10404649B2 (en) | Content delivery optimization using adaptive and dynamic DNS | |
| US20140164645A1 (en) | Routing table maintenance | |
| US9954815B2 (en) | Domain name collaboration service using domain name dependency server | |
| CN109151025B (en) | Load balancing method and device based on URL, computer storage medium and equipment | |
| CN107135242B (en) | Mongodb cluster access method, device and system | |
| WO2017166524A1 (en) | Domain name parsing method and apparatus | |
| WO2017012475A1 (en) | Data acquisition method and device | |
| US8996607B1 (en) | Identity-based casting of network addresses | |
| US20170155587A1 (en) | Forwarding table compression |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18787143 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 18787143 Country of ref document: EP Kind code of ref document: A1 |