WO2022116446A1 - 应用层双活方法、装置、设备及存储介质 - Google Patents

应用层双活方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2022116446A1
WO2022116446A1 PCT/CN2021/084282 CN2021084282W WO2022116446A1 WO 2022116446 A1 WO2022116446 A1 WO 2022116446A1 CN 2021084282 W CN2021084282 W CN 2021084282W WO 2022116446 A1 WO2022116446 A1 WO 2022116446A1
Authority
WO
WIPO (PCT)
Prior art keywords
address
data center
entry
address pool
network protocol
Prior art date
Application number
PCT/CN2021/084282
Other languages
English (en)
French (fr)
Inventor
全志松
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2022116446A1 publication Critical patent/WO2022116446A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5061Pools of addresses

Definitions

  • the present application relates to the technical field of security monitoring, and in particular, to an application layer active-active method, apparatus, device, and storage medium.
  • the active-active solutions at the application layer are all implemented based on software load balancing, but the inventor realized that compared with hardware load balancing, software load balancing has lower performance and lower stability. If load balancing fails, the purpose of active-active cannot be achieved.
  • the existing active-active solution at the application layer has the problem of low performance and instability due to the software load balancing method.
  • One of the purposes of the embodiments of the present application is to provide an application layer active-active method, apparatus, device, and storage medium, so as to solve the problems caused by the prior art.
  • a first aspect of the embodiments of the present application provides an application layer active-active method, including:
  • the data traffic ratio of the first data center and the second data center is determined.
  • a second aspect of the embodiments of the present application provides an application layer active-active device, including:
  • an acquisition module for acquiring the first entry IP address of the first data center and the second entry IP address of the second data center
  • a first obtaining module configured to respectively mount the first IP addresses of the first application instances of the first data center in the first entry IP addresses to obtain a first IP address pool
  • the second obtaining module is used to mount the second IP addresses of each second application instance of the second data center in the second entry IP address, respectively, to obtain a second IP address pool;
  • a first verification module configured to verify whether the first network protocol of the first data center is normal based on the first IP address pool
  • a second verification module configured to verify whether the second network protocol of the second data center is normal based on the second IP address pool
  • a determination module configured to determine a data flow ratio of the first data center and the second data center based on the verification result of the first network protocol and the second network protocol and a preset flow distribution policy.
  • a third aspect of an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and running on the online claim settlement device, when the processor executes the computer program:
  • the data traffic ratio of the first data center and the second data center is determined.
  • a fourth aspect of the embodiments of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
  • the data traffic ratio of the first data center and the second data center is determined.
  • the first IP address of each application instance of the pre-built first data center is mounted on the first data center based on the DNS server.
  • the first IP address pool is obtained, and the second IP addresses of each application instance of the second data center are mounted on the second entry IP address of the second data center, and the second IP address is obtained.
  • IP address pool and then dynamically resolve the first IP address pool and the second IP address pool through the DNS server, verify the communication status of the respective entry IP addresses of the first data center and the second data center , and realizes data traffic distribution between the first data center and the second data center according to the communication state of the first ingress IP address and the second ingress IP address.
  • the traffic balance of the active-active data center at the application layer is realized, thereby improving the stability and flexibility of the active-active at the application layer.
  • FIG. 1 is a schematic structural diagram of an application layer active-active system provided by a first embodiment of the present application
  • FIG. 2 is a schematic flowchart of an application layer active-active method provided by a second embodiment of the present application
  • Fig. 3 is the concrete realization flow chart of S24 in Fig. 2;
  • Fig. 4 is the concrete realization flow chart of S25 in Fig. 2;
  • FIG. 5 is an implementation flowchart of the application layer active-active method provided by the second embodiment of the present application.
  • FIG. 6 is a structural block diagram of an application layer active-active device provided by a third embodiment of the present application.
  • FIG. 7 is a structural block diagram of a computer device provided by a fourth embodiment of the present application.
  • the application layer active-active method involved in the embodiments of the present application may be executed by a computer device.
  • the computer equipment includes, but is not limited to, a single server or a cloud server cluster, etc., which is not specifically limited here.
  • the application-layer active-active method involved in the embodiments of the present application is applied in disaster recovery scenarios of enterprises.
  • the enterprise requires the business system to be protected against sudden human errors, malicious attacks, natural disasters, etc.
  • the active-active solution is used to ensure business continuity.
  • the application layer active-active refers to the realization of cross-regional data center business active-active from the application layer.
  • the data center in each region can provide services to the outside world, and when a disaster occurs in a data center in one region, the data center in another region Can take over all business.
  • FIG. 1 is a schematic structural diagram of an application layer active-active system provided by a first embodiment of the present application.
  • the application layer active-active system 100 provided by the embodiment of the present application includes a first data center 101 , a second data center 102 , and a computer device 103 .
  • the first data center 101 is a pre-deployed main data center
  • the second data center 102 is a pre-deployed backup data center
  • the computer equipment 103 is a pre-deployed server.
  • the first data center 101 and the second data center 102 are pre-built by application operation and maintenance personnel when the application is deployed and launched.
  • the first data center 101 and the second data center 102 can simultaneously provide external services, and both the first data center 101 and the second data center 102 are connected to the computer device 103 in communication, and the computer device 103 is used to obtain a first IP address pool by mounting the first IP addresses of each application instance of the first data center 101 on the first entry IP address of the first data center 101, and the second data center 102 The second IP address of each application instance is mounted on the second entry IP address of the second data center 102 to obtain a second IP address pool; and then dynamically resolve the first IP address pool and the second IP address pool respectively.
  • the data traffic distribution between the first data center 101 and the second data center 102 realizes the traffic balance between the first data center 101 and the second data center 102 at the application layer, thereby improving the stability and flexibility of the active-active at the application layer.
  • FIG. 2 is a schematic flowchart of an application layer active-active method provided by a second embodiment of the present application.
  • the application layer active-active method provided in this embodiment includes S21 to S26. Details are as follows:
  • the first entry IP address and the second entry IP address are both predetermined virtual VIP addresses, similar to a direction proxy; the first entry IP address can The request of the first data center is forwarded to the first IP address of each first application instance of the first data center. Likewise, the second entry IP address may forward all requests for accessing the second data center to the second IP addresses of the second application instances in the second data center.
  • both the first ingress IP and the second ingress IP may be virtual IPs configured through a software load balancing reverse proxy nginx, or may be virtual IPs configured through a hardware load balancing device F5-LTM.
  • the virtual IP may be referred to as VIP for short.
  • S22 Mount the first IP addresses of the first application instances of the first data center in the first entry IP addresses, respectively, to obtain a first IP address pool.
  • an IP address pool which may include: mounting the first IP addresses of each of the first application instances in the first entry IP address in a preset reverse proxy web server to obtain the first IP address. IP address pool; or, in a preset hardware load balancing device, mount the first IP address of each of the first application instances to the first entry IP address to obtain the first IP address pool .
  • the first IP address pool includes at least one first IP address.
  • the first IP address of each of the first application instances is parsed and dynamically obtained in a preset direction proxy web server, and each of the dynamically obtained first IP addresses are mounted in the order of acquisition respectively. From the first entry IP address, the first IP address pool is obtained.
  • the first IP address pool is obtained.
  • S23 Mount the second IP addresses of the second application instances of the second data center in the second entry IP addresses, respectively, to obtain a second IP address pool.
  • the second IP addresses of each second application instance of the second data center are respectively mounted in the second entry IP addresses to obtain a second IP address pool, which may include: pre- The set reverse proxy web server mounts the second IP address of each second application instance in the second entry IP address to obtain the second IP address pool; or, in a preset The hardware load balancing device mounts the second IP addresses of each of the second application instances in the second entry IP addresses to obtain the second IP address pool.
  • the first network protocol includes Transmission Control Protocol TCP/IP or Hypertext Transfer Protocol HTTP.
  • a dynamic resolution domain name can be configured in the DNS server, and based on the dynamic resolution domain name setting, it can be verified whether the first network protocol of the first data center is normal or not according to the first IP address pool.
  • the first verification method is to verify the first network protocol of the first data center.
  • FIG. 3 is a specific implementation flowchart of S24 in FIG. 2 .
  • S24 includes S241 to S243, which are described in detail as follows:
  • the first verification port is a port corresponding to the first entry IP, for example, the port range corresponding to the first entry IP is 1024 to 65535.
  • the first verification method includes a four-layer communication detection method or a seven-layer communication detection method. Specifically, for the layer-4 communication detection method and the layer-7 communication detection method, reference may be made to the existing layer-4 communication detection method and the layer-7 communication detection method, and details are not described herein again.
  • S242 Configure the portal IP address of the dynamically resolved domain name as the first portal IP address.
  • S243 Send a network connection request to the first IP address pool based on the first verification port and the first verification method in the DNS server, and verify whether the first network protocol is based on a connection result of the network connection request normal.
  • the ingress IP address of the DNS server for dynamically resolving domain names as the first ingress IP address, and configuring the first ingress IP address in the dynamically resolving domain names of the DNS server
  • the port corresponding to the entry IP is used to verify that the DNS server sends a network connection request to the first IP address pool in a first verification manner.
  • the DNS server actively sends network connections to all the first IP addresses in the first IP address pool at a preset first time interval. request, if the DNS server receives a response request returned by any first IP address in the first IP address pool within the preset time interval of twice the first time interval, it determines the The first network protocol is in an available state; otherwise, if the DNS server does not receive a response request returned by any first IP address in the first IP address pool within the preset time interval of twice the first time interval, Then it is determined that the first network protocol of the first IP address pool is in an unavailable state.
  • the first verification method is a seven-layer communication detection method
  • the difference between the seven-layer communication detection method and the four-layer communication detection method is that the DNS server takes the initiative to use a time greater than a preset first time.
  • the network connection request is sent to all the first IP addresses in the first IP address pool at intervals, and other detection methods are basically the same, which will not be repeated here.
  • step S24 the step of verifying whether the second network protocol of the second data center is normal based on the second IP address pool is the same as verifying the first network protocol in the first data based on the first IP address pool. Whether the steps are normal or not is the same, for details, please refer to the description of step S24.
  • FIG. 4 is a specific implementation flowchart of S25 in FIG. 2 . It can be seen from Figure 4 that S25 includes S251 to S253, which are described in detail as follows:
  • the second verification port is a port corresponding to the second entry IP, and the verification method includes a four-layer communication detection method or a seven-layer communication detection method.
  • S252 Configure the portal IP address of the dynamically resolved domain name as the second portal IP address.
  • S253 Send a network connection request to the second IP address pool based on the second verification port and the second verification method in the DNS server, and verify whether the second network protocol is based on the connection result of the network connection request normal.
  • the first data center and the second data center are determined based on the verification result of the first network protocol and the second network protocol and a preset traffic distribution policy.
  • the data traffic ratio of the data center may include: if the verification result of the first network protocol is in an unavailable state and the verification result of the second network protocol is in an available state, distributing all the data traffic that can be taken over by all applications to the second data center; exemplarily, the access log of the application instance in the first data center can be monitored or observed through the business.
  • unavailable prompt information can be returned to a predetermined client.
  • the application layer active-active method mounts the first IP address of each application instance of the pre-built first data center to the first entry IP address of the first data center , obtain the first IP address pool, mount the second IP addresses of each application instance of the second data center on the second entry IP address of the second data center, and obtain the second IP address pool; and then dynamically Parse the first IP address pool and the second IP address pool, verify the communication status of the corresponding entry IP addresses of the first data center and the second data center, and The communication state of the second entry IP address realizes the data traffic distribution between the first data center and the second data center, realizes the traffic balance between the first data center and the second data center in the application layer, and then improves the stability of the application layer active-active sex and flexibility.
  • FIG. 5 is an implementation flowchart of the application layer active-active method provided by the second embodiment of the present application. It should be noted that, the application layer active-active method provided in this embodiment is compared with the application layer active-active method shown in FIG. 2 , the specific implementation processes of S52 to S57 and S21 to S26 are the same, the difference is that before S52 It also includes S51, and S51 and S52 are in a sequential execution relationship. Details are as follows:
  • the first data center and the second data center may be pre-built by operation and maintenance personnel, and both the first data center and the second data center may be application layers. Provide data services.
  • pre-configuring the first data center and the second data center for active-active may include: sending services to the first data center and the second data center respectively by simulating http requests or user requests separately request, and determine the service status of the first data center and the second data center according to the response results returned by the first data center and the second data center; if the first data center and the second data center If the service status of the second data center is normal, it is determined that the configuration of the active-active first data center and the second data center is completed; if the service status of the first data center and the second data center is abnormal, then The operation and maintenance personnel need to re-build and configure until the service status of the first data center and the second data center is normal.
  • the application layer active-active method mounts the first IP addresses of each application instance of the pre-built first data center to the first entry IP address of the first data center. address, obtain the first IP address pool, mount the second IP addresses of each application instance of the second data center on the second entry IP address of the second data center, and obtain the second IP address pool; Dynamically parse the first IP address pool and the second IP address pool, verify the communication status of the respective corresponding entry IP addresses of the first data center and the second data center, and The communication state of the second entry IP address realizes the data traffic distribution between the first data center and the second data center, realizes the traffic balance between the first data center and the second data center in the application layer, and further improves the dual-active application layer. Stability and flexibility.
  • FIG. 6 is a structural block diagram of an application layer active-active device provided by a third embodiment of the present application.
  • Each module included in the application layer active-active device in this embodiment is used to execute each step in the embodiment corresponding to FIG. 2 or FIG. 5 .
  • the application layer active-active device 60 includes: including:
  • the obtaining module 61 is configured to obtain the first portal IP address of the first data center and the second portal IP address of the second data center.
  • the first obtaining module 62 is configured to respectively mount the first IP addresses of the first application instances of the first data center in the first entry IP addresses to obtain a first IP address pool.
  • the second obtaining module 63 is configured to respectively mount the second IP addresses of the second application instances of the second data center in the second entry IP addresses to obtain a second IP address pool.
  • the first verification module 64 is configured to verify whether the first network protocol of the first data center is normal based on the first IP address pool.
  • the second verification module 65 is configured to verify whether the second network protocol of the second data center is normal based on the second IP address pool.
  • a determination module 66 configured to determine the data traffic ratio of the first data center and the second data center based on the verification result of the first network protocol and the second network protocol and a preset traffic distribution strategy .
  • a configuration module configured to pre-configure the first data center and the second data center for active-active, wherein the first data center is the primary data center and the second data center is the backup data center.
  • the first obtaining module 62 is specifically used for:
  • the first IP address of each of the first application instances is mounted in the first entry IP address in a preset hardware load balancing device to obtain the first IP address pool.
  • the second obtaining module 63 is specifically used for:
  • the second IP address of each second application instance is mounted in the second entry IP address to obtain the second IP address pool; or,
  • the second IP address of each second application instance is mounted in the second entry IP address in a preset hardware load balancing device to obtain the second IP address pool.
  • the first verification module 64 includes:
  • a first configuration unit configured to configure a dynamic resolution domain name in the DNS server, and configure a first verification port and a first verification mode of the first network protocol and the first communication protocol in the dynamic resolution domain name;
  • a second configuration unit configured to configure the portal IP address of the dynamically resolved domain name as the first portal IP address
  • a first verification unit configured to send a network connection request to the first IP address pool based on the first verification port and the first verification method in the DNS server, and verify the network connection request based on the connection result of the network connection request. Whether the first network protocol is normal.
  • the second verification module 65 includes:
  • a third configuration unit configured to configure the second verification port and the second verification method of the second network protocol and the second communication protocol in the dynamically resolved domain name
  • a fourth configuration unit configured to configure the portal IP address of the dynamic resolution domain name as the second portal IP address
  • a second verification unit configured to send a network connection request to the second IP address pool based on the second verification port and the second verification method in the DNS server, and verify the network connection request based on the connection result of the network connection request. Whether the second network protocol is normal.
  • the first verification port is a port corresponding to the first entry IP, and the first verification method includes a Layer 4 communication detection method or a Layer 7 communication detection method;
  • the second verification port is a port corresponding to the second entry IP, and the verification method includes the Layer 4 communication detection method or the Layer 7 communication detection method.
  • each module is used to execute each step in the embodiment corresponding to FIG. 2 or FIG.
  • the steps in the above embodiments have been explained in detail in the above-mentioned embodiments.
  • FIG. 7 is a structural block diagram of a computer device provided by a fourth embodiment of the present application.
  • the computer device 70 of this embodiment includes: a processor 71 , a memory 72 , and a computer program 73 stored in the memory 72 and executable on the processor 71 , such as an application-layer active-active program .
  • the processor 71 executes the computer program 73
  • the steps in each of the foregoing embodiments of the application layer active-active method are implemented, for example, S21 to S26 shown in FIG. 2 .
  • the processor 71 executes the computer program 73
  • the functions of the modules or units in the embodiment corresponding to FIG. 6 are implemented, for example, the functions of the modules 61 to 66 shown in FIG.
  • the relevant descriptions in the embodiments are not repeated here.
  • the computer program 73 may be divided into one or more units, and the one or more units are stored in the memory 72 and executed by the processor 71 to complete the present application.
  • the one or more units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 73 in the computer device 70 .
  • the computer program 73 may be divided into an acquisition module, a first acquisition module, a second acquisition module, a first verification module, a second verification module, and a determination module; the specific functions of each module are described in FIG. 6 .
  • the computer equipment may include, but is not limited to, a processor 71 and a memory 72 .
  • FIG. 7 is only an example of the computer device 70, and does not constitute a limitation on the computer device 70, and may include more or less components than the one shown, or combine some components, or different components
  • the turntable device may further include an input and output device, a network access device, a bus, and the like.
  • the so-called processor 71 may be a central processing unit (Central Processing Unit, CPU), and may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSP), application-specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the memory 72 may be an internal storage unit of the computer device 70 , such as a hard disk or a memory of the computer device 70 .
  • the memory 72 may also be an external storage device of the online computer device 70, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) equipped on the computer device 70 ) card, Flash Card, etc.
  • the memory 72 may also include both an internal storage unit of the computer device 70 and an external storage device.
  • the memory 72 is used to store the computer program and other programs and data required by the computer device 70 .
  • the memory 72 may also be used to temporarily store data that has been output or is to be output.
  • Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, the computer program includes program instructions, and the method implemented when the program instructions are executed may refer to this document Various embodiments of the application layer active-active method are applied.
  • the computer-readable storage medium may be non-volatile or volatile.
  • the computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiments, such as a hard disk or a memory of the computer device.
  • the computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) equipped on the computer device ) card, flash card (Flash Card) and so on.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请适用于安全监控技术领域,提供了一种应用层双活方法、装置、设备及存储介质;该方法通过将预先搭建的第一数据中心的各个应用实例的第一IP地址挂载在所述第一数据中心的第一入口IP地址上,得到第一IP地址池,将第二数据中心的各个应用实例的第二IP地址挂载在所述第二数据中心的第二入口IP地址上,得到第二IP地址池;进而分别动态解析所述第一IP地址池和所述第二IP地址池,验证所述第一数据中心和所述第二数据中心各自对应的入口IP地址的通信状态,并根据第一入口IP地址和所述第二入口IP地址的通信状态实现第一数据中心和第二数据中心的数据流量分配,实现了第一数据中心和第二数据中心在应用层的流量均衡,进而提高应用层双活的稳定性以及灵活性。

Description

应用层双活方法、装置、设备及存储介质
本申请要求于2020年12月03日提交中国专利局、申请号为202011401756.9、发明名称为“应用层双活方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及安全监控技术领域,尤其涉及一种应用层双活方法、装置、设备及存储介质。
背景技术
目前,应用层的双活方案均是基于软件负载均衡的方式实现,但是发明人意识到,由于软件负载均衡方式相较于硬件负载均衡方式而言,其性能较底且稳定性不高,一旦负载均衡失败,则导致双活的目的无法达成。
因此,现有的应用层双活方案由于使用软件负载均衡方式,存在性能较低且不稳定的问题。
技术问题
本申请实施例的目的之一在于:提供了一种应用层双活方法、装置、设备及存储介质,以解决现有技术中由于而导致的问题。
技术解决方案
为解决上述技术问题,本申请实施例采用的技术方案是:
本申请实施例第一方面提供了一种应用层双活方法,包括:
获取第一数据中心的第一入口IP地址和第二数据中心的第二入口IP地址;
在所述第一入口IP地址中分别挂载所述第一数据中心的各个第一应用实例的第一IP地址,得到第一IP地址池;
在所述第二入口IP地址中分别挂载所述第二数据中心的各个第二应用实例的第二IP地址,得到第二IP地址池;
基于所述第一IP地址池验证所述第一数据中心的第一网络协议是否正常;
基于所述第二IP地址池验证所述第二数据中心的第二网络协议是否正常;
基于对所述第一网络协议和所述第二网络协议的验证结果和预设的流量分配策略,确定所述第一数据中心和所述第二数据中心的数据流量比。
本申请实施例第二方面提供了一种应用层双活装置,包括:
获取模块,用于获取第一数据中心的第一入口IP地址和第二数据中心的第二入口IP地址;
第一得到模块,用于在所述第一入口IP地址中分别挂载所述第一数据中心的各个第一应用实例的第一IP地址,得到第一IP地址池;
第二得到模块,用于在所述第二入口IP地址中分别挂载所述第二数据中心的各个第二应用实例的第二IP地址,得到第二IP地址池;
第一验证模块,用于基于所述第一IP地址池验证所述第一数据中心的第一网络协议是否正常;
第二验证模块,用于基于所述第二IP地址池验证所述第二数据中心的第二网络协议是否正常;
确定模块,用于基于对所述第一网络协议和所述第二网络协议的验证结果和预设的流量分配策略,确定所述第一数据中心和所述第二数据中心的数据流量比。
本申请实施例第三方面提供一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述线上理赔设备上运行的计算机程序,所述处理器执行所述计算机程序时如下步骤:
获取第一数据中心的第一入口IP地址和第二数据中心的第二入口IP地址;
在所述第一入口IP地址中分别挂载所述第一数据中心的各个第一应用实例的第一IP地址,得到第一IP地址池;
在所述第二入口IP地址中分别挂载所述第二数据中心的各个第二应用实例的第二IP地址,得到第二IP地址池;
基于所述第一IP地址池验证所述第一数据中心的第一网络协议是否正常;
基于所述第二IP地址池验证所述第二数据中心的第二网络协议是否正常;
基于对所述第一网络协议和所述第二网络协议的验证结果和预设的流量分配策略,确定所述第一数据中心和所述第二数据中心的数据流量比。
本申请实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如下步骤:
获取第一数据中心的第一入口IP地址和第二数据中心的第二入口IP地址;
在所述第一入口IP地址中分别挂载所述第一数据中心的各个第一应用实例的第一IP地址,得到第一IP地址池;
在所述第二入口IP地址中分别挂载所述第二数据中心的各个第二应用实例的第二IP地址,得到第二IP地址池;
基于所述第一IP地址池验证所述第一数据中心的第一网络协议是否正常;
基于所述第二IP地址池验证所述第二数据中心的第二网络协议是否正常;
基于对所述第一网络协议和所述第二网络协议的验证结果和预设的流量分配策略,确定所述第一数据中心和所述第二数据中心的数据流量比。
有益效果
本申请实施例提供的一种应用层双活方法,与现有技术相比,通过基于DNS服务器将预先搭建的第一数据中心的各个应用实例的第一IP地址挂载在所述第一数据中心的第一入口IP地址上,得到第一IP地址池,将第二数据中心的各个应用实例的第二IP地址挂载在所述第二数据中心的第二入口IP地址上,得到第二IP地址池;进而通过DNS服务器分别动态解析所述第一IP地址池和所述第二IP地址池,验证所述第一数据中心和所述第二数据中心各自对应的入口IP地址的通信状态,并根据第一入口IP地址和所述第二入口IP地址的通信状态实现第一数据中心和第二数据中心的数据流量分配。实现了双活数据中心在应用层的流量均衡,进而提高应用层双活的稳定性以及灵活性。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请第一实施例提供的应用层双活系统的结构示意图;
图2是本申请第二实施例提供的应用层双活方法的流程示意图;
图3是图2中S24的具体实现流程图;
图4是图2中S25的具体实现流程图;
图5是本申请第二实施例提供的应用层双活方法的实现流程图;
图6是本申请第三实施例提供的应用层双活装置的结构框图;
图7是本申请第四实施例提供的计算机设备的结构框图。
本发明的实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请实施例所涉及的应用层双活方法,可以由计算机设备执行。所述计算机设备包括但不限于单个服务器或者云服务器集群等,在此不做具体限定。
本申请实施例所涉及的应用层双活方法,应用于企业的灾备场景中,例如企业出于对业务更高级别的保护,要求业务系统在人为误操作、恶意攻击、自然灾害等突发事件之后还能够继续提供服务的场景中,采用双活方案来保证业务的连续性。而应用层双活指的是从应用层实现跨区域数据中心的业务双活,每个区域的数据中心均可对外提供业务,并在一个区域的数据中心发生灾难时,另一区域的数据中心可接管所有业务。
下面具体结合附图,对本申请实施例提供的应用层双活原理及应用场景进行示例性的说明。
如图1所示,图1是本申请第一实施例提供的应用层双活系统的结构示意图。如图1可知,本申请实施例提供的应用层双活系统100包括第一数据中心101、第二数据中心102和计算机设备103。示例性地,第一数据中心101为预先部署的主数据中心,第二数据中心102为预先部署的备数据中心,计算机设备103为预先部署的服务器。具体地,所述第一数据中心101和所述第二数据中心102由应用运维人员在应用部署上线时,预先搭建完成。所述第一数据中心101和所述第二数据中心102可以同时对外提供服务,所述第一数据中心101和所述第二数据中心102均与所述计算机设备103通信连接,所述计算机设备103用于通过将第一数据中心101的各个应用实例的第一IP地址挂载在所述第一数据中心101的第一入口IP地址上,得到第一IP地址池,将第二数据中心102的各个应用实例的第二IP地址挂载在所述第二数据中心102的第二入口IP地址上,得到第二IP地址池;进而分别动态解析所述第一IP地址池和所述第二IP地址池,验证所述第一数据中心101和所述第二数据中心102各自对应的入口IP地址的通信状态,并根据第一入口IP地址和所述第二入口IP地址的通信状态实现第一数据中心101和第二数据中心102的数据流量分配,实现了第一数据中心101和第二数据中心102在应用层的流量均衡,进而提高应用层双活的稳定性以及灵活性。
如图2所示,图2是本申请第二实施例提供的应用层双活方法的流程示意图。如图2所述,本实施例提供的应用层双活方法包括S21至S26。详述如下:
S21,获取第一数据中心的第一入口IP地址和第二数据中心的第二入口IP地址。
在本申请的实施例中,所述第一入口IP地址和所述第二入口IP地址均为预先确定好的虚拟VIP地址,类似于方向代理;所述第一入口IP地址可以将所有访问所述第一数据中心的请求,转发给第一数据中心的各个第一应用实例的第一IP地址上。同样,所述第二入口IP地址可以将所有访问所述第二数据中心的请求,转发给第二数据中心的各个第二应用实例的第二IP地址上。
此外,所述第一入口IP和所述第二入口IP均可以是通过软件负载均衡反向代理nginx配置的虚拟IP,也可以是通过硬件负载均衡设备F5-LTM配置的虚拟IP。其中,虚拟IP可以简称为VIP。
S22,在所述第一入口IP地址中分别挂载所述第一数据中心的各个第一应用实例的第一IP地址,得到第一IP地址池。
在本申请的实施例中,所述第一IP地址有多个,在所述第一入口IP地址中分别挂载所述第一数据中心的各个第一应用实例的第一IP地址,得到第一IP地址池,可以包括:在预设的反向代理web服务器中将各个所述第一应用实例的所述第一IP地址挂载在所述第一入口IP地址中,得到所述第一IP地址池;或者,在预设的硬件负载均衡设备中将各个所述第一应用实例的所述第一IP地址挂载在所述第一入口IP地址中,得到所述第一IP地址池。其中,所述第一IP地址池包括至少一个第一IP地址。
示例性地,在预设的方向代理web服务器中解析并动态获取各个所述第一应用实例的所述第一IP地址,并将动态获取的各个所述第一IP地址分别按照获取顺序挂载在所述第一入口IP地址中,得到所述第一IP地址池。
或者,在预设的硬件负载均衡设备中解析并动态获取各个所述第一应用实例的所述第一IP地址,并将动态获取的各个所述第一IP地址分别按照获取顺序挂载在所述第一入口IP地址中,得到所述第一IP地址池。
S23,在所述第二入口IP地址中分别挂载所述第二数据中心的各个第二应用实例的第二IP地址,得到第二IP地址池。
在本申请的实施例中,在所述第二入口IP地址中分别挂载所述第二数据中心的各个第二应用实例的第二IP地址,得到第二IP地址池,可以包括:在预设的反向代理web服务器中将各个所述第二应用实例的所述第二IP地址挂载在所述第二入口IP地址中,得到所述第二IP地址池;或者,在预设的硬件负载均衡设备中将各个所述第二应用实例的所述第二IP地址挂载在所述第二入口IP地址中,得到所述第二IP地址池。
S24,基于所述第一IP地址池验证所述第一数据中心的第一网络协议是否正常。
其中,所述第一网络协议包括传输控制协议TCP/IP或超文本传输协议HTTP。具体地,在本实施例中,可以通过在DNS服务器中配置一个动态解析域名,基于所述动态解析域名设置根据所述第一IP地址池验证所述第一数据中心的第一网络协议是否正常的第一验证方式,对所述第一数据中心的第一网络协议进行验证。
示例性地,如图3所示,图3是图2中S24的具体实现流程图。由图3可知,S24包括S241至S243,详述如下:
S241,在DNS服务器中配置一个动态解析域名,在所述动态解析域名中配置所述第一网络协议的第一验证端口和第一验证方式。
所述第一验证端口为所述第一入口IP对应的端口,例如,第一入口IP对应的端口范围是1024到65535。所述第一验证方式包括四层通信探测方式或七层通信探测方式。具体地,所述四层通信探测方式和所述七层通信探测方式可以参考现有的四层通信探测方式和七层通信探测方式,在此不再赘述。
S242,将所述动态解析域名的入口网络互连协议IP地址配置为所述第一入口IP地址。
S243,在DNS服务器中基于所述第一验证端口和所述第一验证方式向所述第一IP地址池发送网络连接请求,基于所述网络连接请求的连接结果验证所述第一网络协议是否正常。
在本申请的实施例中,通过将所述DNS服务器的动态解析域名的入口网络互连协议IP地址配置为所述第一入口IP地址,并在所述DNS服务器的动态解析域名中配置第一入口IP对应的端口,实现通过所述DNS服务器以第一验证方式验证向所述第一IP地址池发送网络连接请求。
示例性地,假设所述第一验证方式为四层通信探测方式,则通过所述DNS服务器主动向所述第一IP地址池内的所有第一IP地址以预设的第一时间间隔发送网络连接请求,若在2倍的所述第一时间间隔预设内,所述DNS服务器接收到所述第一IP地址池内任意一个第一IP地址返回的应答请求,则确定该第一IP地址池的第一网络协议为可用状态;反之,若在2倍的所述第一时间间隔预设内,所述DNS服务器没有接收到所述第一IP地址池内任意一个第一IP地址返回的应答请求,则确定该第一IP地址池的第一网络协议为不可用状态。
此外,假设所述第一验证方式为七层通信探测方式,所述七层通信探测方式与所述四层通信探测方式相比,不同之处在于,DNS服务器主动以大于预设的第一时间间隔向所述第一IP地址池内的所有第一IP地址发送网络连接请求,其余探测方式基本相同,在此不再赘述。
S25,基于所述第二IP地址池验证所述第二数据中心的第二网络协议是否正常。
需要说明的是,基于所述第二IP地址池验证所述第二数据中心的第二网络协议是否正常的步骤和基于所述第一IP地址池验证所述第一数据中的第一网络协议是否正常的步骤相同,具体可参考步骤S24的描述。
示例性地,如图4所示,图4是图2中S25的具体实现流程图。由图4可知,S25包括S251至S253,详述如下:
S251,在所述动态解析域名中配置所述第二IP地址池的第二网络协议的第二验证端口和第二验证方式。
所述第二验证端口为所述第二入口IP对应的端口,所述验证方式包括四层通信探测方式或七层通信探测方式。
S252,将所述动态解析域名的入口网络互连协议IP地址配置为所述第二入口IP地址。
S253,在DNS服务器中基于所述第二验证端口和所述第二验证方式向所述第二IP地址池发送网络连接请求,基于所述网络连接请求的连接结果验证所述第二网络协议是否正常。
S26,基于对所述第一网络协议和所述第二网络协议的验证结果和预设的流量分配策略,确定所述第一数据中心和所述第二数据中心的数据流量比。
示例性地,在本申请的实施例中,基于对所述第一网络协议和所述第二网络协议的验证结果和预设的流量分配策略,确定所述第一数据中心和所述第二数据中心的数据流量比,可以包括:若对所述第一网络协议的验证结果为不可用状态,所述第二网络协议的验证结果为可以状态,则将所有应用能接管的数据流量全部分发至第二数据中心;示例性地,可以通过业务监控或观察第一数据中心的应用实例访问日志,当访问日志无新建请求进来,则表示所有应用流量已全部切换到第二数据中心;若所述第二网络协议为不可用状态,所述第一网络协议为可用状态,则将所有应用能接管的数据流量全部分发至第一数据中心;示例性地,可以通过业务监控或观察第二数据中心的应用实例访问日志,当访问日志无新建请求进来,则表示流量已全部切换到第一数据中心;若第一网络协议和第二网络协议均处于可用状态时,按照设定的主数据中心和备数据中心,主数据中心和备数据中心的轮询规则,以及流了分配比例将所述应用能接管的数据流程轮询分配至第一数据中心和第二数据中心。
此外,可以理解地,当第一通信协议和第二通信协议均处于不可用状态时,可以返回不可用提示信息给预先确定的客户端。
通过上述分析可知,本申请实施例提供的应用层双活方法,通过将预先搭建的第一数据中心的各个应用实例的第一IP地址挂载在所述第一数据中心的第一入口IP地址上,得到第一IP地址池,将第二数据中心的各个应用实例的第二IP地址挂载在所述第二数据中心的第二入口IP地址上,得到第二IP地址池;进而分别动态解析所述第一IP地址池和所述第二IP地址池,验证所述第一数据中心和所述第二数据中心各自对应的入口IP地址的通信状态,并根据第一入口IP地址和所述第二入口IP地址的通信状态实现第一数据中心和第二数据中心的数据流量分配,实现了第一数据中心和第二数据中心在应用层的流量均衡,进而提高应用层双活的稳定性以及灵活性。
如图5所示,图5是本申请第二实施例提供的应用层双活方法的实现流程图。需要说明的是,本实施例提供的应用层双活方法与图2所示的应用层双活方法相比,S52至S57与S21至S26的具体实现过程相同,不同之处在于,在S52之前还包括S51,S51与S52为顺序执行关系。详述如下:
S51,预先配置双活的所述第一数据中心和所述第二数据中心,其中,所述第一数据中心为主数据中心,所述第二数据中心为备数据中心。
示例性地,在本实施例中,可以通过运维人员预先分别搭建所述第一数据中心和所述第二数据中心,所述第一数据中心和所述第二数据中心均可以为应用层提供数据服务。
此外,预先配置双活的所述第一数据中心和第二数据中心,可以包括:通过单独模拟http请求或者用户请求的方式,分别向所述第一数据中心和所述第二数据中心发送服务请求,并根据所述第一数据中心和所述第二数据中心返回的应答结果,确定所述第一数据中心和所述第二数据中心的服务状态;若所述第一数据中心和所述第二数据中心的服务状态均正常,则确定配置完成所述双活的第一数据中心和第二数据中心;若所述第一数据中心和所述第二数据中心的服务状态有异常,则需要运维人员重新进行搭建配置,直至所述第一数据中心和所述第二数据中心的服务状态正常。
S52,获取第一数据中心的第一入口IP地址和第二数据中心的第二入口IP地址。
S53,在所述第一入口IP地址中分别挂载所述第一数据中心的各个第一应用实例的第一IP地址,得到第一IP地址池。
S54,在所述第二入口IP地址中分别挂载所述第二数据中心的各个第二应用实例的第二IP地址,得到第二IP地址池。
S55,基于所述第一IP地址池验证所述第一数据中心的第一网络协议是否正常。
S56,基于所述第二IP地址池验证所述第二数据中心的第二网络协议是否正常。
S57,基于对所述第一网络协议和所述第二网络协议的验证结果和预设的流量分配策略,确定所述第一数据中心和所述第二数据中心的数据流量比。
由以上分析可以看出,本实施例提供的应用层双活方法,通过将预先搭建的第一数据中心的各个应用实例的第一IP地址挂载在所述第一数据中心的第一入口IP地址上,得到第一IP地址池,将第二数据中心的各个应用实例的第二IP地址挂载在所述第二数据中心的第二入口IP地址上,得到第二IP地址池;进而分别动态解析所述第一IP地址池和所述第二IP地址池,验证所述第一数据中心和所述第二数据中心各自对应的入口IP地址的通信状态,并根据第一入口IP地址和所述第二入口IP地址的通信状态实现第一数据中心和第二数据中心的数据流量分配,实现了第一数据中心和第二数据中心在应用层的流量均衡,进而提高应用层双活的稳定性以及灵活性。
如图6所示,图6是本申请第三实施例提供的应用层双活装置的结构框图。本实施例中的应用层双活装置包括的各模块用于执行图2或图5对应的实施例中的各步骤。具体请图2或图5所对应的实施例中的相关描述。为了便于说明,仅示出了与本实施例相关的部分。参见图6,应用层双活装置60包括:包括:
获取模块61,用于获取第一数据中心的第一入口IP地址和第二数据中心的第二入口IP地址。
第一得到模块62,用于在所述第一入口IP地址中分别挂载所述第一数据中心的各个第一应用实例的第一IP地址,得到第一IP地址池。
第二得到模块63,用于在所述第二入口IP地址中分别挂载所述第二数据中心的各个第二应用实例的第二IP地址,得到第二IP地址池。
第一验证模块64,用于基于所述第一IP地址池验证所述第一数据中心的第一网络协议是否正常。
第二验证模块65,用于基于所述第二IP地址池验证所述第二数据中心的第二网络协议是否正常。
确定模块66,用于基于对所述第一网络协议和所述第二网络协议的验证结果和预设的流量分配策略,确定所述第一数据中心和所述第二数据中心的数据流量比。
在一可选的实现方式中,还包括:
配置模块,用于预先配置双活的所述第一数据中心和所述第二数据中心,其中,所述第一数据中心为主数据中心,所述第二数据中心为备数据中心。
在一可选的实现方式中,所述第一得到模块62,具体用于:
在预设的反向代理web服务器中将各个所述第一应用实例的所述第一IP地址挂载在所述第一入口IP地址中,得到所述第一IP地址池;或者,
在预设的硬件负载均衡设备中将各个所述第一应用实例的所述第一IP地址挂载在所述第一入口IP地址中,得到所述第一IP地址池。
在一可选的实现方式中,所述第二得到模块63,具体用于:
在预设的反向代理web服务器中将各个所述第二应用实例的所述第二IP地址挂载在所述第二入口IP地址中,得到所述第二IP地址池;或者,
在预设的硬件负载均衡设备中将各个所述第二应用实例的所述第二IP地址挂载在所述第二入口IP地址中,得到所述第二IP地址池。
在一可选的实现方式中,第一验证模块64,包括:
第一配置单元,用于在DNS服务器中配置一个动态解析域名,在所述动态解析域名中配置所述第一网络协议和所述第一通信协议的第一验证端口和第一验证方式;
第二配置单元,用于将所述动态解析域名的入口网络互连协议IP地址配置为所述第一入口IP地址;
第一验证单元,用于在DNS服务器中基于所述第一验证端口和所述第一验证方式向所述第一IP地址池发送网络连接请求,基于所述网络连接请求的连接结果验证所述第一网络协议是否正常。
在一可选的实现方式中,第二验证模块65,包括:
第三配置单元,用于在所述动态解析域名中配置所述第二网络协议和所述第二通信协议的第二验证端口和第二验证方式;
第四配置单元,用于将所述动态解析域名的入口网络互连协议IP地址配置为所述第二入口IP地址;
第二验证单元,用于在DNS服务器中基于所述第二验证端口和所述第二验证方式向所述第二IP地址池发送网络连接请求,基于所述网络连接请求的连接结果验证所述第二网络协议是否正常。
在一可选的实现方式中,所述第一验证端口为所述第一入口IP对应的端口,所述第一验证方式包括四层通信探测方式或七层通信探测方式;
所述第二验证端口为所述第二入口IP对应的端口,所述验证方式包括所述四层通信探测方式或所述七层通信探测方式。
应当理解的是,图6示出的应用层双活装置60的结构框图中,各模块用于执行图2或图5对应的实施例中的各步骤,而对于图2或图5对应的实施例中的各步骤已在上述实施例中进行详细解释,具体请参阅图2或图5所对应的实施例中的相关描述,此处不再赘述。
图7是本申请第四实施例提供的计算机设备的结构框图。如图7所示,该实施例的计算机设备70包括:处理器71、存储器72以及存储在所述存储器72中并可在所述处理器71上运行的计算机程序73,例如应用层双活程序。处理器71执行所述计算机程序73时实现上述各个应用层双活方法各实施例中的步骤,例如图2所示的S21至S26。或者,所述处理器71执行所述计算机程序73时实现上述图6对应的实施例中各模块或单元的功能,例如,图6所示的模块61至66的功能,具体请参阅图6对应的实施例中的相关描述,此处不赘述。
示例性的,所述计算机程序73可以被分割成一个或多个单元,所述一个或者多个单元被存储在所述存储器72中,并由所述处理器71执行,以完成本申请。所述一个或多个单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序73在所述计算机设备70中的执行过程。例如,所述计算机程序73可以被分割成包括获取模块、第一得到模块、第二得到模块、第一验证模块、第二验证模块以及确定模块;各模块具体功能如图6所述。
所述计算机设备可包括,但不仅限于,处理器71、存储器72。本领域技术人员可以理解,图7仅仅是计算机设备70的示例,并不构成对计算机设备70的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述转台设备还可以包括输入输出设备、网络接入设备、总线等。
所称处理器71可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
所述存储器72可以是所述计算机设备70的内部存储单元,例如计算机设备70的硬盘或内存。所述存储器72也可以是所述线计算机设备70的外部存储设备,例如所述计算机设备70上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器72还可以既包括所述计算机设备70的内部存储单元也包括外部存储设备。所述存储器72用于存储所述计算机程序以及所述计算机设备70所需的其他程序和数据。所述存储器72还可以用于暂时地存储已经输出或者将要输出的数据。
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序中包括程序指令,所述程序指令被执行时所实现的方法可参照本申请应用层双活方法的各个实施例。
其中,所述计算机可读存储介质可以是非易失性,也可以是易失性。所述计算机可读存储介质可以是前述实施例所述的计算机设备的内部存储单元,例如所述计算机设备的硬盘或内存。所述计算机可读存储介质也可以是所述计算机设备的外部存储设备,例如所述计算机设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种应用层双活方法,其中,包括:
    获取第一数据中心的第一入口IP地址和第二数据中心的第二入口IP地址;
    在所述第一入口IP地址中分别挂载所述第一数据中心的各个第一应用实例的第一IP地址,得到第一IP地址池;
    在所述第二入口IP地址中分别挂载所述第二数据中心的各个第二应用实例的第二IP地址,得到第二IP地址池;
    基于所述第一IP地址池验证所述第一数据中心的第一网络协议是否正常;
    基于所述第二IP地址池验证所述第二数据中心的第二网络协议是否正常;
    基于对所述第一网络协议和所述第二网络协议的验证结果和预设的流量分配策略,确定所述第一数据中心和所述第二数据中心的数据流量比。
  2. 如权利要求1所述的方法,其中,在获取第一数据中心的第一入口IP地址和第二数据中心的第二入口IP地址之前,还包括:
    预先配置双活的所述第一数据中心和所述第二数据中心,其中,所述第一数据中心为主数据中心,所述第二数据中心为备数据中心。
  3. 如权利要求2所述的方法,其中,在所述第一入口IP地址中分别挂载所述第一数据中心的各个第一应用实例的第一IP地址,得到第一IP地址池,包括:
    在预设的反向代理web服务器中将各个所述第一应用实例的所述第一IP地址挂载在所述第一入口IP地址中,得到所述第一IP地址池;或者,
    在预设的硬件负载均衡设备中将各个所述第一应用实例的所述第一IP地址挂载在所述第一入口IP地址中,得到所述第一IP地址池。
  4. 如权利要求3所述的方法,其中,在所述第二入口IP地址中分别挂载所述第二数据中心的各个第二应用实例的第二IP地址,得到第二IP地址池,包括:
    在预设的反向代理web服务器中将各个所述第二应用实例的所述第二IP地址挂载在所述第二入口IP地址中,得到所述第二IP地址池;或者,
    在预设的硬件负载均衡设备中将各个所述第二应用实例的所述第二IP地址挂载在所述第二入口IP地址中,得到所述第二IP地址池。
  5. 如权利要求4所述的方法,其中,基于所述第一IP地址池验证所述第一数据中心的第一网络协议是否正常,包括:
    在DNS服务器中配置一个动态解析域名,在所述动态解析域名中配置所述第一IP地址池的第一网络协议的第一验证端口和第一验证方式;
    将所述动态解析域名的入口网络互连协议IP地址配置为所述第一入口IP地址;
    在DNS服务器中基于所述第一验证端口和所述第一验证方式向所述第一IP地址池发送网络连接请求,基于所述网络连接请求的连接结果验证所述第一网络协议是否正常。
  6. 如权利要求5所述的方法,其中,基于所述第二IP地址池验证所述第二数据中心的第二网络协议是否正常,包括:
    在所述动态解析域名中配置所述第二IP地址池的第二网络协议的第二验证端口和第二验证方式;
    将所述动态解析域名的入口网络互连协议IP地址配置为所述第二入口IP地址;
    在DNS服务器中基于所述第二验证端口和所述第二验证方式向所述第二IP地址池发送网络连接请求,基于所述网络连接请求的连接结果验证所述第二网络协议是否正常。
  7. 如权利要求5或6所述的方法,其中,所述第一验证端口为所述第一入口IP对应的端口,所述第一验证方式包括四层通信探测方式或七层通信探测方式;
    所述第二验证端口为所述第二入口IP对应的端口,所述验证方式包括所述四层通信探测方式或所述七层通信探测方式。
  8. 一种应用层双活装置,其中,包括:
    获取模块,用于获取第一数据中心的第一入口IP地址和第二数据中心的第二入口IP地址;
    第一得到模块,用于在所述第一入口IP地址中分别挂载所述第一数据中心的各个第一应用实例的第一IP地址,得到第一IP地址池;
    第二得到模块,用于在所述第二入口IP地址中分别挂载所述第二数据中心的各个第二应用实例的第二IP地址,得到第二IP地址池;
    第一验证模块,用于基于所述第一IP地址池验证所述第一数据中心的第一网络协议是否正常;
    第二验证模块,用于基于所述第二IP地址池验证所述第二数据中心的第二网络协议是否正常;
    确定模块,用于基于对所述第一网络协议和所述第二网络协议的验证结果和预设的流量分配策略,确定所述第一数据中心和所述第二数据中心的数据流量比。
  9. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现如下步骤:
    获取第一数据中心的第一入口IP地址和第二数据中心的第二入口IP地址;
    在所述第一入口IP地址中分别挂载所述第一数据中心的各个第一应用实例的第一IP地址,得到第一IP地址池;
    在所述第二入口IP地址中分别挂载所述第二数据中心的各个第二应用实例的第二IP地址,得到第二IP地址池;
    基于所述第一IP地址池验证所述第一数据中心的第一网络协议是否正常;
    基于所述第二IP地址池验证所述第二数据中心的第二网络协议是否正常;
    基于对所述第一网络协议和所述第二网络协议的验证结果和预设的流量分配策略,确定所述第一数据中心和所述第二数据中心的数据流量比。
  10. 如权利要求9所述的计算机设备,其中,所述处理器在执行获取第一数据中心的第一入口IP地址和第二数据中心的第二入口IP地址之前,还用于实现以下步骤:
    预先配置双活的所述第一数据中心和所述第二数据中心,其中,所述第一数据中心为主数据中心,所述第二数据中心为备数据中心。
  11. 如权利要求10所述的计算机设备,其中,所述处理器执行在所述第一入口IP地址中分别挂载所述第一数据中心的各个第一应用实例的第一IP地址,得到第一IP地址池时,用于实现:
    在预设的反向代理web服务器中将各个所述第一应用实例的所述第一IP地址挂载在所述第一入口IP地址中,得到所述第一IP地址池;或者,
    在预设的硬件负载均衡设备中将各个所述第一应用实例的所述第一IP地址挂载在所述第一入口IP地址中,得到所述第一IP地址池。
  12. 如权利要求11所述的计算机设备,其中,所述处理器执行在所述第二入口IP地址中分别挂载所述第二数据中心的各个第二应用实例的第二IP地址,得到第二IP地址池时,用于实现:
    在预设的反向代理web服务器中将各个所述第二应用实例的所述第二IP地址挂载在所述第二入口IP地址中,得到所述第二IP地址池;或者,
    在预设的硬件负载均衡设备中将各个所述第二应用实例的所述第二IP地址挂载在所述第二入口IP地址中,得到所述第二IP地址池。
  13. 如权利要求12所述的计算机设备,其中,所述处理器执行基于所述第一IP地址池验证所述第一数据中心的第一网络协议是否正常时,用于实现:
    在DNS服务器中配置一个动态解析域名,在所述动态解析域名中配置所述第一IP地址池的第一网络协议的第一验证端口和第一验证方式;
    将所述动态解析域名的入口网络互连协议IP地址配置为所述第一入口IP地址;
    在DNS服务器中基于所述第一验证端口和所述第一验证方式向所述第一IP地址池发送网络连接请求,基于所述网络连接请求的连接结果验证所述第一网络协议是否正常。
  14. 如权利要求13所述的计算机设备,其中,所述处理器执行基于所述第二IP地址池验证所述第二数据中心的第二网络协议是否正常时,用于实现:
    在所述动态解析域名中配置所述第二IP地址池的第二网络协议的第二验证端口和第二验证方式;
    将所述动态解析域名的入口网络互连协议IP地址配置为所述第二入口IP地址;
    在DNS服务器中基于所述第二验证端口和所述第二验证方式向所述第二IP地址池发送网络连接请求,基于所述网络连接请求的连接结果验证所述第二网络协议是否正常。
  15. 如权利要求13-14所述的计算机设备,其中,所述第一验证端口为所述第一入口IP对应的端口,所述第一验证方式包括四层通信探测方式或七层通信探测方式;
    所述第二验证端口为所述第二入口IP对应的端口,所述验证方式包括所述四层通信探测方式或所述七层通信探测方式。
  16. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其中,所述处理器执行所述计算机程序时实现如下步骤:
    获取第一数据中心的第一入口IP地址和第二数据中心的第二入口IP地址;
    在所述第一入口IP地址中分别挂载所述第一数据中心的各个第一应用实例的第一IP地址,得到第一IP地址池;
    在所述第二入口IP地址中分别挂载所述第二数据中心的各个第二应用实例的第二IP地址,得到第二IP地址池;
    基于所述第一IP地址池验证所述第一数据中心的第一网络协议是否正常;
    基于所述第二IP地址池验证所述第二数据中心的第二网络协议是否正常;
    基于对所述第一网络协议和所述第二网络协议的验证结果和预设的流量分配策略,确定所述第一数据中心和所述第二数据中心的数据流量比。
  17. 如权利要求16所述的计算机设备,其中,所述处理器在执行获取第一数据中心的第一入口IP地址和第二数据中心的第二入口IP地址之前,还用于实现以下步骤:
    预先配置双活的所述第一数据中心和所述第二数据中心,其中,所述第一数据中心为主数据中心,所述第二数据中心为备数据中心。
  18. 如权利要求17所述的计算机设备,其中,所述处理器执行在所述第一入口IP地址中分别挂载所述第一数据中心的各个第一应用实例的第一IP地址,得到第一IP地址池时,用于实现:
    在预设的反向代理web服务器中将各个所述第一应用实例的所述第一IP地址挂载在所述第一入口IP地址中,得到所述第一IP地址池;或者,
    在预设的硬件负载均衡设备中将各个所述第一应用实例的所述第一IP地址挂载在所述第一入口IP地址中,得到所述第一IP地址池。
  19. 如权利要求18所述的计算机设备,其中,所述处理器执行在所述第二入口IP地址中分别挂载所述第二数据中心的各个第二应用实例的第二IP地址,得到第二IP地址池时,用于实现:
    在预设的反向代理web服务器中将各个所述第二应用实例的所述第二IP地址挂载在所述第二入口IP地址中,得到所述第二IP地址池;或者,
    在预设的硬件负载均衡设备中将各个所述第二应用实例的所述第二IP地址挂载在所述第二入口IP地址中,得到所述第二IP地址池。
  20. 如权利要求19所述的计算机设备,其中,所述处理器执行基于所述第一IP地址池验证所述第一数据中心的第一网络协议是否正常时,用于实现:
    在DNS服务器中配置一个动态解析域名,在所述动态解析域名中配置所述第一IP地址池的第一网络协议的第一验证端口和第一验证方式;
    将所述动态解析域名的入口网络互连协议IP地址配置为所述第一入口IP地址;
    在DNS服务器中基于所述第一验证端口和所述第一验证方式向所述第一IP地址池发送网络连接请求,基于所述网络连接请求的连接结果验证所述第一网络协议是否正常。
PCT/CN2021/084282 2020-12-03 2021-03-31 应用层双活方法、装置、设备及存储介质 WO2022116446A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011401756.9 2020-12-03
CN202011401756.9A CN112583951B (zh) 2020-12-03 2020-12-03 应用层双活方法、装置、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2022116446A1 true WO2022116446A1 (zh) 2022-06-09

Family

ID=75128183

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/084282 WO2022116446A1 (zh) 2020-12-03 2021-03-31 应用层双活方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN112583951B (zh)
WO (1) WO2022116446A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112583951B (zh) * 2020-12-03 2022-08-26 平安科技(深圳)有限公司 应用层双活方法、装置、设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8243589B1 (en) * 2008-08-14 2012-08-14 United Services Automobile Association (Usaa) Systems and methods for data center load balancing
US20140369345A1 (en) * 2013-06-14 2014-12-18 Cisco Technology, Inc. Method and apparatus for scaling interconnected ip fabric data centers
CN105847391A (zh) * 2016-04-25 2016-08-10 云南电网有限责任公司昆明供电局 一种分布式云数据中心结构
CN107465721A (zh) * 2017-06-27 2017-12-12 国家电网公司 基于双活架构的全局负载均衡方法和系统及调度服务器
CN110011859A (zh) * 2019-04-15 2019-07-12 深信服科技股份有限公司 一种虚拟机控制方法及集群系统
CN112583951A (zh) * 2020-12-03 2021-03-30 平安科技(深圳)有限公司 应用层双活方法、装置、设备及存储介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160094645A1 (en) * 2014-09-26 2016-03-31 Microsoft Corporation Dns-based load balancing
EP3229405B1 (en) * 2015-12-31 2020-07-15 Huawei Technologies Co., Ltd. Software defined data center and scheduling and traffic-monitoring method for service cluster therein
US11394685B2 (en) * 2016-05-27 2022-07-19 Walmart Apollo, Llc Systems and methods of database instance container deployment
CN111464592B (zh) * 2020-03-09 2023-07-25 平安科技(深圳)有限公司 基于微服务的负载均衡方法、装置、设备及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8243589B1 (en) * 2008-08-14 2012-08-14 United Services Automobile Association (Usaa) Systems and methods for data center load balancing
US20140369345A1 (en) * 2013-06-14 2014-12-18 Cisco Technology, Inc. Method and apparatus for scaling interconnected ip fabric data centers
CN105847391A (zh) * 2016-04-25 2016-08-10 云南电网有限责任公司昆明供电局 一种分布式云数据中心结构
CN107465721A (zh) * 2017-06-27 2017-12-12 国家电网公司 基于双活架构的全局负载均衡方法和系统及调度服务器
CN110011859A (zh) * 2019-04-15 2019-07-12 深信服科技股份有限公司 一种虚拟机控制方法及集群系统
CN112583951A (zh) * 2020-12-03 2021-03-30 平安科技(深圳)有限公司 应用层双活方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN112583951A (zh) 2021-03-30
CN112583951B (zh) 2022-08-26

Similar Documents

Publication Publication Date Title
US10581907B2 (en) Systems and methods for network access control
US11824962B2 (en) Methods and apparatus for sharing and arbitration of host stack information with user space communication stacks
US8914502B2 (en) System and method for dynamic discovery of origin servers in a traffic director environment
US11218445B2 (en) System and method for implementing a web application firewall as a customized service
JP6503476B2 (ja) セキュアソケットレイヤ(ssl)通信のセキュリティを改良するためのシステムおよび方法
US10104167B2 (en) Networking functions in a micro-services architecture
US10491632B1 (en) Methods for reducing compliance violations in mobile application management environments and devices thereof
CN104579732A (zh) 虚拟化网络功能网元的管理方法、装置和系统
US9749354B1 (en) Establishing and transferring connections
US11507439B1 (en) Application programming interface as a service
US10182033B1 (en) Integration of service scaling and service discovery systems
CN111651329B (zh) 针对应用的健康检查方法和装置、计算机系统和存储介质
US11516260B2 (en) Selective policy-driven interception of encrypted network traffic utilizing a domain name service and a single-sign on service
EP4229823A1 (en) Steering traffic on a flow-by-flow basis by a single sign-on service
WO2022116446A1 (zh) 应用层双活方法、装置、设备及存储介质
US8370897B1 (en) Configurable redundant security device failover
US9191332B2 (en) Methods, systems, and computer readable media for updating sequence and acknowledgment numbers associated with replay packets
CN113242299A (zh) 多数据中心的容灾系统、方法、计算机设备及介质
US10476947B1 (en) Methods for managing web applications and devices thereof
Han et al. Research on the Application of Load Balancing in Educational Administration System.
CN118101307A (zh) 应用防火墙集群高可用实现方法及系统

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE