CN113395361B - Load balancing access domain name coordination method, system, terminal and storage medium - Google Patents

Load balancing access domain name coordination method, system, terminal and storage medium Download PDF

Info

Publication number
CN113395361B
CN113395361B CN202110940121.4A CN202110940121A CN113395361B CN 113395361 B CN113395361 B CN 113395361B CN 202110940121 A CN202110940121 A CN 202110940121A CN 113395361 B CN113395361 B CN 113395361B
Authority
CN
China
Prior art keywords
domain name
sub
load balancing
priority
service node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110940121.4A
Other languages
Chinese (zh)
Other versions
CN113395361A (en
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202110940121.4A priority Critical patent/CN113395361B/en
Publication of CN113395361A publication Critical patent/CN113395361A/en
Application granted granted Critical
Publication of CN113395361B publication Critical patent/CN113395361B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • 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
    • 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/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention provides a method, a system, a terminal and a storage medium for coordinating domain names accessed by load balancing, wherein the method comprises the following steps: setting a higher-level domain name with the priority of the sub-domain name higher than that of the sub-domain name in a domain name configuration file, and setting a load balancing rule of the domain name and a load balancing rule of the sub-domain name; analyzing domain name information of a request sent by a client, and if the domain name information comprises a domain name and a sub-domain name, distributing a service node ip for the client according to a load balancing rule of the sub-domain name; and if the domain name does not have the sub domain name in the domain name information, distributing the service node ip for the client according to the load balancing rule of the domain name. The invention further supplements and perfects the load balancing strategy, can fully consider the requirement of client service, and enables the user to correctly access the domain name and expand the requirement of domain name access. The efficiency of processing the client request by the back-end server can be improved, the network data processing capacity is further enhanced, and the flexibility and the usability of the network are improved.

Description

Load balancing access domain name coordination method, system, terminal and storage medium
Technical Field
The invention relates to the technical field of cluster load balancing, in particular to a method, a system, a terminal and a storage medium for coordinating domain names accessed by load balancing.
Background
In the Distributed file system, controllable polling strategy and connection number strategy domain name resolution balance service is provided based on pdns (Parallel Distributed network simulator/Distributed NS). The method comprises the steps that an original load balancing sub-domain name resolution strategy is adopted, a normal domain name (a.com) and a sub-domain name (domain names taking a.com as suffixes and including b.a.com, c.a.com, d.a.com and the like) share an address pool, after a sub-domain name resolution function is started, the domain name accessed by a client side is judged to be the sub-domain name preferentially, and then the domain name accessed by the client side is judged to be the normal domain name. If the configuration file is configured with both the normal domain name (a.com) and the sub-domain names (b.a.com, c.a.com), and the configuration file corresponds to different load balancing strategies, the client returns the address in the a.com address pool according to the strategy corresponding to the a.com when accessing the b.a.com and the c.a.com, and the client cannot return the address in the b.a.com (or c.a.com) address pool according to the strategy corresponding to the b.a.com.
Therefore, if the request sent by the client includes the normal domain name and the sub-domain name under the normal domain name, and the load balancing rule of the normal domain name in the configuration file is inconsistent with the load balancing rule of the sub-domain name under the normal domain name, the conflict of the load balancing rule can be caused, so that the system is disordered, the user request processing progress is blocked, and the availability of the distributed file system is reduced.
Disclosure of Invention
Aiming at the problems of conflict and system confusion of load balancing rules caused by different load balancing rules of a normal domain name and a sub-domain name under the normal domain name in the prior art, the invention provides a coordination method, a system, a terminal and a storage medium for accessing the domain name in a load balancing manner, so as to solve the technical problems.
In a first aspect, the present invention provides a method for coordinating a load balancing access domain name, including:
setting a higher-level domain name with the priority of the sub-domain name higher than that of the sub-domain name in a domain name configuration file, and setting a load balancing rule of the domain name and a load balancing rule of the sub-domain name;
analyzing domain name information of a request sent by a client, and if the domain name information comprises a domain name and a sub-domain name, distributing a service node ip for the client according to a load balancing rule of the sub-domain name;
and if the domain name does not have the sub domain name in the domain name information, distributing the service node ip for the client according to the load balancing rule of the domain name.
Further, setting the priority of the sub-domain name higher than the domain name in the configuration file, and setting a load balancing rule of the domain name and a load balancing rule of the sub-domain name, including:
setting a priority function configuration item, starting a priority management function through the configuration item, wherein the priority of the sub-domain is higher than that of the domain in the starting state of the priority management function; in the priority function not enabled state, the domain name is higher in priority than the sub-domain name.
Further, analyzing domain name information of a request sent by a client, and if a domain name and a sub-domain name exist in the domain name information, allocating a service node ip to the client according to a load balancing rule of the sub-domain name, including:
if the domain name exists in the domain name information, marking the domain name, and searching a lower-level sub-domain name of the domain name from the domain name information;
and if the subordinate sub-domain name of the domain name in the domain name information is found, distributing the service node ip for the client according to the load balancing rule of the sub-domain name.
Further, before allocating the service node ip to the client, the method further includes:
collecting basic information of each service node of a cluster, wherein the basic information comprises average CPU utilization rate, memory utilization rate and bandwidth utilization rate;
and selecting a target service node according to the basic information of each service node and the current load balancing rule, and distributing the target service node ip to the client.
In a second aspect, the present invention provides a system for coordinating domain names accessed by load balancing, including:
the domain name configuration unit is used for setting a higher-level domain name with the priority of the sub-domain name higher than that of the sub-domain name in a domain name configuration file, and setting a load balancing rule of the domain name and a load balancing rule of the sub-domain name;
the system comprises a priority allocation unit, a service node ip allocation unit and a service node ip allocation unit, wherein the priority allocation unit is used for analyzing domain name information of a request sent by a client, and if a domain name and a sub-domain name exist in the domain name information, the service node ip is allocated to the client according to a load balancing rule of the sub-domain name;
and the secondary distribution unit is used for distributing the service node ip for the client according to the load balancing rule of the domain name if the domain name does not exist in the domain name information.
Further, the domain name configuration unit includes:
the function configuration module is used for setting a priority function configuration item, starting a priority management function through the configuration item, and enabling the priority of the sub-domain name to be higher than the priority of the domain name in a state that the priority management function is started; in the priority function not enabled state, the domain name is higher in priority than the sub-domain name.
Further, the preferential allocation unit includes:
the initial searching module is used for marking the domain name if the domain name exists in the domain name information and searching a lower-level sub-domain name of the domain name from the domain name information;
and the secondary searching module is used for distributing the service node ip for the client according to the load balancing rule of the sub-domain if the lower-level sub-domain of the domain name in the domain name information is searched.
Further, the system further comprises:
the information acquisition unit is used for acquiring basic information of each service node of the cluster, wherein the basic information comprises average CPU utilization rate, memory utilization rate and bandwidth utilization rate;
and the balance execution unit is used for selecting a target service node according to the basic information of each service node and the current load balance rule and distributing the target service node ip to the client.
In a third aspect, a terminal is provided, including:
a processor, a memory, wherein,
the memory is used for storing a computer program which,
the processor is used for calling and running the computer program from the memory so as to make the terminal execute the method of the terminal.
In a fourth aspect, a computer storage medium is provided having stored therein instructions that, when executed on a computer, cause the computer to perform the method of the above aspects.
The beneficial effect of the invention is that,
according to the coordination method for the load balancing access domain names, the priorities of the normal domain names and the sub-domain names are set in the domain name configuration file, the load balancing rules of the normal domain names and the sub-domain names are configured, and when a subsequent request of a client is subjected to domain name resolution, the load balancing rules are selected according to the resolved domain name information and the preset domain name priorities, so that the problems of system confusion and client request blocking caused by load balancing conflict of the normal domain names and the sub-domain names are effectively avoided. The invention further supplements and perfects the load balancing strategy, and can fully consider the requirement of client service by the method, so that the user can correctly access the domain name and expand the requirement of domain name access. By the method, the efficiency of processing the client request by the back-end server can be improved, the network data processing capacity is further enhanced, and the flexibility and the usability of the network are improved.
According to the load balancing access domain name coordination system provided by the invention, the priorities of the normal domain name and the sub-domain name are set in the domain name configuration file through the domain name configuration unit, and the load balancing rules of the normal domain name and the sub-domain name are configured, when the priority distribution unit and the secondary distribution unit perform domain name resolution on a client request in the subsequent process, the load balancing rules are selected according to the resolved domain name information and the preset domain name priority, so that the problems of system confusion and client request blocking caused by load balancing conflict of the normal domain name and the sub-domain name are effectively avoided. The invention further supplements and perfects the load balancing strategy, and can fully consider the requirement of client service through the system, so that the user can correctly access the domain name and expand the requirement of domain name access. By the system, the efficiency of processing the client request by the back-end server can be improved, the network data processing capacity is further enhanced, and the flexibility and the usability of the network are improved.
The terminal provided by the invention comprises a processor for operating the load balancing access domain name coordination method, further supplements and perfects the load balancing strategy, and can fully consider the service requirement of the client end through the terminal, so that the user can correctly access the domain name and expand the requirement of domain name access. Through the terminal, the efficiency of processing the client request by the back-end server can be improved, the network data processing capacity is further enhanced, and the flexibility and the usability of the network are improved.
The storage medium provided by the invention stores a system for executing the load balancing access domain name coordination method, the load balancing strategy is further supplemented and perfected, the storage medium can fully consider the service requirement of the client, so that a user can correctly access the domain name and expand the requirement of domain name access. The storage medium can improve the efficiency of the back-end server for processing the client request, further strengthen the network data processing capacity and improve the flexibility and the usability of the network.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention.
FIG. 2 is a schematic block diagram of a system of one embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The following explains key terms appearing in the present invention.
Distributed File storage System (DFS) means that physical storage resources managed by a File System are not necessarily directly connected to a local node, but are connected to a node (which can be simply understood as a computer) through a computer network; or a complete hierarchical file system formed by combining several different logical disk partitions or volume labels. DFS provides a logical tree file system structure for resources distributed at any position on the network, so that users can access shared files distributed on the network more conveniently. The role of individual DFS shared folders is relative to access points through other shared folders on the network.
Load balancing builds on existing network architectures and provides an inexpensive, efficient, transparent way to extend the bandwidth of network devices and servers, increase throughput, enhance network data processing capabilities, and increase network flexibility and availability. Load Balance means that the Load Balance is shared by a plurality of operation units to be executed, such as a Web server, an FTP server, an enterprise key application server and other key task servers, so as to jointly complete work tasks. The global load balancing has the characteristics that: 1. the response speed of the server is improved, the problem of network congestion is solved, and the effect of high-quality network access is achieved. 2. The system can provide complete transparent service for users in a long distance, and truly realizes independence from geographical positions. 3. The method can avoid various single-point failures, including single-point failures of a data center, a server and the like, and also including single-point failures caused by private line faults.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention. The execution subject in fig. 1 may be a domain name coordination system with load balancing access.
As shown in fig. 1, the method includes:
step 110, setting a higher-level domain name with the priority of the sub-domain name higher than that of the sub-domain name in a domain name configuration file, and setting a load balancing rule of the domain name and a load balancing rule of the sub-domain name;
step 120, analyzing domain name information of a request sent by a client, and if a domain name and a sub-domain name exist in the domain name information, allocating a service node ip to the client according to a load balancing rule of the sub-domain name;
step 130, if the domain name exists in the domain name information and no sub-domain name exists, distributing a service node ip for the client according to a load balancing rule of the domain name.
In order to facilitate understanding of the present invention, the following further describes the method for coordinating domain names accessed by load balancing according to the principle of the method for coordinating domain names accessed by load balancing of the present invention and in combination with the process of coordinating domain names accessed by load balancing in the embodiment.
The existing load balancing method comprises the following specific steps:
(1) if the client accesses the domain name test.com, the server receives the domain name test.com, automatically adds a ". just.", i.e.. just.test.com ", in the front of the first domain name in the configuration file by the server, then matches the first domain name" test.com ", namely judges whether the" test.com "contains the". test.com ", if not, then matches the received domain name" test.com "by using the" test.com "in the configuration file, matches the first domain name with the second domain name" test.com ", matches the first domain name with the second domain name successfully, and selects an ip to the client according to a polling strategy (round-bind) corresponding to the domain name test.com.
(2) If the client accesses the domain name bucket.test.com, the server receives the domain name bucket.test.com, automatically adds a ". quadrature.", namely,. test.com ", in front of the first domain name in the configuration file by the server, and then matches the first domain name bucket.test.com" with the received domain name bucket.test.com ", namely, judges whether the" bucket.test.com "contains the". test.com ", if yes, an ip is selected to the client according to a polling strategy (round-robin) corresponding to the domain name test.com.
(3) From (1) and (2), it can be determined that, when the domain names test.com and bucket.test.com exist in the configuration file at the same time, no matter which domain name the client accesses, the server selects an ip to the client according to a round-robin policy (round-robin) corresponding to the domain name test.com.
Specifically, the method for coordinating a load balancing access domain name provided by this embodiment includes:
s1, setting the priority of the sub domain name higher than the upper domain name of the sub domain name in the domain name configuration file, and setting the load balancing rule of the domain name and the load balancing rule of the sub domain name.
Setting a priority function configuration item, starting a priority management function through the configuration item, wherein the priority of the sub-domain is higher than that of the domain in the starting state of the priority management function; in the priority function not enabled state, the domain name is higher in priority than the sub-domain name.
The setting of the priority function configuration item is a preferred technical solution of this embodiment, and in other embodiments of the present invention, the sub domain name is directly set to have a priority higher than the upper normal domain name.
Adding a priority function configuration item, wherein the specific adding method is that < checksubdomain checksubdomain = 'true' > represents a sub-domain name resolution function switch; when the checksubdomain is true, starting a sub-domain name resolution function; when the checksubdomain is false, closing the sub-domain name resolution function; < subdomainpfriority = "true" > denotes a sub domain name resolution priority switch; when the subdomainpreference is true, the sub-domain name is analyzed preferentially; when the subdomainpriority is false, the normal domain name is analyzed preferentially; < domain name = "test.com" > means that the domain name is test.com; < domain name = "bucket.
After the addition is completed, the configuration item is enabled, and the configuration item is normally set to be in a state of being preferentially resolved by the sub-domain name by default.
And S2, analyzing the domain name information of the request sent by the client, and if the domain name information contains the domain name and the sub-domain name, distributing the service node ip for the client according to the load balancing rule of the sub-domain name. And if the domain name does not have the sub domain name in the domain name information, distributing the service node ip for the client according to the load balancing rule of the domain name.
If the domain name exists in the domain name information, marking the domain name, and searching a lower-level sub-domain name of the domain name from the domain name information; and if the subordinate sub-domain name of the domain name in the domain name information is found, distributing the service node ip for the client according to the load balancing rule of the sub-domain name.
(1) Com if the client accesses the domain name test
The first round adopts sub-domain name matching: and the server receives the domain name as test.com, automatically adds a ". multidot.", namely,. test.com ", in the front of the first domain name in the configuration file, and then matches the first domain name with the received domain name,. test.com", namely, judges whether the "test.com" contains the ". multidot.com", and does not. Then, the second domain name "bucket.
And the second round adopts normal domain name matching: com, the server side directly matches the first domain name in the configuration file with the received domain name "test.com", and if the first domain name is the same as the received domain name "test.com", an ip is selected to the client side according to a polling strategy (round-robin) corresponding to the domain name test.com.
(2) Com if the client accesses the domain name packet
The first round adopts sub-domain name matching: the server receives a domain name of bucket.test.com, automatically adds a ". multidot.", namely,. test.com ", in front of a first domain name in a configuration file by the server, then matches the first domain name with the received domain name of bucket.test.com", namely, judges whether the "bucket.test.com" contains the ". multidot.com", and then selects an ip to the client according to a polling strategy (round-robin) corresponding to the domain name of bucket.test.com.
(3) If the client accesses the domain name a.packet.test.com
The first round adopts sub-domain name matching: the server receives a domain name of a.bucket.test.com, segments the a.bucket.test.com at intervals of 'say', namely, the a.bucket.test.com is four segments, automatically adds a 'say', namely, 'test.com' in front of the first domain name in a configuration file, then matches the first domain name with the received domain name 'a.bucket.test.com', namely, judges whether the 'bucket.test.com' contains 'test.com', and returns the same segment number of 2.
Automatically adding a ". multidot.", namely ". bucket.test.com", in the front of the second domain name in the configuration file, and then matching the second domain name with the received domain name "a.bucket.test.com", namely judging whether the "a.bucket.test.com" contains ". multidot.bucket.test.com", and returning the same number of segments as 3.
And traversing the whole configuration file in sequence, and selecting the domain name with the largest segment number, namely selecting an ip to the client according to a link number strategy (link) corresponding to the second domain name bucket.
S3, collecting basic information of each service node of the cluster, wherein the basic information comprises average CPU utilization rate, memory utilization rate and bandwidth utilization rate; and selecting a target service node according to the basic information of each service node and the current load balancing rule, and distributing the target service node ip to the client.
Firstly, selecting a node in a server cluster as a DNS node, wherein all nodes collect data of the node, the data comprises the number of connection numbers, average cpu utilization rate, memory utilization rate and bandwidth utilization rate (polling and Hash strategies do not need to collect the data), all nodes send the collected data to the DNS node, the DNS node stores the collected data in a memory, and when a client accesses a domain name, the DNS calculates and returns a virtual ip to the client according to strategies corresponding to the domain name, a sub-domain name function switch, a sub-domain name priority switch and the like.
Calculating a virtual ip flow for the DNS according to the configuration parameters under the domain name, the sub-domain name function switch, the sub-domain name priority switch and the like;
(1) when the DNS is started, a configuration file is loaded first, and information such as a sub-domain name resolution switch, a sub-domain name priority, a domain name, a strategy and the like in the configuration file is stored in a memory;
(2) the DNS receives a domain name resolution request of a client, and the DNS extracts a domain name to be accessed by the client;
(3) the DNS reads a sub-domain name function switch and a sub-domain name priority switch which are stored in a memory:
1. if the sub-domain name resolution function is started, a sub-domain name priority switch is started:
traversing all domain names in the configuration file, adding a mark in front of the domain name in the configuration file (such as a mark in 2. com), matching the domain name with the domain name accessed by the client, calculating the number of matched segments of the domain name if the domain name is matched, and storing the matched segments of the domain name and the position of the comparison domain name in the configuration file in a memory, wherein the position of the domain name of the configuration file in the configuration file (the position of a first domain name in the configuration file is 0, the position of a second domain name in the configuration file is 1, and the positions are sequentially downward); and the DNS calculates according to the parameters and the strategy under the domain name and returns a virtual ip of the address pool under the domain name to the client.
If the configuration files are not matched after traversing, directly comparing the domain name in the configuration files with the domain name accessed by the client in the second round, judging whether the domain names are the same or not, and if the domain names are the same, returning the position of the domain name in the configuration files; if not, the next domain name in the configuration file is continuously traversed. If all the domain names in the configuration file are different from the domain name accessed by the client, the DNS cannot analyze the domain name accessed by the client, and the execution is finished.
2. If the sub-domain name resolution function is not started, the priority of the sub-domain name does not need to be judged:
traversing all domain names in the configuration file, directly comparing the domain names in the configuration file with domain names accessed by the client, judging whether the domain names are the same or not, and if the domain names are the same, returning the position of the domain name in the configuration file; if not, the next domain name in the configuration file is continuously traversed. If all the domain names in the configuration file are different from the domain name accessed by the client, the DNS cannot analyze the domain name accessed by the client, and the execution is finished. If the same domain name is found in the configuration file, the DNS performs calculation according to parameters and strategies under the domain name, and returns a virtual ip of the address pool under the domain name to the client.
According to the coordination method for the load balancing access domain names, the priorities of the normal domain names and the sub-domain names are set in the domain name configuration file, the load balancing rules of the normal domain names and the sub-domain names are configured, and when a subsequent request of a client is subjected to domain name resolution, the load balancing rules are selected according to the resolved domain name information and the preset domain name priorities, so that the problems of system confusion and client request blocking caused by load balancing conflicts of the normal domain names and the sub-domain names are effectively avoided. The embodiment further supplements and perfects the load balancing strategy, and the method can fully consider the requirements of client services, so that the user can correctly access the domain name and expand the requirements of domain name access. By the method, the efficiency of processing the client request by the back-end server can be improved, the network data processing capacity is further enhanced, and the flexibility and the usability of the network are improved.
As shown in fig. 2, the system 200 includes:
a domain name configuration unit 210, configured to set, in a domain name configuration file, a higher-level domain name with a higher priority of a sub-domain name than the sub-domain name, and set a load balancing rule of the domain name and a load balancing rule of the sub-domain name;
the preferential allocation unit 220 is configured to analyze domain name information of a request sent by a client, and if a domain name and a sub-domain name exist in the domain name information, allocate a service node ip to the client according to a load balancing rule of the sub-domain name;
and the secondary allocation unit 230 is configured to, if there is a domain name in the domain name information and there is no sub-domain name, allocate a service node ip to the client according to a load balancing rule of the domain name.
Optionally, as an embodiment of the present invention, the domain name configuration unit includes:
the function configuration module is used for setting a priority function configuration item, starting a priority management function through the configuration item, and enabling the priority of the sub-domain name to be higher than the priority of the domain name in a state that the priority management function is started; in the priority function not enabled state, the domain name is higher in priority than the sub-domain name.
Optionally, as an embodiment of the present invention, the priority allocation unit includes:
the initial searching module is used for marking the domain name if the domain name exists in the domain name information and searching a lower-level sub-domain name of the domain name from the domain name information;
and the secondary searching module is used for distributing the service node ip for the client according to the load balancing rule of the sub-domain if the lower-level sub-domain of the domain name in the domain name information is searched.
Optionally, as an embodiment of the present invention, the system further includes:
the information acquisition unit is used for acquiring basic information of each service node of the cluster, wherein the basic information comprises average CPU utilization rate, memory utilization rate and bandwidth utilization rate;
and the balance execution unit is used for selecting a target service node according to the basic information of each service node and the current load balance rule and distributing the target service node ip to the client.
Fig. 3 is a schematic structural diagram of a terminal 300 according to an embodiment of the present invention, where the terminal 300 may be used to execute the method for coordinating load balancing access domain names according to the embodiment of the present invention.
Among them, the terminal 300 may include: a processor 310, a memory 320, and a communication unit 330. The components communicate via one or more buses, and those skilled in the art will appreciate that the architecture of the servers shown in the figures is not intended to be limiting, and may be a bus architecture, a star architecture, a combination of more or less components than those shown, or a different arrangement of components.
The memory 320 may be used for storing instructions executed by the processor 310, and the memory 320 may be implemented by any type of volatile or non-volatile storage terminal or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The executable instructions in memory 320, when executed by processor 310, enable terminal 300 to perform some or all of the steps in the method embodiments described below.
The processor 310 is a control center of the storage terminal, connects various parts of the entire electronic terminal using various interfaces and lines, and performs various functions of the electronic terminal and/or processes data by operating or executing software programs and/or modules stored in the memory 320 and calling data stored in the memory. The processor may be composed of an Integrated Circuit (IC), for example, a single packaged IC, or a plurality of packaged ICs connected with the same or different functions. For example, the processor 310 may include only a Central Processing Unit (CPU). In the embodiment of the present invention, the CPU may be a single operation core, or may include multiple operation cores.
A communication unit 330, configured to establish a communication channel so that the storage terminal can communicate with other terminals. And receiving user data sent by other terminals or sending the user data to other terminals.
The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and the program may include some or all of the steps in the embodiments provided by the present invention when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a Random Access Memory (RAM).
Therefore, the invention sets the priorities of the normal domain name and the sub-domain name in the domain name configuration file, and configures the load balancing rules of the normal domain name and the sub-domain name, and when the subsequent domain name resolution is carried out on the client request, the load balancing rules are selected according to the resolved domain name information and the preset domain name priority, thereby effectively avoiding the problems of system confusion and client request blockage caused by the load balancing conflict of the normal domain name and the sub-domain name. The invention further supplements and perfects the load balancing strategy, and can fully consider the requirement of client service by the method, so that the user can correctly access the domain name and expand the requirement of domain name access. By the method, the efficiency of processing the client request by the back-end server can be improved, the network data processing capability is further enhanced, and the flexibility and the usability of the network are improved.
Those skilled in the art will readily appreciate that the techniques of the embodiments of the present invention may be implemented as software plus a required general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be embodied in the form of a software product, where the computer software product is stored in a storage medium, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like, and the storage medium can store program codes, and includes instructions for enabling a computer terminal (which may be a personal computer, a server, or a second terminal, a network terminal, and the like) to perform all or part of the steps of the method in the embodiments of the present invention.
The same and similar parts in the various embodiments in this specification may be referred to each other. Especially, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant points can be referred to the description in the method embodiment.
In the embodiments provided in the present invention, it should be understood that the disclosed system and method can be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, systems or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (4)

1. A method for coordinating load balancing access domain names is characterized by comprising the following steps:
setting a higher-level domain name with the priority of the sub-domain name higher than that of the sub-domain name in a domain name configuration file, and setting a load balancing rule of the domain name and a load balancing rule of the sub-domain name;
analyzing domain name information of a request sent by a client, and if the domain name information comprises a domain name and a sub-domain name, distributing a service node ip for the client according to a load balancing rule of the sub-domain name;
if the domain name does not have the sub domain name in the domain name information, distributing a service node ip for the client according to a load balancing rule of the domain name;
setting the priority of the sub-domain name to be higher than the domain name in the configuration file, and setting a load balancing rule of the domain name and a load balancing rule of the sub-domain name, wherein the steps comprise:
setting a priority function configuration item, starting a priority management function through the configuration item, wherein the priority of the sub-domain is higher than that of the domain in the starting state of the priority management function; in the state that the priority function is not started, the priority of the domain name is higher than that of the sub domain name;
analyzing domain name information of a request sent by a client, and if the domain name information contains a domain name and a sub-domain name, distributing a service node ip for the client according to a load balancing rule of the sub-domain name, wherein the method comprises the following steps:
if the domain name exists in the domain name information, marking the domain name, and searching a lower-level sub-domain name of the domain name from the domain name information;
if the lower-level sub-domain name of the domain name in the domain name information is found, distributing a service node ip for the client according to a load balancing rule of the sub-domain name;
before allocating the service node ip for the client, the method further includes:
collecting basic information of each service node of a cluster, wherein the basic information comprises average CPU utilization rate, memory utilization rate and bandwidth utilization rate;
and selecting a target service node according to the basic information of each service node and the current load balancing rule, and distributing the target service node ip to the client.
2. A load balancing access domain name coordination system, comprising:
the domain name configuration unit is used for setting a higher-level domain name with the priority of the sub-domain name higher than that of the sub-domain name in a domain name configuration file, and setting a load balancing rule of the domain name and a load balancing rule of the sub-domain name;
the system comprises a priority allocation unit, a service node ip allocation unit and a service node ip allocation unit, wherein the priority allocation unit is used for analyzing domain name information of a request sent by a client, and if a domain name and a sub-domain name exist in the domain name information, the service node ip is allocated to the client according to a load balancing rule of the sub-domain name;
the secondary distribution unit is used for distributing a service node ip for the client according to a load balancing rule of the domain name if the domain name does not have the sub domain name in the domain name information;
the domain name configuration unit includes:
the function configuration module is used for setting a priority function configuration item, starting a priority management function through the configuration item, and enabling the priority of the sub-domain name to be higher than the priority of the domain name in a state that the priority management function is started; in the state that the priority function is not started, the priority of the domain name is higher than that of the sub domain name;
the preferential allocation unit includes:
the initial searching module is used for marking the domain name if the domain name exists in the domain name information and searching a lower-level sub-domain name of the domain name from the domain name information;
the secondary searching module is used for distributing a service node ip for the client according to the load balancing rule of the sub-domain if the lower-level sub-domain of the domain name in the domain name information is searched;
the system further comprises:
the information acquisition unit is used for acquiring basic information of each service node of the cluster, wherein the basic information comprises average CPU utilization rate, memory utilization rate and bandwidth utilization rate;
and the balance execution unit is used for selecting a target service node according to the basic information of each service node and the current load balance rule and distributing the target service node ip to the client.
3. A terminal, comprising:
a processor;
a memory for storing instructions for execution by the processor;
wherein the processor is configured to perform the method of claim 1.
4. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method of claim 1.
CN202110940121.4A 2021-08-17 2021-08-17 Load balancing access domain name coordination method, system, terminal and storage medium Active CN113395361B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110940121.4A CN113395361B (en) 2021-08-17 2021-08-17 Load balancing access domain name coordination method, system, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110940121.4A CN113395361B (en) 2021-08-17 2021-08-17 Load balancing access domain name coordination method, system, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN113395361A CN113395361A (en) 2021-09-14
CN113395361B true CN113395361B (en) 2021-11-05

Family

ID=77622869

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110940121.4A Active CN113395361B (en) 2021-08-17 2021-08-17 Load balancing access domain name coordination method, system, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN113395361B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101431539A (en) * 2008-12-11 2009-05-13 华为技术有限公司 Domain name resolution method, system and apparatus
CN109347947A (en) * 2018-10-15 2019-02-15 郑州云海信息技术有限公司 A kind of method of load balancing, name server and cluster nas server
CN111711716A (en) * 2020-08-20 2020-09-25 苏州浪潮智能科技有限公司 Domain name resolution method, device and equipment and readable storage medium
CN112615945A (en) * 2020-12-18 2021-04-06 平安科技(深圳)有限公司 Domain name resolution record management method and device, computer equipment and storage medium
CN112954089A (en) * 2021-04-12 2021-06-11 平安科技(深圳)有限公司 Method, device and equipment for analyzing data and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2159983A1 (en) * 2008-08-26 2010-03-03 BRITISH TELECOMMUNICATIONS public limited company Content distribution network
US8954028B2 (en) * 2008-09-25 2015-02-10 Telecommunication Systems, Inc. Geo-redundant and high reliability commercial mobile alert system (CMAS)

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101431539A (en) * 2008-12-11 2009-05-13 华为技术有限公司 Domain name resolution method, system and apparatus
CN109347947A (en) * 2018-10-15 2019-02-15 郑州云海信息技术有限公司 A kind of method of load balancing, name server and cluster nas server
CN111711716A (en) * 2020-08-20 2020-09-25 苏州浪潮智能科技有限公司 Domain name resolution method, device and equipment and readable storage medium
CN112615945A (en) * 2020-12-18 2021-04-06 平安科技(深圳)有限公司 Domain name resolution record management method and device, computer equipment and storage medium
CN112954089A (en) * 2021-04-12 2021-06-11 平安科技(深圳)有限公司 Method, device and equipment for analyzing data and storage medium

Also Published As

Publication number Publication date
CN113395361A (en) 2021-09-14

Similar Documents

Publication Publication Date Title
CN102137014B (en) Resource management method, system and resource manager
US9104492B2 (en) Cloud-based middlebox management system
CN108924268B (en) Container cloud service system and pod creation method and device
CN103685583A (en) Method and system for resolving domain names
CN110198332B (en) Scheduling method and device for content distribution network node and storage medium
CN103701916A (en) Dynamic load balancing method of distributed storage system
CN109167674A (en) Methods of marking, domain name system DNS dispatching method and the server of service node
CN105515977B (en) Method, device and system for acquiring transmission path in network
CN112965824A (en) Message forwarding method and device, storage medium and electronic equipment
CN107105013B (en) File processing method, server, terminal and system
EP4068725A1 (en) Load balancing method and related device
US9519441B1 (en) Automated storage provisioning and management using a centralized database
CN111694756A (en) Application program testing method and device
CN111078369A (en) Virtual machine distribution method and device under cloud computer and server
CN110166507A (en) More resource regulating methods and device
CN109639796A (en) A kind of implementation of load balancing, device, equipment and readable storage medium storing program for executing
CN110198267B (en) Traffic scheduling method, system and server
CN113395361B (en) Load balancing access domain name coordination method, system, terminal and storage medium
CN108347465B (en) Method and device for selecting network data center
CN109451090B (en) Domain name resolution method and device
KR20170014804A (en) Virtual machine provisioning system and method for cloud service
CN112491592A (en) Storage resource grouping method, system, terminal and storage medium
Wang et al. A clustering-based approach for virtual network function mapping and assigning
CN114466031B (en) CDN system node configuration method, device, equipment and storage medium
CN214202379U (en) Distributed shared file 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
GR01 Patent grant
GR01 Patent grant