CN115955459A - Domain name switching method and device and computer readable storage medium - Google Patents

Domain name switching method and device and computer readable storage medium Download PDF

Info

Publication number
CN115955459A
CN115955459A CN202211727018.2A CN202211727018A CN115955459A CN 115955459 A CN115955459 A CN 115955459A CN 202211727018 A CN202211727018 A CN 202211727018A CN 115955459 A CN115955459 A CN 115955459A
Authority
CN
China
Prior art keywords
domain name
switching
standby
target service
target
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
CN202211727018.2A
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.)
Xiamen Youwei Technology Co ltd
Original Assignee
Xiamen Youwei 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 Xiamen Youwei Technology Co ltd filed Critical Xiamen Youwei Technology Co ltd
Priority to CN202211727018.2A priority Critical patent/CN115955459A/en
Publication of CN115955459A publication Critical patent/CN115955459A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The disclosure relates to a domain name switching method and device and a computer readable storage medium, and relates to the technical field of networks. The domain name switching method comprises the following steps: detecting whether the current domain name can be used for accessing the target service; acquiring a domain name switching strategy from a public cloud under the condition that the current domain name cannot be used for accessing a target service; determining a target standby domain name according to a domain name switching strategy; and switching to accessing the target service by using the target standby domain name from accessing the target service by using the current domain name. According to the present disclosure, uninterrupted provision of services through domain names is ensured.

Description

Domain name switching method and device and computer readable storage medium
Technical Field
The present disclosure relates to the field of network technologies, and in particular, to a domain name switching method and apparatus, and a computer-readable storage medium.
Background
At present, as the user group of online services grows, the requirement on the availability of the services becomes higher and higher, and on one hand, the uninterrupted services need to be ensured, and on the other hand, under the condition that external factors cause obstacles, the users can be ensured to use the services smoothly.
The currently used primary domain name may not be accessible for various reasons. For example, sometimes, when an operator in one area fails, the entire area cannot complete normal resolution of the domain name, or the domain name is maliciously complained by a competitor, so that the domain name cannot be normally accessed in some areas, and at this time, it is necessary to recover the access of the user as soon as possible.
Disclosure of Invention
According to a first aspect of the present disclosure, there is provided a domain name switching method, including:
detecting whether the current domain name can be used for accessing the target service;
acquiring a domain name switching strategy from a public cloud under the condition that the current domain name cannot be used for accessing a target service;
determining a target standby domain name according to a domain name switching strategy;
and switching to accessing the target service by using the target standby domain name from accessing the target service by using the current domain name.
In some embodiments, determining the target standby domain name according to the domain name switching policy includes:
determining a domain name switching mode according to a domain name switching strategy, wherein the domain name switching mode comprises a first switching mode and a second switching mode;
under the condition that the domain name switching mode is the first switching mode, acquiring a plurality of standby domain names from a public cloud;
from the plurality of alternate domain names, a target alternate domain name is determined that can be used to access the target service.
In some embodiments, a domain name switching policy is obtained from a public cloud through a policy interface; and acquiring the standby domain names from the public cloud through a domain name interface.
In some embodiments, the domain name switching method further comprises:
at least one of the address of the policy interface and the address of the alternate domain name interface is updated at a first specified time.
In some embodiments, the first specified time is when the application starts.
In some embodiments, the public cloud stores the plurality of standby domain names and at least one item of domain name switching policies are updated periodically.
In some embodiments, determining the target standby domain name according to the domain name switching policy includes:
under the condition that the domain name switching mode is the second switching mode, acquiring a standby domain name specified by a domain name switching strategy;
detecting whether the designated standby domain name can be used to access the target service;
in the event that the designated alternate domain name is available for accessing the target service, the designated alternate domain name is determined to be the target alternate domain name.
In some embodiments, determining the target standby domain name according to the domain name switching policy includes:
obtaining the plurality of standby domain names from a public cloud in the event that the designated standby domain name cannot be used to access the target service;
from the plurality of alternate domain names, a target alternate domain name is determined that can be used to access the target service.
In some embodiments, determining a target alternate domain name from the plurality of alternate domain names that can be used to access the target service comprises:
and detecting whether the plurality of standby domain names can be used for accessing the target service one by one until the standby domain name which can be used for accessing the target service is found.
In some embodiments, the standby domain name specified by the domain name switching policy is determined according to location information of the terminal.
In some embodiments, obtaining a domain name switching policy from a public cloud comprises:
and acquiring a domain name switching strategy corresponding to the position information of the terminal from the public cloud.
In some embodiments, detecting, one by one, whether the plurality of alternate domain names can be used to access the target service comprises:
through the health check interface, it is detected one by one whether the standby domain name can be used to access the target service.
In some embodiments, the domain name switching method further comprises:
and in the case that no standby domain name can be used for accessing the target service, accessing the target service through the IP address corresponding to the target service.
In some embodiments, the domain name switching method further comprises:
and acquiring the IP address corresponding to the target service by using a domain name system of the hypertext transfer protocol.
According to a second aspect of the present disclosure, there is provided a domain name switching apparatus including:
a detection module configured to detect whether a current domain name can be used to access a target service;
an acquisition module configured to acquire a domain name switching policy from a public cloud in a case that a current domain name cannot be used to access a target service;
a determining module configured to determine a target standby domain name according to a domain name switching policy;
and the switching module is configured to switch from using the current domain name to access the target service to using the target standby domain name to access the target service.
According to a third aspect of the present disclosure, there is provided a domain name switching apparatus, including:
a memory; and
a processor coupled to the memory, the processor configured to execute a domain name switching method according to any embodiment of the present disclosure based on instructions stored in the memory.
According to a fourth aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement a domain name switching method according to any of the embodiments of the present disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description, serve to explain the principles of the disclosure.
The present disclosure may be understood more clearly and in accordance with the following detailed description, taken with reference to the accompanying drawings,
wherein:
fig. 1 illustrates a flow diagram of a domain name switching method according to some embodiments of the present disclosure;
FIG. 2 illustrates a flow diagram for determining a target backup domain name according to some embodiments of the present disclosure;
fig. 3 shows a schematic diagram of a first switching pattern according to some embodiments of the present disclosure;
FIG. 4 illustrates a flow diagram for determining a target alternate domain name according to further embodiments of the present disclosure;
FIG. 5 illustrates a flow diagram for determining a target backup domain name according to still further embodiments of the present disclosure;
fig. 6 shows a schematic diagram of a domain name switching method according to further embodiments of the present disclosure;
fig. 7 illustrates a block diagram of a domain name switching apparatus according to some embodiments of the present disclosure;
fig. 8 shows a block diagram of a domain name switching apparatus according to further embodiments of the present disclosure;
FIG. 9 illustrates a block diagram of a computer system for implementing some embodiments of the present disclosure.
Detailed Description
Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as exemplary only and not as limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
In the related art, if a failure occurs in a main domain name currently in use and normal access to a service is not possible, normal access to the service is restored by restoring the main domain name in use. This approach requires a large amount of communication with the parties, submission of audit materials, even mailing of paper materials, etc., which can take a large amount of time and seriously affect the user experience.
In order to solve the above problem, the present application provides a domain name switching method and apparatus, and a computer-readable storage medium, which can quickly switch to an accessible standby domain name to provide a service for a user.
Fig. 1 illustrates a flow diagram of a domain name switching method according to some embodiments of the present disclosure.
As shown in fig. 1, the domain name switching method includes steps S1 to S4. In some embodiments, the domain name switching method is performed by the terminal.
In step S1 it is detected whether the current domain name can be used to access the target service.
For example, after an application program of the terminal is started, the main domain name currently in use is detected by accessing health check (service health check interface). If the interface returns: { code:0, message.
In step S2, in case the current domain name cannot be used to access the target service, a domain name switching policy is acquired from the public cloud.
For example, if it is detected that the primary domain name currently in use has no access to the target service, the application obtains the domain name switching policy from the third party's public cloud. The public cloud is a cloud service provided by a third-party service provider for a user, and is not a target service corresponding to a domain name. The domain name switching strategy is stored in the public cloud, and even under the condition that the target service cannot be accessed, the public cloud of a third party can be accessed, so that the application program can normally acquire the domain name switching strategy.
The handover policy includes behavior, pro-vince and city fields. Wherein, behavior represents the domain name switching mode, the province and the city respectively represent the province and the city of the domain name switching strategy. The public cloud provides an interface for acquiring a domain name switching strategy, and the name of the interface isstragy
In addition to storing the domain name switching policy in the public cloud, a plurality of standby domain names are also stored in the public cloud. For example, a domain name list would include 10-20 alternate domain names: com, zhost.com, \ 8230; \8230; zhost.com, stored on public clouds. And providing an interface for acquiring the standby domain name by the public cloud, wherein the interface name is domains.
In step S3, the target standby domain name is determined according to the domain name switching policy.
For example, an attempt is made to find an alternate domain name that can be used. The domain name switching policy can specify the standby domain name as the target standby domain name. The application program can also search for a plurality of standby domain names acquired from the public cloud according to the domain name switching strategy. In the case where an available standby domain name is found, it is taken as a target standby domain name.
Fig. 2 illustrates a flow diagram for determining a target alternate domain name according to some embodiments of the present disclosure.
As shown in fig. 2, determining the target standby domain name according to the domain name switching policy includes steps S301 to S303.
In step S301, a domain name switching mode is determined according to a domain name switching policy, where the domain name switching mode includes a first switching mode and a second switching mode. For example, the first switching mode is an auto (automatic) switching mode, and the second switching mode is a manual mode.
In step S302, if the domain name switching mode is the first switching mode, a plurality of standby domain names are acquired from the public cloud. For example, in auto-switching mode, the application obtains a list of a plurality of alternate domain names from the public cloud.
In step S303, a target alternate domain name that can be used to access the target service is determined from the plurality of alternate domain names. For example, among a plurality of standby domain names returned by the public cloud, a standby domain name that can be normally accessed is automatically searched for as a target standby domain name.
In some embodiments, a domain name switching policy is obtained from a public cloud through a policy interface; a plurality of standby domain names are obtained from a public cloud through a domain name interface. For example, the application program obtains the domain name switching policy from the public cloud through a string interface; and acquiring a plurality of standby domain names from the public cloud through the domains interface.
Although the application program is internally provided with a default standby domain name list when being issued, the updating timeliness of the terminal is poor, and if the domain name is changed for many times in a short period, the timeliness of the standby domain name locally stored by the application program is poor and can be changed and failed at any time. Therefore, the latest standby domain name list is obtained from the public cloud, and the timeliness of the standby domain names is guaranteed. Through a public cloud and local multiple backup mechanism, the standby domain name can be obtained under various conditions, and the robustness of the scheme can be improved.
In some embodiments, determining a target alternate domain name from the plurality of alternate domain names that can be used to access the target service comprises: detecting whether a plurality of standby domain names can be used for accessing the target service one by one until the standby domain name which can be used for accessing the target service is found. For example, the application looks up the domain names returned by the cloud service one by one, looking for available domain names.
In some embodiments, detecting, one by one, whether multiple alternate domain names can be used to access the target service includes: through the health check interface, it is detected one by one whether the standby domain name can be used to access the target service. For example, the method of detecting the alternate domain name is through a health check interface as is the method of detecting the current domain name.
Fig. 3 illustrates a schematic diagram of a first switching pattern according to some embodiments of the present disclosure.
As shown in fig. 3, after the application program is started, if the detection of the current default main domain name is not passed, which indicates that the main domain name cannot be accessed, a plurality of latest standby domain names are obtained from the public cloud, and the obtained standby domain names are stored locally. Starting from the first standby domain name array [ 1 ], detecting whether the ith standby domain name array [ i ] can be used for accessing the target service through accessing a service health check interface until a target standby domain name which can be used is found. In addition, if i is greater than the total number count of the standby domain names, that is, the last standby domain name is detected to be unable to access the target service, which indicates that there is no available standby domain name, the meaning of switching the standby domain name is not large at this time, and the main domain name is used.
In some embodiments, in the case that the domain name switching policy cannot be acquired from the public cloud, the domain name switching mode in the domain name switching policy is determined to be the automatic switching mode. For example, if the application does not make a request to the string interface, or the string interface does not return a result, the domain name switching policy defaults to the auto-switching mode.
Fig. 4 illustrates a flow diagram for determining a target alternate domain name according to further embodiments of the present disclosure.
As shown in fig. 4, determining the target standby domain name according to the domain name switching policy includes steps S311-S314.
In step S311, a domain name switching mode is determined according to the domain name switching policy, where the domain name switching mode includes a first switching mode and a second switching mode.
In step S312, in the case that the domain name switching mode is the second switching mode, the standby domain name specified by the domain name switching policy is acquired. For example, in the case that the domain name switching mode is the second switching mode (manual switching), the standby domain name specified by the policy is already included in the domain name switching policy returned by the runtime interface provided by the public cloud. The specified backup domain name is, for example, a domain name configured for the area (province) where the terminal is located.
The difference between the domain interface and the string interface for returning the domain names is that the domain interface returns a complete domain name list, while in the manual switching mode, the string interface returns standby domain names specified by the policy.
In step S313, it is detected whether the specified standby domain name can be used to access the target service.
In step S314, in the case where the designated standby domain name can be used to access the target service, the designated standby domain name is determined as the target standby domain name. For example, the application detects whether the alternate domain name specified by the domain name switching policy can be used to access the target service, and if the alternate domain name specified by the domain name switching policy can be used to access the target service, then the specified alternate domain name is used as the target alternate domain name.
The manual switching mode refers to that in the background, a developer designates a specific domain name as a main working domain name, and the manual switching mode can be used for dealing with the special condition that all standby domain names are unavailable. In the manual switching mode, the designated standby domain name is determined based on dial testing monitoring alarms and manual confirmation. Under the condition that the default domains list cannot work normally, a specified standby domain name which is determined to be available can be used in a part of regions or all the regions, the control force is stronger, the phenomenon that all domain names lose the working capacity is avoided, and the normal access of the service is ensured.
Fig. 5 is a flowchart illustrating a process of determining a target standby domain name according to still other embodiments of the present disclosure, and as shown in fig. 5, in the process of determining a target standby domain name, after steps S311 to S314, steps S315 to S316 are further performed.
In step S315, in the event that the specified backup domain name cannot be used to access the target service, a plurality of backup domain names are obtained from the public cloud.
In step S316, a target alternate domain name that can be used to access the target service is determined from the plurality of alternate domain names.
For example, although the manual mode is mostly started when the default standby domain name list is not available, if the standby domain name specified by the domain name switching policy also fails to be accessed in the manual mode, the domain name list returned by domains is reused to perform a downgrading attempt, and more possibilities are found. At the moment, according to the same mode as the automatic switching mode, a plurality of standby domain names are obtained from the domains interface of the public cloud, and the standby domain names which can be normally accessed are searched from the standby domain names returned by the public cloud and serve as target standby domain names, so that the probability of finding the target standby domain names is improved, and the normal access of the service is ensured.
The method for searching the target standby domain name from the standby domain names returned from the domains interface is similar to the automatic switching method, and whether the standby domain names can be used for accessing the target service or not is detected one by one until the standby domain name which can be used for accessing the target service is found.
According to some embodiments of the present disclosure, the domain name switching policy specifies different switching modes, and under different conditions, different manners of determining the standby domain name are preferentially adopted, for example, when the standby domain name list may be valid, the first switching mode is adopted, the standby domain name list provided by the public cloud is preferentially traversed, and when the standby domain name list is likely to be invalid due to reasons such as untimely update, the second switching mode is adopted, and the standby domain name specified by the domain name switching policy is preferentially used. The method for determining the standby domain name according to the domain name switching strategy can adapt to different conditions, avoid waste of time caused by useless attempts and improve the flexibility and efficiency of domain name switching.
In some embodiments, obtaining a domain name switching policy from a public cloud comprises: and acquiring a domain name switching strategy corresponding to the position information of the terminal from the public cloud.
For example, the domain name switching policy is determined according to the location information of the terminal, and the domain name switching policies corresponding to different provinces and cities may be different. After the application program is started, the province and city area where the terminal is located are determined firstly. If the application program of the user terminal has the GPS authority or the GPS information is stored before, the province (district) where the current user is located is determined through the GPS information. And if no GPS related information exists, acquiring the IP address of the terminal by calling the three-party service, and determining the province and city area where the terminal is located according to the IP address. And then, acquiring a corresponding domain name switching strategy configured on the public cloud according to the province (district) where the user terminal is located.
By adopting different domain name switching strategies according to the regional characteristics of different provinces and cities, the flexibility and the efficiency of domain name switching can be improved.
In some embodiments, the standby domain name specified by the domain name switching policy is determined according to location information of the terminal. For example, in the domain name switching policy corresponding to different provinces and cities, the specified standby domain name may be different. Generally, there will not be many simultaneous domain name failures at the same time, but failures occur in a certain province, city. And aiming at the fault occurrence place, testing a domain name which can be normally accessed by using a dial testing mode, and taking the domain name as a standby domain name specified by a domain name switching strategy after the dial testing is normal.
In some embodiments, the target service is accessed via the IP address corresponding to the target service in the event that no alternate domain name is available to access the target service. For example, if no standby domain name can be used for normally providing the service, the real IP corresponding to the current domain name is acquired as a standby bottom-of-pocket scheme, and is forced to point to the server corresponding to the target service, so that the user can use the target service without abnormal perception.
In some embodiments, the IP address corresponding to the target service is obtained using a hypertext transfer protocol domain name system.
For example, if none of the standby Domain names can be used, the Domain Name System HyperText Transfer Protocol (http dns) is used to perform Domain Name resolution to obtain the real IP address. At an android terminal, configuring a local host file; and at the iOS end, accessing the service by using an agent mode through the real IP address, thereby really ensuring that the service can be normally accessed.
For the H5 page, the IP mode or the HTTPDNSd mode cannot be used, and the temporary domain name is used for solving the access problem.
Fig. 6 is a diagram illustrating a domain name switching method according to further embodiments of the present disclosure.
As shown in fig. 6, a domain name switch is first attempted to find a backup domain name that can be used for normal access by traversing the backup domain name list returned by the public cloud. If no available standby domain name is found after traversing the standby domain name list, an HTTPDNS method is used, an SDK (Software Development Kit) is used for resolving the domain name to obtain a real IP address, and the returned IP address is used for accessing the target service.
In addition, when the domain name is not available, other interactive pages are prompted to "service is temporarily unavailable and comes back later".
In some embodiments, at least one of the address of the policy interface and the address of the alternate domain name interface is updated at a first specified time.
For example, domains and runtime interface addresses provided by a public cloud are built in the application program. If the original public cloud suddenly fails to normally serve, the cloud provider is down for a long time or replaced, and the addresses of domains and the targets can be invalid. In order to solve the problem, the service provides an additional interface for updating the addresses of domains and struts provided by the public cloud, ensures that the application program can always obtain the latest standby domain name list and domain name switching strategy, and ensures an updating mechanism of the standby domain name list and the domain name switching strategy.
In some embodiments, the first specified time is when the application starts.
For example, when an application starts, the application accesses the service interface to obtain the latest public cloud domains and runtime interface addresses. And if the service interface can be accessed, updating the public cloud domains and the string interface address. And if the service interface cannot be accessed, acquiring a standby domain name list and a domain name switching strategy by using the default public cloud domains and the default strand interface addresses in the application program.
In some embodiments, at least one of the plurality of standby domain names and domain name switching policies stored by the public cloud is periodically updated to ensure timeliness of the standby domain names and domain name switching policies.
In step S4, the target service is switched from being accessed using the current domain name to being accessed using the target domain name. For example, the target standby domain name found to be able to normally access the target service is set as the default primary domain name through which the target service is accessed.
According to the domain name switching method of some embodiments of the present disclosure, when the current domain name cannot be used for normally accessing the target service, the domain name switching policy is acquired from the public cloud, and it is ensured that the latest domain name switching policy can be acquired also when the target service is inaccessible. According to the domain name switching strategy, the target standby domain name is determined, the standby domain name which can be used can be quickly found without waiting for the recovery of the current domain name, the application program is ensured to continuously provide services, the condition that the domain name is unavailable is avoided, and the user experience is improved.
Fig. 7 illustrates a block diagram of a domain name switching device, according to some embodiments of the present disclosure.
As shown in fig. 7, the domain name switching apparatus 7 includes a detection module 71, an acquisition module 72, a determination module 73, and a switching module 74.
The detection module 71 is configured to detect whether the current domain name can be used to access the target service, for example, to perform step S1 as shown in fig. 1.
An obtaining module 72 configured to, in a case that the current domain name cannot be used to access the target service, obtain a domain name switching policy from a public cloud, for example, perform step S2 as shown in fig. 1.
A determining module 73 configured to determine the target standby domain name according to the domain name switching policy, for example, to perform step S3 shown in fig. 1.
A switching module 74 configured to switch from accessing the target service using the current domain name to accessing the target service using the target standby domain name, for example, to perform step S4 shown in fig. 1.
Fig. 8 illustrates a block diagram of a domain name switching device, according to further embodiments of the present disclosure.
As shown in fig. 8, domain name switching apparatus 8 includes a memory 81; and a processor 82 coupled to the memory 81, the memory 81 being used for storing and executing a domain name switching method. The processor 82 is configured to perform a domain name switching method in any of the embodiments of the present disclosure based on instructions stored in the memory 81.
According to the domain name switching device of some embodiments of the present disclosure, when the current domain name cannot be used for normally accessing the target service, the domain name switching policy is obtained from the public cloud, so that it is ensured that the latest domain name switching policy can be obtained also when the target service is inaccessible. According to the domain name switching strategy, the target standby domain name is determined, the standby domain name which can be used can be quickly found without waiting for the recovery of the current domain name, the application program is ensured to continuously provide services, the condition that the domain name is unavailable is avoided, and the user experience is improved.
FIG. 9 illustrates a block diagram of a computer system for implementing some embodiments of the present disclosure.
As shown in FIG. 9, the computer system 90 may be embodied in the form of a general purpose computing device. The computer system 90 includes a memory 910, a processor 920, and a bus 900 that couples various system components.
The memory 910 may include, for example, system memory, non-volatile storage media, and the like. The system memory stores, for example, an operating system, an application program, a Boot Loader (Boot Loader), and other programs. The system memory may include volatile storage media such as Random Access Memory (RAM) and/or cache memory. A non-volatile storage medium, for example, stores instructions to perform a domain name switching method in any of some embodiments of the present disclosure. Non-volatile storage media include, but are not limited to, magnetic disk storage, optical storage, flash memory, and the like.
The processor 920 may be implemented as discrete hardware components, such as a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gates or transistors, or the like. Accordingly, each of the modules, such as the judging module and the determining module, may be implemented by a Central Processing Unit (CPU) executing instructions in a memory for performing the corresponding step, or may be implemented by a dedicated circuit for performing the corresponding step.
Bus 900 may use any of a variety of bus architectures. For example, bus architectures include, but are not limited to, industry Standard Architecture (ISA) bus, micro Channel Architecture (MCA) bus, and Peripheral Component Interconnect (PCI) bus.
The computer system 90 may also include an input-output interface 930, a network interface 940, a storage interface 950, and so forth. These interfaces 930, 940, 950 and the memory 910 and the processor 920 may be connected by a bus 900. The input/output interface 930 may provide a connection interface for an input/output device such as a display, a mouse, a keyboard, and the like. The network interface 940 provides a connection interface for various networking devices. The storage interface 950 provides a connection interface for external storage devices such as a floppy disk, a usb disk, and an SD card.
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable apparatus to produce a machine, such that the execution of the instructions by the processor results in an apparatus that implements the functions specified in the flowchart and/or block diagram block or blocks.
These computer readable program instructions may also be stored in a computer readable memory that can direct a computer to function in a particular manner, such that the instructions cause an article of manufacture including instructions which implement the function specified in the flowchart and/or block diagram block or blocks.
The present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects.
Through the domain name switching method and device and the computer readable storage medium in the embodiment, uninterrupted service provision through the domain name is ensured.
So far, a domain name switching method and apparatus, and a computer-readable storage medium according to the present disclosure have been described in detail. Some details that are well known in the art have not been described in order to avoid obscuring the concepts of the present disclosure. It will be fully apparent to those skilled in the art from the foregoing description how to practice the presently disclosed embodiments.

Claims (17)

1. A domain name switching method comprises the following steps:
detecting whether the current domain name can be used for accessing the target service;
acquiring a domain name switching strategy from a public cloud under the condition that the current domain name cannot be used for accessing a target service;
determining a target standby domain name according to a domain name switching strategy;
and switching to accessing the target service by using the target standby domain name from accessing the target service by using the current domain name.
2. The domain name switching method according to claim 1, wherein determining the target standby domain name according to the domain name switching policy comprises:
determining a domain name switching mode according to a domain name switching strategy, wherein the domain name switching mode comprises a first switching mode and a second switching mode;
under the condition that the domain name switching mode is the first switching mode, acquiring a plurality of standby domain names from a public cloud;
from the plurality of alternate domain names, a target alternate domain name is determined that can be used to access the target service.
3. The domain name switching method according to claim 2, wherein:
acquiring a domain name switching strategy from a public cloud through a strategy interface;
and acquiring the standby domain names from the public cloud through a domain name interface.
4. The domain name switching method according to claim 3, further comprising:
at least one of the address of the policy interface and the address of the alternate domain name interface is updated at a first specified time.
5. The domain name switching method according to claim 4, wherein the first specified time is at application start-up.
6. The domain name switching method according to claim 2, wherein at least one of the plurality of standby domain names and domain name switching policies stored by a public cloud is periodically updated.
7. The domain name switching method according to claim 2, wherein determining the target standby domain name according to the domain name switching policy comprises:
under the condition that the domain name switching mode is the second switching mode, acquiring a standby domain name specified by a domain name switching strategy;
detecting whether the designated standby domain name can be used to access the target service;
in the event that the designated alternate domain name is available for accessing the target service, the designated alternate domain name is determined to be the target alternate domain name.
8. The domain name switching method according to claim 7, wherein determining the target standby domain name according to the domain name switching policy comprises:
obtaining the plurality of standby domain names from a public cloud in the event that the designated standby domain name cannot be used to access the target service;
from the plurality of alternate domain names, a target alternate domain name is determined that can be used to access the target service.
9. The domain name switching method according to claim 7, wherein the standby domain name specified by the domain name switching policy is determined according to location information of the terminal.
10. The domain name switching method according to any one of claims 2 to 9, wherein determining a target standby domain name from the plurality of standby domain names that can be used to access a target service comprises:
and detecting whether the plurality of standby domain names can be used for accessing the target service one by one until the standby domain name which can be used for accessing the target service is found.
11. The domain name switching method according to claim 10, wherein detecting one by one whether the plurality of standby domain names are available for accessing the target service comprises:
through the health check interface, it is detected one by one whether the standby domain name can be used to access the target service.
12. The domain name switching method according to claim 1, wherein acquiring the domain name switching policy from a public cloud comprises:
and acquiring a domain name switching strategy corresponding to the position information of the terminal from the public cloud.
13. The domain name switching method according to claim 1, further comprising:
and in the case that no standby domain name can be used for accessing the target service, accessing the target service through the IP address corresponding to the target service.
14. The domain name switching method according to claim 1, further comprising:
and acquiring the IP address corresponding to the target service by using a domain name system of the hypertext transfer protocol.
15. A domain name switching apparatus comprising:
a detection module configured to detect whether a current domain name is available to access a target service;
an acquisition module configured to acquire a domain name switching policy from a public cloud in a case that a current domain name cannot be used to access a target service;
a determining module configured to determine a target standby domain name according to a domain name switching policy;
and the switching module is configured to switch from using the current domain name to access the target service to using the target standby domain name to access the target service.
16. A domain name switching apparatus comprising:
a memory; and
a processor coupled to the memory, the processor configured to perform the domain name switching method according to any one of claims 1 to 14 based on instructions stored in the memory.
17. A computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement a domain name switching method according to any one of claims 1 to 14.
CN202211727018.2A 2022-12-30 2022-12-30 Domain name switching method and device and computer readable storage medium Pending CN115955459A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211727018.2A CN115955459A (en) 2022-12-30 2022-12-30 Domain name switching method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211727018.2A CN115955459A (en) 2022-12-30 2022-12-30 Domain name switching method and device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN115955459A true CN115955459A (en) 2023-04-11

Family

ID=87297187

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211727018.2A Pending CN115955459A (en) 2022-12-30 2022-12-30 Domain name switching method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN115955459A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116684382A (en) * 2023-07-28 2023-09-01 深圳市豪斯莱科技有限公司 Domain name detection and automation application domain name certificate method, system and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116684382A (en) * 2023-07-28 2023-09-01 深圳市豪斯莱科技有限公司 Domain name detection and automation application domain name certificate method, system and storage medium
CN116684382B (en) * 2023-07-28 2023-10-20 深圳市豪斯莱科技有限公司 Domain name detection and automation application domain name certificate method, system and storage medium

Similar Documents

Publication Publication Date Title
US11586673B2 (en) Data writing and reading method and apparatus, and cloud storage system
CN110661658B (en) Node management method and device of block chain network and computer storage medium
CN111399756B (en) Data storage method, data downloading method and device
CN113067875B (en) Access method, device and equipment based on dynamic flow control of micro-service gateway
WO2022057231A1 (en) Method and apparatus for accessing server, device, and storage medium
CN106034138A (en) Remote service calling method and remote service calling device
CN109992452B (en) Fault processing method and device
CN115955459A (en) Domain name switching method and device and computer readable storage medium
CN112637335A (en) Main/standby mode service deployment method, device, equipment and storage medium
WO2020233002A1 (en) Container instance ip switching method and apparatus, computer device, and storage medium
CN111131131B (en) Vulnerability scanning method and device, server and readable storage medium
CN108256311B (en) Authorization authentication method and device and electronic equipment
CN110543348A (en) instruction processing method, system, electronic equipment and storage medium
CN111046004B (en) Data file storage method, device, equipment and storage medium
CN111488163B (en) Firmware updating method and device, electronic equipment and storage medium
CN111414247A (en) Server switching method, device, management node and storage medium
CN116204431A (en) Method, device, equipment and medium for testing mark diffusion service isolation
CN111240954A (en) Memory leak detection method, device and equipment
CN113572747A (en) Method and device for processing IP address, storage medium and processor
CN113132241B (en) ACL template dynamic configuration method and device
CN112905341A (en) Distributed load balancing service information continuous inheritance method and device
CN112202760A (en) Webpage access method, device, terminal and medium
CN111638987A (en) Data processing method and device, electronic equipment and storage medium
CN110099275B (en) Application testing method, device, equipment and storage medium
CN115202545B (en) Event triggering method, module, learning machine and storage medium based on interface

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