Disclosure of Invention
The invention aims to provide a domain name resolution method, a system, node equipment and a storage medium, wherein a domain name resolution system can be realized by a software defined network, so that the problems of high realization cost and low reliability, which are easily caused by specially realizing a service resolution server, are avoided.
In order to solve the above technical problems, the present invention provides a domain name resolution method applied to a software defined network, where the software defined network includes a plurality of node devices, each node device is provided with a service virtual machine, and the method includes:
the master node equipment transmits domain name resolution configuration to all the node equipment and controls all the node equipment to start domain name resolution service; the domain name resolution configuration comprises a domain name mapping relation, wherein the domain name mapping relation records a mapping relation between a preset domain name and a network address of the service virtual machine;
when receiving a domain name resolution request sent by user equipment, the master node equipment selects domain name resolution equipment from all the node equipment and sends the domain name resolution request to the domain name resolution equipment;
and the domain name resolution device obtains a target network address corresponding to the domain name in the domain name resolution request according to the domain name resolution configuration, and sends the target network address to the user device so that the user device can access the corresponding service virtual machine by using the target network address.
Optionally, the domain name mapping relationship includes a mapping relationship between a preset domain name and network addresses of a plurality of service virtual machines, and a plurality of service virtual machines corresponding to the same preset domain name provide the same service;
the domain name resolution device obtains a target network address corresponding to the domain name in the domain name resolution request according to the domain name resolution configuration, and the method comprises the following steps:
the domain name resolution device obtains a target domain name mapping relation corresponding to the domain name in the domain name resolution request from the domain name resolution configuration;
and determining the target network address from a plurality of network addresses contained in the target domain name mapping relation.
Optionally, the determining the target network address from the plurality of network addresses contained in the target domain name mapping relationship includes:
and the domain name resolution equipment alternately determines the target network address from a plurality of network addresses contained in the target domain name mapping relation according to a preset sequence.
Optionally, the domain name resolution configuration includes a domain name mapping relationship corresponding to each piece of user equipment, and the number of network addresses included in the domain name mapping relationship corresponding to the user equipment and the preset level of the user equipment are in a positive correlation relationship.
Optionally, the method further comprises:
the master node equipment collects the hardware resource utilization rate of all the node equipment in real time;
correspondingly, the selecting the domain name resolution device from all the node devices comprises the following steps:
and the master node equipment takes the node equipment with the lowest hardware resource utilization rate as the domain name resolution equipment according to the hardware resource utilization rates of all the node equipment.
Optionally, the method further comprises:
when receiving configuration update information, the master node equipment determines corresponding configuration update content and configuration update operation type according to the configuration update information;
performing configuration updating operation in the domain name resolution configuration according to the configuration updating operation type so as to update the configuration updating content into the domain name resolution configuration;
and issuing the updated domain name resolution configuration to all the node devices.
Optionally, the method further comprises:
the master node device receives the configuration update information through an application programming interface.
The invention also provides a domain name resolution system applied to a software defined network, wherein the software defined network comprises a plurality of node devices, each node device is provided with a service virtual machine, and the system comprises:
the main node equipment is used for issuing domain name resolution configuration to all the node equipment and controlling all the node equipment to start domain name resolution service; the domain name resolution configuration comprises a domain name mapping relation, wherein the domain name mapping relation records a mapping relation between a preset domain name and a network address of the service virtual machine; when a domain name resolution request sent by user equipment is received, selecting domain name resolution equipment from all node equipment, and sending the domain name resolution request to the domain name resolution equipment;
the domain name resolution device is configured to obtain a target network address corresponding to the domain name in the domain name resolution request according to the domain name resolution configuration, and send the target network address to the user equipment, so that the user equipment uses the target network address to access a corresponding service virtual machine.
The present invention also provides a node device comprising:
a memory for storing a computer program;
and a processor for implementing the domain name resolution method as described above when executing the computer program.
The present invention also provides a computer readable storage medium having stored therein computer executable instructions that when loaded and executed by a processor implement a domain name resolution method as described above.
The invention provides a domain name resolution method, which is applied to a software defined network, wherein the software defined network comprises a plurality of node devices, and each node device is provided with a service virtual machine, and the method comprises the following steps: the master node equipment transmits domain name resolution configuration to all the node equipment and controls all the node equipment to start domain name resolution service; the domain name resolution configuration comprises a domain name mapping relation, wherein the domain name mapping relation records a mapping relation between a preset domain name and a network address of the service virtual machine; when receiving a domain name resolution request sent by user equipment, the master node equipment selects domain name resolution equipment from all the node equipment and sends the domain name resolution request to the domain name resolution equipment; and the domain name resolution device obtains a target network address corresponding to the domain name in the domain name resolution request according to the domain name resolution configuration, and sends the target network address to the user device so that the user device can access the corresponding service virtual machine by using the target network address.
It can be seen that the present invention can provide domain name resolution services using all node devices in a software defined network. Specifically, a main node device in the software defined network can issue domain name resolution configuration to all node devices and control all node devices to start domain name resolution service; and then, when the main node equipment receives the domain name resolution request sent by the user equipment, selecting domain name resolution equipment from all the node equipment, and sending the domain name resolution request to the domain name resolution equipment, wherein the domain name resolution equipment obtains a target network address corresponding to the domain name in the domain name resolution request according to the domain name resolution configuration. Because all node devices in the software defined network can provide domain name resolution service, restarting or downtime of any node can not affect normal domain name resolution service; in addition, as each node device is provided with a service virtual machine, namely, each node device is also provided with other service at the same time, the invention does not need to independently realize a special service analysis server, and can realize domain name analysis service on the basis of the existing hardware device. The invention also provides a domain name resolution system, node equipment and a computer readable storage medium, which have the beneficial effects.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the illustrated embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Domain name resolution system (DNS, domain Name System) is a common system in computer networks. In the related art, a domain name resolution system is generally composed of a single service resolution server. However, this means that if the user needs to use the domain name resolution service, a dedicated service resolution server needs to be implemented separately, and the implementation cost is high; moreover, even if a single service resolution server suffers from a failure, it is difficult to reliably provide domain name resolution services to users. In view of this, the present invention can provide a domain name resolution method, which can implement a domain name resolution system by a software defined network, so as to avoid the problems of higher implementation cost and lower reliability that are easily caused by implementing a service resolution server.
For ease of understanding, please refer to fig. 1, fig. 1 is a block diagram of a domain name resolution system according to an embodiment of the present invention. The system is arranged in a software defined network (SDN network, software Defined Network), the software defined network comprises a plurality of node devices 10, each node device is provided with a domain name resolution service 1 and a business virtual machine 2, wherein the domain name resolution service 1 is used for providing domain name resolution services for users, the business virtual machine 2 is used for providing other business services for users, and the domain name resolution service 1 is a service added to the node device 10 in the follow-up mode and is not a native service in the node device 10. Each service virtual machine 2 is further provided with a network address (IP address). It should be noted that the number of service virtual machines 2 set in each node device 10 may be plural and may not be fixed, and may be set according to actual application requirements. In other words, the node apparatus 10 is a container of each service virtual machine 2. In particular, the node apparatus 10 further includes a master node apparatus 11, and the master node apparatus 11 may manage each node apparatus 10 in addition to providing the service of the general node apparatus 10. For example, in the embodiment of the present invention, the master node device 11 may centrally control the domain name resolution service 1 in all the node devices 10, may issue domain name resolution configurations for each node device 10, and may centrally turn on or off the domain name resolution service 1 in each node device 10. And, each time domain name resolution service is provided, the master node device 11 will select the domain name resolution device 12 from all the node devices 10 (including itself) as the node device 10 that actually provides the domain name resolution service. That is, the domain name resolution request sent by the user equipment (not shown) is forwarded to the domain name resolution device 12, and the domain name resolution device 12 needs to resolve according to the domain name resolution configuration to obtain the network address corresponding to the domain name required to be resolved by the user equipment, and sends the network address to the user equipment. It is worth noting that the domain name resolution device 12 may be any node device 10 in a software defined network, and the selection of the domain name resolution device 12 is dynamic, meaning that each time the system provides domain name resolution services outwards, the corresponding domain name resolution device 12 may change. Further, it is noted that the present system may be a domain name resolution system specific to the software defined network. In other words, the domain name resolution configuration owned by each node device 10 holds the mapping relationship between each preset domain name and the network address of each service virtual machine 2 in the present network. Furthermore, the embodiment of the invention can not need to independently realize a domain name resolution server in the software defined network, but can additionally add domain name resolution functions in the existing node equipment 10 for providing other business services for users in the software defined network, and all the node equipment 10 in the software defined network can provide domain name resolution services, thereby not only reducing the cost for providing domain name resolution services, but also overcoming the defect that a small number of domain name resolution servers cannot provide reliable domain name resolution services.
It should be noted that, the embodiment of the present invention is not limited to the specific hardware type corresponding to the node device 10, and may be set according to the actual application requirement, for example, any type of server may be used. The embodiment of the present invention is not limited to the specific number of node devices 10, and may be set according to the actual application requirements.
It should be further noted that the system structure shown in fig. 1 in the embodiment of the present invention is merely a simplified structure. Other devices or means may also be included in an actual software defined network, such as distributed routers and the like. The present invention is not limited to a specific network architecture of a software defined network, and reference may be made to the related art of a software defined network.
Based on the above description of the system structure, the domain name resolution method provided by the embodiment of the invention will be described in detail. Referring to fig. 2, fig. 2 is a flowchart of a domain name resolution method according to an embodiment of the invention. The method is applied to a software defined network, the software defined network comprises a plurality of node devices, each node device is provided with a service virtual machine, and the method comprises the following steps:
s201, the master node equipment transmits domain name resolution configuration to all the node equipment, and controls all the node equipment to start domain name resolution service; the domain name resolution configuration comprises a domain name mapping relation, and the domain name mapping relation records a mapping relation between a preset domain name and a network address of the service virtual machine.
In the embodiment of the invention, the master node device can perform centralized management and control on domain name resolution services of all node devices. Specifically, the master node device service issues domain name resolution configuration to all node devices, and can control all node devices to start or close domain name resolution service. In this way, the user can edit the domain name resolution configuration by operating the master node device, and can start or close domain name resolution services of all node devices by operating the master node device. It can be understood that the user needs to operate on the user equipment to edit the domain name resolution configuration or open and close the domain name resolution service, and the user equipment sends the update information of the domain name resolution configuration or the service opening information and the service closing information for representing the opening and closing of the domain name resolution service to the master node equipment so as to trigger the master node equipment to perform configuration and issue or start and close the domain name resolution service. Thus, for ease of use by the user, user-side software may be provided in the user device. The user side software is used for operating the main node equipment and is provided with a visual interface. The user can operate in this visual interface and send the operation result (i.e., domain name resolution configuration update information, service on information, or service off information) to the master node device through the user device. It should be noted that the embodiment of the present invention is not limited to how the user equipment sends the domain name resolution configuration update information, the service start information, or the service close information to the host node device, for example, the system may be provided with an application programming interface (API interface, application Programming Interface), and the user equipment may send the above information to the host node device based on this interface.
Further, in the embodiment of the present invention, the domain name resolution configuration includes a domain name mapping relationship, where the domain name mapping relationship records a mapping relationship between a preset domain name and a network address of the service virtual machine. The embodiment of the invention is not limited to a specific preset domain name, and can be set according to actual application requirements. In addition, the mapping relationship between the same preset domain name and the network addresses of the plurality of service virtual machines can be recorded in the same domain name mapping relationship, that is, the preset domain name can establish the mapping relationship with the plurality of network addresses. It can be understood that multiple business virtual machines corresponding to the same preset domain name need to provide the same business service. In this way, when the user equipment accesses the domain name, the domain name resolution equipment can determine a target network address from a plurality of selectable network addresses and send the target network address to the user equipment, so that the situation that the user equipment cannot access the service virtual machine corresponding to the domain name due to the failure or downtime of a single service virtual machine can be avoided, and the reliability of service can be improved. It should be noted that, the embodiment of the present invention is not limited to how many network addresses the preset domain name can correspond to, and can be set according to actual application requirements.
S202, when receiving a domain name resolution request sent by user equipment, the master node equipment selects domain name resolution equipment from all the node equipment and sends the domain name resolution request to the domain name resolution equipment.
In the embodiment of the invention, the main node equipment can also be responsible for shunting domain name resolution traffic of the user equipment. Specifically, when receiving a domain name resolution request sent by a user device, the master node device may select a domain name resolution device from all node devices, and send the domain name resolution request to the domain name resolution device, so that the domain name resolution device provides domain name resolution service for the user device. Because the software defined network comprises a plurality of node devices, and each node device comprises the same domain name resolution configuration, the system can be used as domain name resolution devices, namely the domain name resolution system can comprise a plurality of domain name resolution devices, so that the reliability of the system can be improved, and reliable regional name resolution service can be provided under the condition of a small number of node device faults or downtime.
Further, in order to realize load balancing, when determining the domain name resolution device, the master node device may also select according to the hardware resource utilization rate of each node device. Specifically, since each node device is also provided with other service at the same time, at the time of receiving the domain name resolution request, the hardware resource usage rates corresponding to the node devices are different, and some node devices may have higher hardware resource usage rates, while others may have lower hardware resource usage rates. In order to avoid shunting the domain name resolution request to the node equipment with higher hardware resource utilization rate and higher current load, the master node equipment can collect the hardware resource utilization rates of all the node equipment in advance, and when receiving the domain name resolution request sent by the user equipment, the node equipment with the lowest hardware resource utilization rate is used as the domain name resolution equipment. It is noted that the collection of hardware resource usage by the master node device may be periodic or real-time. In order to improve the reliability of the hardware resource utilization rate, the master node device may collect the hardware resource utilization rates of all the node devices in real time.
Based on this, the method may further include:
step 11: the master node equipment collects the hardware resource utilization rate of all the node equipment in real time;
correspondingly, the selecting the domain name resolution device from all the node devices comprises the following steps:
step 21: and the master node equipment takes the node equipment with the lowest hardware resource utilization rate as the domain name resolution equipment according to the hardware resource utilization rates of all the node equipment.
It should be noted that, the embodiment of the present invention is not limited to what kind of hardware resource usage rate the master node device will collect, and may be, for example, the occupancy rate of a CPU (central processing unit) or the occupancy rate of a memory. Because the occupancy rate of the CPU is generally higher under the condition of higher occupancy rate of the memory, in the embodiment of the invention, the master node device can collect the occupancy rate of the memory of each node device in real time and select the domain name resolution device according to the occupancy rate of the memory.
And S203, the domain name resolution device obtains a target network address corresponding to the domain name in the domain name resolution request according to the domain name resolution configuration, and sends the target network address to the user equipment so that the user equipment can access the corresponding service virtual machine by using the target network address.
As described above, since all node devices are provided with the same domain name resolution configuration, after being set as a domain name resolution device, they can obtain a target network address corresponding to a domain name in a domain name resolution request according to the unified domain name resolution configuration, and can send this target network address to a user device, so that the user device uses this target network address to access a corresponding service virtual machine.
Further, the mapping relationship between the domain name may include a mapping relationship between a preset domain name and network addresses of a plurality of service virtual machines, where a plurality of service virtual machines corresponding to the same preset domain name provide the same service. Further, when determining that the target mapping relationship corresponding to the domain name requested by the user equipment includes a plurality of network addresses, the domain name resolution device may select a target network address from the plurality of network addresses. In order to provide different domain name resolution services for different users, the domain name resolution configuration may further include domain name mapping relationships corresponding to each user device, and the number of network addresses included in the domain name mapping relationships corresponding to the user devices is in positive correlation with a preset level of the user device. For example, the user group is divided into important users, secondary users and general users, the important user access service quality requirement is higher, the secondary user access requirement is lower than that of the important users, and the general user access requirement is not higher, so when the domain name resolution configuration is set, different domain names can be provided for different users, the number of service network addresses corresponding to the different domain names is different, and as the user class is improved, the domain name (such as www.zy.com) of the important user can correspond to 5 virtual machine IPs, the domain name (such as www.cy.com) of the secondary user can correspond to 3 virtual machine IPs, and the domain name (such as www.yb.com) of the general user corresponds to 1 virtual machine IP.
Based on this, the obtaining, by the domain name resolution device, the target network address corresponding to the domain name in the domain name resolution request according to the domain name resolution configuration may include:
step 31: the domain name resolution device obtains a target domain name mapping relation corresponding to the domain name in the domain name resolution request from the domain name resolution configuration;
step 32: and determining the target network address from a plurality of network addresses contained in the target domain name mapping relation.
It should be noted that, the embodiment of the present invention does not limit how the domain name resolution device determines the target network address from the plurality of network addresses, and the target network address may be selected according to actual application requirements, for example, may be selected at will, or may be selected according to a preset sequence. When selecting based on the preset sequence, the preset sequence can be the priority sequence, namely the domain name resolution equipment can determine the target network address according to the priority sequence of each network address; the order may also be a polling order, i.e. the domain name resolution device may determine the target network address from the network addresses in turn according to the preset order. Considering that the load balancing of the service virtual machine can be realized by alternately selecting the target network addresses, in the embodiment of the invention, the domain name resolution device can determine the target network address from a plurality of network addresses contained in the target domain name mapping relationship according to a preset sequence.
Based on this, the determining the target network address from the plurality of network addresses contained in the target domain name mapping relationship includes:
step 41: and the domain name resolution equipment alternately determines the target network address from a plurality of network addresses contained in the target domain name mapping relation according to a preset sequence.
It should be noted that, the embodiments of the present invention are not limited to how the domain name resolution device polls to obtain the target network address, and reference may be made to the related art of polling policies.
Furthermore, in order to achieve a better load balancing effect, the domain name resolution device may further determine the hardware resource utilization rate of the node device where the service virtual machines corresponding to the plurality of network addresses are located, and use the network address of the service virtual machine belonging to the node device with the lowest hardware resource utilization rate as the target network address, that is, the network address of the service virtual machine belonging to the node device with the lowest load and least busy as the target network address. The embodiment of the invention does not limit how the domain name resolution device obtains the hardware resource utilization rate of the node device, and the domain name resolution device can obtain the hardware resource utilization rate of the node device where the service virtual machines corresponding to the plurality of network addresses are located from the master node device because the master node device has counted the hardware resource utilization rate of each node device.
Based on this, the determining the target network address from the plurality of network addresses contained in the target domain name mapping relationship may include:
step 51: determining the hardware resource utilization rate of node equipment where the service virtual machine corresponding to each network address is located;
step 52: and taking the network address of the service virtual machine belonging to the node equipment with the lowest hardware resource utilization rate as the target network address.
Based on the above embodiments, the present invention can provide domain name resolution services using all node devices in a software defined network. Specifically, a main node device in the software defined network can issue domain name resolution configuration to all node devices and control all node devices to start domain name resolution service; and then, when the main node equipment receives the domain name resolution request sent by the user equipment, selecting domain name resolution equipment from all the node equipment, and sending the domain name resolution request to the domain name resolution equipment, wherein the domain name resolution equipment obtains a target network address corresponding to the domain name in the domain name resolution request according to the domain name resolution configuration. Because all node devices in the software defined network can provide domain name resolution service, restarting or downtime of any node can not affect normal domain name resolution service; in addition, as each node device is provided with a service virtual machine, namely, each node device is also provided with other service at the same time, the invention does not need to independently realize a special service analysis server, and can realize domain name analysis service on the basis of the existing hardware device.
Based on the above embodiments, the above domain name resolution method will be described in detail based on a specific system diagram. Referring to fig. 3, fig. 3 is a schematic diagram of a virtualization management system according to an embodiment of the invention. The method mainly comprises the following steps:
initializing SDN, and creating an SDN switch, SDN configuration management and the like;
step 2, creating SDN networks and subnets, wherein a large number of virtual machines use the SDN networks;
step 3, adding DNS records in an SDN configuration management-advanced function-DNS server, wherein one domain name can correspond to a plurality of IPs, and the added IPs are the IPs of virtual machines in an SDN network; adding a DNS record and issuing the DNS record to each computing node;
step 4, the IP in the DNS records corresponds to the IP of the virtual machine in the SDN;
and 5, accessing a certain service by the user, wherein the service is provided by a plurality of virtual machines, when the domain name accessed by the user accesses to the computing nodes, the IP can be resolved (each computing node can be DNS resolved and the resolved IP polls one IP), so that the corresponding service virtual machine is accessed, when the access traffic is large, the service IP is provided by polling, and the DNS resolution can be used for realizing the responsible balance for the virtual machine (different IP returned by different user access DNS resolution, and the IP returned to the virtual machine by polling provides service).
Based on the above embodiments, a detailed description will be given below of a method for updating domain name resolution configuration. In one possible case, the method may further comprise:
s301, when the master node equipment receives the configuration update information, corresponding configuration update content and configuration update operation type are determined according to the configuration update information.
As described above, the user may perform an editing operation on the domain name resolution configuration in the user device, and the edited configuration update content and the configuration update operation type may be transmitted to the master node device in the form of configuration update information, so that the master node device performs domain name resolution configuration update. It is understood that the configuration update operation type may include addition, modification and deletion, and the configuration update content may include mapping relationships of addition, modification and deletion. It should be noted that, the embodiment of the present invention is not limited to a specific organization manner of the configuration update information, and relates to an interaction manner between the master node device and the user device. For example, the master node device in the embodiment of the present invention may receive the configuration update information through an application programming interface (API interface), and the API interface may specifically be a REST API. The embodiment of the invention can realize two REST API interfaces, one is used for adding, deleting and checking the mapping relation in the domain name resolution configuration, and the other is used for starting or closing the domain name resolution service. In order to update the domain name resolution configuration, the embodiment of the invention can also provide three messages, which are respectively:
1. increasing the mapping relation:
the message is a POST message. Wherein, the "http:// x.x.x.x: xxxx/sdnconfig/dnss" is the domain name to which the message is sent. In the request body (post body) of the message, the content contained in "dns" is a newly added mapping relationship, "tenant_id" is an identifier of the mapping relationship, "domain_name" is a domain name, "ip_addrs" is a network address corresponding to "domain_name", where it can be seen that the domain name www.123.com can correspond to two network addresses of 1.X.x.x and 2. X.x.x.
2. Modifying the mapping relation:
the message is a PUT message. Wherein, the "http:// x.x.x.x: xxxx/sdnconfig/dnss/< id >/" is the domain name to which the message is sent, and it is worth noting that < id > is the identification of the mapping relation to be modified. In the request body (body) of the message, "dns" contains modified domain name resolution configuration, and "ip_addrs" is a modified network address in the mapping relationship to be modified.
3. Deleting the mapping relation:
DELETE:
url:http://x.x.x.x:xxxx/sdnconfig/dnss/<id>/
body:
no body is required.
The message is a DELETE message. Where "http:// x.x.x: xxxx/sdnconfig/dnss/< id >/" is the domain name to which the message is directed, it should be noted that < id > is the identity of the mapping relationship to be deleted. The message does not require a requestor. It should be noted that, if the mapping relationship to be deleted is the last mapping relationship in the domain name resolution configuration, the domain name resolution service will be automatically turned off after deletion.
It should be noted that the above three messages are only used as examples, and are not used to limit the specific content of the configuration update information. In other cases, the above three messages may also cover other contents, such as user information, etc.
S302, performing configuration updating operation in the domain name resolution configuration according to the configuration updating operation type so as to update the configuration updating content into the domain name resolution configuration;
and S303, the updated domain name resolution configuration is issued to all the node devices.
The domain name resolution system, the node device and the computer readable storage medium provided by the embodiments of the present invention are described below, and the domain name resolution system, the node device and the computer readable storage medium described below and the domain name resolution method described above may be referred to correspondingly.
Referring to fig. 1, fig. 1 is a block diagram of a domain name resolution system according to an embodiment of the present invention. The domain name resolution system is applied to a software defined network, the software defined network comprises a plurality of node devices 10, each node device 10 is provided with a service virtual machine 2, and the system comprises:
a master node device 11, configured to issue a domain name resolution configuration to all the node devices 10, and control all the node devices 10 to start a domain name resolution service 1; the domain name resolution configuration comprises a domain name mapping relation, wherein the domain name mapping relation records a mapping relation between a preset domain name and a network address of the service virtual machine; when receiving a domain name resolution request sent by a user device, selecting a domain name resolution device 12 from all the node devices 10, and sending the domain name resolution request to the domain name resolution device 12;
the domain name resolution device 12 is configured to obtain, according to the domain name resolution configuration, a target network address corresponding to the domain name in the domain name resolution request, and send the target network address to the user device, so that the user device uses the target network address to access a corresponding service virtual machine.
Optionally, the domain name mapping relationship includes a mapping relationship between a preset domain name and network addresses of a plurality of service virtual machines, and a plurality of service virtual machines corresponding to the same preset domain name provide the same service;
optionally, the domain name resolution device 12 may be further configured to obtain, from the domain name resolution configuration, a target domain name mapping relationship corresponding to a domain name in the domain name resolution request; and determining the target network address from a plurality of network addresses contained in the target domain name mapping relation.
Optionally, the domain name resolution device 12 may be further configured to determine the target network address alternately from a plurality of network addresses included in the target domain name mapping relationship according to a preset order.
Optionally, the domain name resolution device 12 may be further configured to determine a hardware resource utilization rate of the node device 10 where the service virtual machine corresponding to each network address is located; and taking the network address of the service virtual machine belonging to the node equipment 10 with the lowest hardware resource utilization rate as the target network address.
Optionally, the master node device 11 may be further configured to collect, in real time, the hardware resource usage of all the node devices 10; according to the hardware resource usage rates of all the node devices 10, the node device 10 with the lowest hardware resource usage rate is used as the domain name resolution device 12.
Optionally, the master node device 11 may be further configured to determine, when receiving configuration update information, corresponding configuration update content and a configuration update operation type according to the configuration update information; performing configuration updating operation in the domain name resolution configuration according to the configuration updating operation type so as to update the configuration updating content into the domain name resolution configuration; and issuing the updated domain name resolution configuration to all the node devices 10.
Optionally, the master node device 11 may be further configured to receive the configuration update information through an application programming interface.
Referring to fig. 4, fig. 4 is a block diagram of a node device according to an embodiment of the present invention, and the embodiment of the present invention provides a node device 10, including a processor 101 and a memory 102; wherein the memory 102 is used for storing a computer program; the processor 101 is configured to execute the domain name resolution method provided in the foregoing embodiment when executing the computer program.
For the specific process of the domain name resolution method, reference may be made to the corresponding content provided in the foregoing embodiment, and no further description is given here.
The memory 102 may be a carrier for storing resources, such as a read-only memory, a random access memory, a magnetic disk, or an optical disk, and the storage mode may be transient storage or permanent storage.
In addition, the node device 10 further includes a power supply 103, a communication interface 104, an input-output interface 105, and a communication bus 106; wherein, the power supply 103 is configured to provide an operating voltage for each hardware device on the node device 100; the communication interface 104 can create a data transmission channel between the node device 100 and an external device, and the communication protocol to be followed by the communication interface is any communication protocol applicable to the technical solution of the present invention, which is not specifically limited herein; the input/output interface 105 is used for obtaining external input data or outputting external output data, and the specific interface type thereof may be selected according to the specific application requirement, which is not limited herein.
The embodiment of the invention also provides a computer readable storage medium, and a computer program is stored on the computer readable storage medium, and when the computer program is executed by a processor, the steps of the domain name resolution method of any embodiment are realized.
Since the embodiments of the computer readable storage medium portion and the embodiments of the domain name resolution method portion correspond to each other, the embodiments of the storage medium portion refer to the description of the embodiments of the domain name resolution method portion, and are not repeated herein.
In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The domain name resolution method, the domain name resolution system, the node equipment and the storage medium provided by the invention are described in detail. The principles and embodiments of the present invention have been described herein with reference to specific examples, the description of which is intended only to facilitate an understanding of the method of the present invention and its core ideas. It should be noted that it will be apparent to those skilled in the art that various modifications and adaptations of the invention can be made without departing from the principles of the invention and these modifications and adaptations are intended to be within the scope of the invention as defined in the following claims.