CN114422475A - IP address switching method and device based on object storage and computer equipment - Google Patents

IP address switching method and device based on object storage and computer equipment Download PDF

Info

Publication number
CN114422475A
CN114422475A CN202011081366.8A CN202011081366A CN114422475A CN 114422475 A CN114422475 A CN 114422475A CN 202011081366 A CN202011081366 A CN 202011081366A CN 114422475 A CN114422475 A CN 114422475A
Authority
CN
China
Prior art keywords
address
domain name
target domain
addresses
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011081366.8A
Other languages
Chinese (zh)
Inventor
陈健健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202011081366.8A priority Critical patent/CN114422475A/en
Publication of CN114422475A publication Critical patent/CN114422475A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning

Abstract

The invention provides an IP address switching method, device and computer equipment based on object storage, relating to the technical field of computers and comprising the following steps: acquiring a corresponding relation table of a pre-maintained domain name and an IP address operation index table; determining a target domain name with a fault, and determining an IP address corresponding to the target domain name based on the domain name and IP address corresponding relation table; determining an operation index of the IP address corresponding to the target domain name based on the IP address operation index table; and selecting the optimal IP address to be bound with the target domain name based on the operation index of the IP address corresponding to the target domain name. The invention can solve the technical problems of low switching efficiency and high error rate in the prior art.

Description

IP address switching method and device based on object storage and computer equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an IP address switching method and apparatus based on object storage, and a computer device.
Background
At present, a user accesses an object storage service through domain names, each domain name binds a plurality of IP addresses, and if an IP (Internet Protocol) address fails, the user cannot access the object storage service. The related art proposes that if an IP address fails, an available destination IP address needs to be judged manually, the flow of the failed IP address is switched to the destination IP address, and in addition, domain name resolution records need to be changed manually to complete the flow switching work. However, the above operations take a long time, which results in low efficiency of switching IP addresses, and all the operations are manual operations, which also results in a problem of high error rate in the process of switching IP addresses.
Disclosure of Invention
The invention aims to provide an IP address switching method, an IP address switching device and computer equipment based on object storage, so as to solve the technical problems of low switching efficiency and high error rate in the prior art.
In a first aspect, an embodiment of the present invention provides an IP address switching method based on object storage, including: acquiring a corresponding relation table of a pre-maintained domain name and an IP address operation index table; determining a target domain name with a fault, and determining an IP address corresponding to the target domain name based on the domain name and IP address corresponding relation table; determining an operation index of the IP address corresponding to the target domain name based on the IP address operation index table; and selecting the optimal IP address to be bound with the target domain name based on the operation index of the IP address corresponding to the target domain name.
In one embodiment, before the step of obtaining the operation index table of the pre-maintained IP address, the method includes: periodically collecting the operation indexes of all IP addresses; and updating the collected operation indexes of all the IP addresses in the IP address operation index table.
In one embodiment, the operation index at least includes traffic, remaining bandwidth, network delay, and packet loss rate.
In one embodiment, the step of selecting an optimal IP address to bind with the target domain name based on an operation index of the IP address corresponding to the target domain name includes: determining a first IP address of which the residual bandwidth is larger than the flow of the IP address with the fault in the IP address corresponding to the target domain name; if the number of the first IP addresses is multiple, determining a second IP address with the minimum packet loss rate in the multiple first IP addresses; if the second IP address comprises a plurality of IP addresses, determining a third IP address with the minimum network delay in the plurality of second IP addresses; and binding the third IP address with the target domain name.
In an embodiment, the step of selecting an optimal IP address to bind with the target domain name based on an operation index of the IP address corresponding to the target domain name further includes: if the first IP address comprises one, binding the first IP address with the target domain name; or if the first IP address comprises a plurality of IP addresses and the second IP address comprises one IP address, binding the second IP address with the target domain name.
In one embodiment, the table of correspondence between domain names and IP addresses includes whether the table is a backup identifier; determining the IP address corresponding to the target domain name based on the corresponding relation table of the domain name and the IP address, wherein the step comprises the following steps: and determining all IP addresses with backup identifications corresponding to the target domain name based on the corresponding relation table of the domain name and the IP addresses.
In a second aspect, an embodiment of the present invention provides an IP address switching apparatus based on object storage, including: the acquisition module is used for acquiring a corresponding relation table of a domain name and an IP address which are maintained in advance and an IP address operation index table; the first determining module is used for determining a target domain name with a fault and determining an IP address corresponding to the target domain name based on the domain name and IP address corresponding relation table; the second determining module is used for determining the operation index of the IP address corresponding to the target domain name based on the IP address operation index table; and the selection module is used for selecting the optimal IP address to be bound with the target domain name based on the operation index of the IP address corresponding to the target domain name.
In an embodiment, the apparatus further includes a maintenance module, specifically configured to: periodically collecting the operation indexes of all IP addresses; and updating the collected operation indexes of all the IP addresses in the IP address operation index table.
In a third aspect, an embodiment of the present invention provides a computer device, including a memory and a processor; the memory stores a computer program operable on the processor, and the processor executes the computer program to implement the steps of the method according to any of the preceding embodiments.
In a fourth aspect, embodiments of the present invention provide a computer readable storage medium having stored thereon machine executable instructions, which, when invoked and executed by a processor, cause the processor to perform the method of any of the preceding embodiments.
The method, the device and the computer equipment for switching the IP address based on the object storage, provided by the embodiment of the invention, are used for acquiring a corresponding relation table of a domain name and an IP address which are maintained in advance and an operation index table of the IP address, then determining the IP address corresponding to the target domain name based on a target domain name with a fault and the corresponding relation table of the domain name and the IP address, and determining the operation index of the IP address corresponding to the target domain name based on the operation index table of the IP address, so that the optimal IP address is selected to be bound with the target domain name based on the operation index of the IP address corresponding to the target domain name. The method can automatically determine the operation index of the IP address corresponding to the target domain name with faults on the basis of the corresponding relation table of the domain name and the IP address operation index table, so that the optimal IP address can be selected for switching based on the operation index of the IP address.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flowchart of an IP address switching method based on object storage according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a table of correspondence between domain names and IP addresses according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of another method for switching IP addresses based on object storage according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an IP address switching apparatus based on object storage according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. 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.
At present, object storage services are deployed in a plurality of regions throughout the country, different regions provide different domain names to the outside, the total number of the domain names is as many as several tens, and the number of IP addresses corresponding to each domain name is also more than ten, that is, the number of the integrally related IP addresses is as many as several hundreds, and if only manual maintenance is relied on, the maintenance complexity is extremely high. In addition, the object storage domain name relates to tens of operators, when a certain IP address of the domain name has a fault, if a mode of artificially comprehensively judging an available destination IP address according to operation indexes such as residual bandwidth, packet loss rate, network delay and the like of the IP address and artificially changing the domain name configuration is adopted, more time is consumed, so that the efficiency of switching the IP is low, the error rate is high, errors are easy to occur, further, the efficiency of switching the IP address directly affects the user to access the object storage service, namely, the slower the IP address is switched, the longer the fault duration is, the greater the influence on the object storage service is. Based on this, the embodiment of the invention provides an IP address switching method, an IP address switching device and computer equipment based on object storage, so as to solve the technical problems of low switching efficiency and high error rate in the prior art.
To facilitate understanding of the present embodiment, first, a detailed description is given to an IP address switching method based on object storage disclosed in the present embodiment, referring to a schematic flow chart of the IP address switching method based on object storage shown in fig. 1, where the method mainly includes the following steps S102 to S108:
step S102, a pre-maintained domain name and IP address corresponding relation table and an IP address operation index table are obtained. The domain name and IP address correspondence table may be used to represent a mapping relationship between a domain name and an IP address, one domain name may correspond to a plurality of IP addresses, and the IP address operation index table may be used to represent operation indexes of each IP address, such as one or more of traffic, remaining bandwidth, network delay, and packet loss rate. In one embodiment, when configuring a domain name and an IP address corresponding to the domain name, the corresponding relationship between the domain name and the IP address may be stored in the table of the corresponding relationship between the domain name and the IP address, so as to maintain the table of the corresponding relationship between the domain name and the IP address; in addition, the operation indexes of all the IP addresses can be collected according to a preset period, so that the collected operation indexes are stored in an IP address operation index table, and the maintenance of the IP address operation index table is realized. Optionally, it can be seen that the domain name and IP address correspondence table and the IP address operation index table are stored in the database, so that the domain name and IP address correspondence table and the IP address operation index table are obtained from the database.
And step S104, determining the failed target domain name, and determining the IP address corresponding to the target domain name based on the corresponding relation table of the domain name and the IP address. In one embodiment, since the correspondence between the domain name and the IP address is stored in the domain name and IP address correspondence table, when a failed target domain name is determined, an IP address corresponding to the target domain name may be queried from the domain name and IP address correspondence table, where the IP address corresponding to the target domain name is one or more, for example, when a certain domain name cannot be resolved, the domain name is determined as the failed target domain name, and a plurality of IP addresses corresponding to the target domain name are determined.
And step S106, determining the operation index of the IP address corresponding to the target domain name based on the IP address operation index table. In one embodiment, since the IP address operation index table stores the operation index of each IP address, after the IP address corresponding to the target domain name is determined, the operation index of the IP address corresponding to the target domain name can be searched in the IP address operation index table.
And S108, selecting the optimal IP address to bind with the target domain name based on the operation index of the IP address corresponding to the target domain name. The binding of the optimal IP address and the target domain name may be understood as switching the traffic of the target domain name to the optimal IP address. In an embodiment, assuming that the operation index includes a traffic, a remaining bandwidth, a network delay, and a packet loss rate, the remaining bandwidth of each IP address may be compared with the traffic of the failed IP address, the network delay between each IP address is compared, and the packet loss rate between each IP address is compared, so that the IP address with the remaining bandwidth greater than the traffic of the failed IP address, the network delay being the minimum, and the packet loss rate being the minimum is determined as the optimal IP address, and the optimal IP address is bound with the target domain name, so as to implement the switching of the IP addresses.
The IP address switching method based on object storage provided in the embodiment of the present invention can automatically determine the operation index of the IP address corresponding to the failed target domain name on the basis of the domain name and IP address correspondence table and the IP address operation index table, so that an optimal IP address can be selected for switching based on the operation index of the IP address.
Before obtaining the operation index table of the pre-maintained IP address, an embodiment of the present invention provides an implementation manner of the operation index table of the pre-maintained IP address, which may periodically collect operation indexes of each IP address, and then update the collected operation indexes of each IP address in the operation index table of the IP address. Optionally, an acquisition period may be configured in advance, so that the operation indexes of each IP address are periodically acquired according to the acquisition period, where the operation indexes include at least traffic, residual bandwidth, network delay, and packet loss rate, and then the acquired operation indexes are updated to the IP address operation index table.
In order to facilitate understanding of the IP address operation index table, an IP address with an IP address ID of 1 is taken as an example for description, as shown in table 1 below, where data such as an acquisition time "2020-4-2510: 00: 00", an IP address "1.1.1.1", an IP address traffic "22685231223", a remaining bandwidth "34685443922", a network delay "43", and a packet loss rate "0" are shown in table 1. Wherein the unit of "IP address traffic" is bps; the unit of "network delay" is milliseconds ms; the unit of "packet loss rate" is percentage%, i.e. 5 represents 5%. It should be noted that the data referred to in table 1 are examples, and are not actual data.
TABLE 1
Figure BDA0002718091830000071
Figure BDA0002718091830000081
In addition, to facilitate understanding of step S102, an embodiment of the present invention provides a table of correspondence between domain names and IP addresses, referring to a schematic diagram of the table of correspondence between domain names and IP addresses shown in fig. 2, as shown in fig. 2, each region corresponds to a plurality of domain names, the domain names are distributed in different regions, and a user may use an object storage service by accessing the domain names, each domain name corresponds to a plurality of IP addresses, and different IP addresses belong to different network operators. For example, taking a region a and a region B as an example, the region a and the region B respectively represent physical locations of data centers where objects are stored, the region a corresponds to a domain name A1 and a domain name a2, the region B corresponds to a domain name B1 and a domain name B2, the domain name A1 may correspond to a plurality of IP addresses of a telecom, unicom, mobile, or other network operator, such as the domain name A1 may correspond to the IP addresses IP _ A1ct1 and IP _ A1ct2 of the network operator X, and may also correspond to the IP addresses IP _ A1cu1 and IP _ A1cu2 of the network operator Y.
In an embodiment, the domain name and IP address correspondence table includes whether the domain name and IP address correspondence table is a backup identifier, where the domain name and IP address correspondence table may also be used to represent whether each IP address provides a service to the outside, where an IP address that does not provide a service to the outside is also a backup IP address, and optionally, the backup identifier may be marked on the backup IP address to select from the backup IP addresses when determining an IP address corresponding to the target domain name. For example, the backup identifier may adopt a specified value, that is, whether the IP address provides a service to the outside may be represented by the specified value, for example, when the specified value is 1, it indicates that the IP address provides a service to the outside, and when the specified value is 0, it indicates that the IP address does not provide a service to the outside, the IP address is a standby IP address.
In practical application, all domain names and IP addresses stored in the object may be stored in a database in a table form, including a domain name table, an IP address table, and a domain name and IP address correspondence table. Illustratively, the embodiment of the present invention provides a domain name table as shown in table 2, where table 2 indicates that the domain name table may include data such as a domain name ID, a physical location of the domain name, and a domain name, and takes a domain name with a domain name ID of 1 as an example, where the physical location of the domain name is "region a", and the domain name is "a. In addition, an IP address table shown in table 3 is provided in the embodiment of the present invention, where table 3 shows that the IP address table may include data such as an IP address ID, an IP address, and an operator to which the IP address belongs, and the IP address is "1.1.1.1" taking the IP address with the IP address ID of 1 as an example, and the IP address belongs to a beijing telecom operator. In addition, the embodiment of the present invention further provides a table of correspondence between domain names and IP addresses as shown in table 4, where table 4 shows that the table of correspondence between domain names and IP addresses may include a domain name ID, an IP address ID and a designated numerical value, where the domain name ID1 corresponds to the IP address ID1, the IP address ID1 provides external services, the domain name ID1 also corresponds to the IP address 4, and the IP address ID4 does not provide external services (is a spare IP address). Combining tables 2, 3 and 4, it can be concluded that: the IP address corresponding to the a.beijing.domain.com domain name includes "1.1.1.1", "2.2.2.2", "3.3.3.3", "4.4.4.4". Wherein "1.1.1.1", "2.2.2" and "3.3.3.3" provide service to the outside, and "4.4.4.4" is a standby IP address for IP switching.
TABLE 2
Domain name ID Region of land Domain name
1 Region A a.beijing.domain.com
2 Region A b.beijing.domain.com
3 Region B a.shanghai.domain.com
... ... ...
Table 3:
Figure BDA0002718091830000091
Figure BDA0002718091830000101
TABLE 4
Domain name ID IP address ID Whether to use on line
1 1 1
1 2 1
1 3 1
1 4 0
... ... ...
On the basis of the table of correspondence between domain names and IP addresses provided in the above embodiment, the embodiment of the present invention provides an implementation manner for determining an IP address corresponding to a target domain name based on the table of correspondence between domain names and IP addresses, and all IP addresses having backup identifiers corresponding to the target domain name may be determined based on the table of correspondence between domain names and IP addresses, that is, an IP address corresponding to the target domain name is selected from IP addresses whose assigned numerical value is 0.
For the foregoing step S108, the step of selecting an optimal IP address to bind with the target domain name based on the operation index of the IP address corresponding to the target domain name may be performed according to the following methods shown in steps 1 to 6:
step 1, determining a first IP address of which the residual bandwidth is larger than the flow of the IP address with the fault in the IP address corresponding to the target domain name. In practical application, the remaining bandwidth of each backup IP address corresponding to the target domain name and the traffic of the failed IP address may be compared, so as to select the remaining bandwidth and the first IP address of the traffic of the failed IP address from each backup IP address corresponding to the target domain name.
And 2, if the first IP address comprises one, binding the first IP address with the target domain name. If only a unique first IP address is determined in each standby IP address corresponding to the target domain name, the first IP address is directly bound with the target domain name, and the flow of the IP address with the fault is switched to the first IP address.
And 3, if the first IP addresses comprise a plurality of first IP addresses, determining a second IP address with the minimum packet loss rate in the plurality of first IP addresses. If a plurality of first IP addresses are determined from the standby IP addresses corresponding to the target domain name, packet loss rates of the first IP addresses may be further compared, and the first IP address with the smallest packet loss rate is determined as the second IP address.
And 4, if the first IP address comprises a plurality of IP addresses and the second IP address comprises one IP address, binding the second IP address with the target domain name. And if the unique IP address with the minimum packet loss rate exists in the first IP address, determining the IP address as a second IP address, and binding the second IP address with the target domain name so as to switch the flow of the IP address with the fault to the first IP address.
And step 5, if the second IP address comprises a plurality of second IP addresses, determining a third IP address with the minimum network delay in the plurality of second IP addresses. In practical application, the packet loss rates of a plurality of IP addresses are the same, and if a plurality of second IP addresses are determined from the first IP address, the network delays of the second IP addresses may be further compared, and the second IP address with the smallest network delay is determined as the third IP address.
And 6, binding the third IP address with the target domain name. In an embodiment, the number of the third IP addresses may also be one or more, if the number of the third IP addresses is one, the third IP addresses are directly bound with the target domain name, and if the number of the third IP addresses is more, one third IP address may be arbitrarily selected to be bound with the target domain name.
In order to facilitate understanding of the IP address switching method based on object storage provided in the foregoing embodiment, an application example of the IP address switching method based on object storage is provided in the embodiment of the present invention, referring to a schematic flow chart of another IP address switching method based on object storage shown in fig. 3, the method mainly includes the following steps S302 to S318:
step S302, according to the domain name table, the IP address table and the corresponding relation table of the domain name and the IP address, an IP address list corresponding to the fault domain name is determined. The failed domain name is also the target domain name with the failure, and the IP address list is also all the IP addresses corresponding to the target domain name.
Step S304, a first IP address list is determined according to the IP address operation index table. The first IP address list comprises a first IP address of which the residual bandwidth in the IP addresses corresponding to the target domain name is larger than the flow of the IP address with the fault.
And step S306, determining a second IP address from the first IP address list according to the IP address operation index table. In an embodiment, the first IP address with the smallest packet loss rate may be selected from the first IP address list as the second IP address according to the packet loss rate recorded in the IP address operation index table.
Step S308, determine whether the number of the second IP addresses is multiple. If yes, go to step S312; if not, step S310 is performed.
Step S310, the flow of the IP address with the fault is switched to a second IP address.
Step S312, determine a third IP address from the second IP address according to the IP address operation table. In the payload implementation, the second IP address with the smallest network delay may be selected from the plurality of second IP addresses as the third IP address according to the network delay recorded in the IP address operation index table.
Step S314 determines whether the number of the third IP addresses is plural. If yes, go to step S318; if not, step S316 is performed.
And step S316, switching the flow of the IP address with the fault to a third IP address.
Step S318, selecting any third IP address, and switching the traffic of the failed IP address to the selected third IP address.
In summary, the IP address switching method based on object storage according to the embodiment of the present invention designs an automatic method for quickly switching domain name traffic, which can manage all domain names, IP addresses, and relationships between the domain names and the IP addresses, and by generating a traffic switching policy for each domain name, once a certain IP address of a certain domain name fails, a domain name resolution record can be immediately changed, and traffic is switched to a new destination IP address (i.e., the optimal IP address). The embodiment of the invention at least has the following characteristics:
(1) the embodiment of the invention can store hundreds of domain names and IP addresses and can also reduce the difficulty of maintaining the domain names.
(2) The embodiment of the invention can automatically calculate the optimal IP address according to the residual bandwidth, the packet loss rate and the network delay of the IP address.
(3) The embodiment of the invention can realize automatic IP address switching, prohibit manual operation and reduce the risk of manual misoperation.
(4) The embodiment of the invention can realize automatic IP address switching, improve the switching efficiency of the IP addresses and shorten the fault maintenance time.
For the IP address switching method based on object storage provided in the foregoing embodiment, an embodiment of the present invention further provides an IP address switching apparatus based on object storage, referring to a schematic structural diagram of an IP address switching apparatus based on object storage shown in fig. 4, where the apparatus mainly includes the following components:
an obtaining module 402, configured to obtain a pre-maintained domain name and IP address correspondence table and an IP address operation index table.
The first determining module 404 is configured to determine a target domain name with a fault, and determine an IP address corresponding to the target domain name based on the domain name and IP address correspondence table.
The second determining module 406 is configured to determine an operation index of the IP address corresponding to the target domain name based on the IP address operation index table.
The selecting module 408 is configured to select an optimal IP address to bind with the target domain name based on the operation index of the IP address corresponding to the target domain name.
The IP address switching device based on object storage provided by the embodiment of the invention can automatically determine the operation index of the IP address corresponding to the target domain name with faults on the basis of the corresponding relation table of the domain name and the IP address and the operation index table of the IP address, so that the optimal IP address can be selected for switching on the basis of the operation index of the IP address.
In one embodiment, the apparatus further comprises a maintenance module configured to: periodically collecting the operation indexes of all IP addresses; and updating the collected operation indexes of all the IP addresses in an IP address operation index table.
In one embodiment, the operation index at least includes traffic, remaining bandwidth, network delay, and packet loss rate.
In one embodiment, the selection module 408 is further configured to: determining a first IP address of which the residual bandwidth is larger than the flow of the IP address with the fault in the IP address corresponding to the target domain name; if the first IP addresses comprise a plurality of first IP addresses, determining a second IP address with the minimum packet loss rate in the plurality of first IP addresses; if the second IP address comprises a plurality of second IP addresses, determining a third IP address with the minimum network delay in the plurality of second IP addresses; and binding the third IP address with the target domain name.
In one embodiment, the selection module 408 is further configured to: if the first IP address comprises one, binding the first IP address with the target domain name; or if the first IP address comprises a plurality of IP addresses and the second IP address comprises one IP address, binding the second IP address with the target domain name.
In one embodiment, the table of correspondence between domain name and IP address includes whether it is a backup identifier; the first determining module 404 is further configured to: and determining all IP addresses with backup identifications corresponding to the target domain name based on the corresponding relation table of the domain name and the IP addresses.
The device provided by the embodiment of the present invention has the same implementation principle and technical effect as the method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the method embodiments without reference to the device embodiments.
The embodiment of the invention provides computer equipment, which particularly comprises a processor and a storage device; the storage means has stored thereon a computer program which, when executed by the processor, performs the method of any of the above embodiments.
Fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present invention, where the computer device 100 includes: the device comprises a processor 50, a memory 51, a bus 52 and a communication interface 53, wherein the processor 50, the communication interface 53 and the memory 51 are connected through the bus 52; the processor 50 is arranged to execute executable modules, such as computer programs, stored in the memory 51.
The memory 51 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 53 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used.
The bus 52 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 5, but this does not indicate only one bus or one type of bus.
The memory 51 is used for storing a program, the processor 50 executes the program after receiving an execution instruction, and the method executed by the apparatus defined by the flow process disclosed in any of the foregoing embodiments of the present invention may be applied to the processor 50, or implemented by the processor 50.
The processor 50 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 50. The Processor 50 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 51, and the processor 50 reads the information in the memory 51 and completes the steps of the method in combination with the hardware thereof.
The computer program product of the readable storage medium provided in the embodiment of the present invention includes a computer readable storage medium storing a program code, where instructions included in the program code may be used to execute the method described in the foregoing method embodiment, and specific implementation may refer to the foregoing method embodiment, which is not described herein again.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. An IP address switching method based on object storage is characterized by comprising the following steps:
acquiring a corresponding relation table of a pre-maintained domain name and an IP address operation index table;
determining a target domain name with a fault, and determining an IP address corresponding to the target domain name based on the domain name and IP address corresponding relation table;
determining an operation index of the IP address corresponding to the target domain name based on the IP address operation index table;
and selecting the optimal IP address to be bound with the target domain name based on the operation index of the IP address corresponding to the target domain name.
2. The method of claim 1, wherein the step of obtaining the pre-maintained IP address operation index table is preceded by the steps of:
periodically collecting the operation indexes of all IP addresses;
and updating the collected operation indexes of all the IP addresses in the IP address operation index table.
3. The method according to claim 1 or 2, wherein the operation indicators comprise at least traffic, remaining bandwidth, network delay, and packet loss rate.
4. The method according to claim 3, wherein the step of selecting an optimal IP address to bind with the target domain name based on the operation index of the IP address corresponding to the target domain name comprises:
determining a first IP address of which the residual bandwidth is larger than the flow of the IP address with the fault in the IP address corresponding to the target domain name;
if the number of the first IP addresses is multiple, determining a second IP address with the minimum packet loss rate in the multiple first IP addresses;
if the second IP address comprises a plurality of IP addresses, determining a third IP address with the minimum network delay in the plurality of second IP addresses;
and binding the third IP address with the target domain name.
5. The method of claim 4, wherein the step of selecting an optimal IP address to bind with the target domain name based on the operation index of the IP address corresponding to the target domain name further comprises:
if the first IP address comprises one, binding the first IP address with the target domain name;
or if the first IP address comprises a plurality of IP addresses and the second IP address comprises one IP address, binding the second IP address with the target domain name.
6. The method according to claim 1, wherein the table of correspondence between domain names and IP addresses includes whether the table is a backup identifier;
determining the IP address corresponding to the target domain name based on the corresponding relation table of the domain name and the IP address, wherein the step comprises the following steps:
and determining all IP addresses with backup identifications corresponding to the target domain name based on the corresponding relation table of the domain name and the IP addresses.
7. An IP address switching apparatus based on object storage, comprising:
the acquisition module is used for acquiring a corresponding relation table of a domain name and an IP address which are maintained in advance and an IP address operation index table;
the first determining module is used for determining a target domain name with a fault and determining an IP address corresponding to the target domain name based on the domain name and IP address corresponding relation table;
the second determining module is used for determining the operation index of the IP address corresponding to the target domain name based on the IP address operation index table;
and the selection module is used for selecting the optimal IP address to be bound with the target domain name based on the operation index of the IP address corresponding to the target domain name.
8. The apparatus according to claim 7, further comprising a maintenance module, specifically configured to:
periodically collecting the operation indexes of all IP addresses;
and updating the collected operation indexes of all the IP addresses in the IP address operation index table.
9. A computer device comprising a memory and a processor; the memory has stored therein a computer program operable on the processor, the processor implementing the steps of the method of any of the preceding claims 1 to 6 when executing the computer program.
10. A computer readable storage medium having stored thereon machine executable instructions which, when invoked and executed by a processor, cause the processor to execute the method of any of claims 1 to 6.
CN202011081366.8A 2020-10-10 2020-10-10 IP address switching method and device based on object storage and computer equipment Pending CN114422475A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011081366.8A CN114422475A (en) 2020-10-10 2020-10-10 IP address switching method and device based on object storage and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011081366.8A CN114422475A (en) 2020-10-10 2020-10-10 IP address switching method and device based on object storage and computer equipment

Publications (1)

Publication Number Publication Date
CN114422475A true CN114422475A (en) 2022-04-29

Family

ID=81260545

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011081366.8A Pending CN114422475A (en) 2020-10-10 2020-10-10 IP address switching method and device based on object storage and computer equipment

Country Status (1)

Country Link
CN (1) CN114422475A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101442566A (en) * 2009-01-08 2009-05-27 中国电信股份有限公司 Method and apparatus for implementing dynamic domain name update
US20090222582A1 (en) * 2008-03-03 2009-09-03 Microsoft Corporation Failover in an internet location coordinate enhanced domain name system
CN104967538A (en) * 2015-06-30 2015-10-07 北京奇虎科技有限公司 Method, device and system for network fault switching
US20160373405A1 (en) * 2015-06-16 2016-12-22 Amazon Technologies, Inc. Managing dynamic ip address assignments
CN107197059A (en) * 2017-07-27 2017-09-22 杭州迪普科技股份有限公司 A kind of dns resolution method and device
CN110677506A (en) * 2019-08-21 2020-01-10 中国平安财产保险股份有限公司 Network access method, device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090222582A1 (en) * 2008-03-03 2009-09-03 Microsoft Corporation Failover in an internet location coordinate enhanced domain name system
CN101442566A (en) * 2009-01-08 2009-05-27 中国电信股份有限公司 Method and apparatus for implementing dynamic domain name update
US20160373405A1 (en) * 2015-06-16 2016-12-22 Amazon Technologies, Inc. Managing dynamic ip address assignments
CN104967538A (en) * 2015-06-30 2015-10-07 北京奇虎科技有限公司 Method, device and system for network fault switching
CN107197059A (en) * 2017-07-27 2017-09-22 杭州迪普科技股份有限公司 A kind of dns resolution method and device
CN110677506A (en) * 2019-08-21 2020-01-10 中国平安财产保险股份有限公司 Network access method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US11586673B2 (en) Data writing and reading method and apparatus, and cloud storage system
CN109428749B (en) Network management method and related equipment
CN109361526B (en) Policy-controlled routing method, PCRF/PCF and DRA
CN110417870B (en) Configuration file management method, device, equipment and storage medium
CN109495567B (en) Static routing deployment method, device and system
CN105119736A (en) Data check method and device in network function virtualization architecture
CN109151025B (en) Load balancing method and device based on URL, computer storage medium and equipment
CN106920382B (en) Method for controlling intelligent instrument to access network, master station and data centralized unit
CN110290024B (en) Method, device and equipment for testing strategy before online
CN113656168A (en) Method, system, medium and equipment for automatic disaster recovery and scheduling of traffic
CN111654879B (en) Business push method, device, control equipment and storage medium
CN109710676B (en) Data acquisition method and device of CMDB model and electronic equipment
CN114025000B (en) Method, device, equipment and storage medium for establishing network access relationship
CN111585815A (en) Port data acquisition method and device
CN103812688A (en) Alarm determining method and device
CN110505320A (en) A kind of method, apparatus, the network equipment and the storage medium of more new IP address
CN114422475A (en) IP address switching method and device based on object storage and computer equipment
CN110535919B (en) Network access method and device of concentrator and power peak regulation system
CN112436958A (en) Method, system, device and medium for predicting failure of data center network device
CN113055213A (en) Alarm information management method, alarm information management system and server
CN112256658B (en) Log record distribution method and device, storage medium and electronic device
CN112749142B (en) Handle management method and system
CN113568781A (en) Database error processing method and device and database cluster access system
CN102547565A (en) System for position management of mobile user and mobile network on basis of position analysis
CN106850866B (en) Method and system for determining DNS data

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