[go: up one dir, main page]

CN105245361A - Data high availability system, method and device for Linux system - Google Patents

Data high availability system, method and device for Linux system Download PDF

Info

Publication number
CN105245361A
CN105245361A CN201510573929.8A CN201510573929A CN105245361A CN 105245361 A CN105245361 A CN 105245361A CN 201510573929 A CN201510573929 A CN 201510573929A CN 105245361 A CN105245361 A CN 105245361A
Authority
CN
China
Prior art keywords
middleware
currently used
server node
server
server nodes
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
CN201510573929.8A
Other languages
Chinese (zh)
Inventor
邢天明
吕倩华
李建磊
张鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Beijing Electronic Information Industry Co Ltd
Original Assignee
Inspur Beijing Electronic Information Industry 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 Inspur Beijing Electronic Information Industry Co Ltd filed Critical Inspur Beijing Electronic Information Industry Co Ltd
Priority to CN201510573929.8A priority Critical patent/CN105245361A/en
Publication of CN105245361A publication Critical patent/CN105245361A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0668Management of faults, events, alarms or notifications using network fault recovery by dynamic selection of recovery network elements, e.g. replacement by the most appropriate element after failure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Hardware Redundancy (AREA)

Abstract

The embodiment of the invention provides a data high availability system for a Linux system, a method and a device. The system comprises a distributed file system, fault transfer equipment, at least two pieces of middleware and clients, wherein the distributed file system comprises at least two server nodes, and the server nodes are bound by a network card; one end of the fault transfer equipment is connected with all server nodes and the other end is connected with all pieces of middleware for monitoring whether fault happens to currently-used server nodes and currently-used middleware and switching failed server nodes and failed middleware; each piece of middleware is connected with all clients; and the clients perform data interaction with the server nodes in the distributed file system via the middleware and the fault transfer equipment. As the distributed file system and multiple pieces of middleware are adopted, as long as one normal server node and one normal piece of middleware exist, data interaction can be carried out, data high availability is ensured, and continuity of upper service can be further ensured.

Description

用于Linux系统的数据高可用系统、方法和装置Data high availability system, method and device for Linux system

技术领域technical field

本发明涉及Linux系统中数据传输技术领域,特别是涉及一种用于Linux系统的数据高可用系统、方法和装置。The invention relates to the technical field of data transmission in a Linux system, in particular to a high data availability system, method and device for a Linux system.

背景技术Background technique

目前,在小型机及其他同类linux系统中,客户机通常通过单个中间件和单个服务器节点来与存储设备进行数据交互,当在数据交互过程中,中间件和/或服务器节点发生故障时,将无法继续进行该数据交互过程,无法保证数据的高可用性,进一步无法保证上层业务的连续性。At present, in minicomputers and other similar linux systems, the client usually interacts with the storage device through a single middleware and a single server node. When the middleware and/or server node fails during the data interaction, the The data interaction process cannot be continued, the high availability of data cannot be guaranteed, and the continuity of upper-layer business cannot be guaranteed.

发明内容Contents of the invention

有鉴于此,本发明实施例提供一种用于Linux系统的数据高可用系统、方法和装置,以解决现有技术中客户机通常通过单个中间件和单个服务器节点来与存储设备进行数据交互,当在数据交互过程中,中间件和/或服务器节点发生故障时,将无法继续进行该数据交互过程,无法保证数据的高可用性,进一步无法保证上层业务的连续性的问题。In view of this, the embodiment of the present invention provides a high data availability system, method and device for Linux system to solve the problem that in the prior art, the client usually interacts with the storage device through a single middleware and a single server node, When the middleware and/or server nodes fail during the data interaction process, the data interaction process cannot be continued, the high availability of data cannot be guaranteed, and the continuity of upper-layer business cannot be guaranteed.

为实现上述目的,本发明实施例提供如下技术方案:In order to achieve the above purpose, embodiments of the present invention provide the following technical solutions:

一种用于Linux系统的数据高可用系统,包括:分布式文件系统、故障转移设备、至少2个中间件和客户机;其中,A high-availability data system for Linux systems, including: a distributed file system, a failover device, at least two middleware and a client; wherein,

所述分布式文件系统包括至少2个服务器节点,各所述服务器节点间采用网卡绑定模式;The distributed file system includes at least 2 server nodes, and a network card binding mode is adopted between each of the server nodes;

所述故障转移设备一端与所有所述服务器节点相连,另一端与所有所述中间件相连,用于监测当前使用服务器节点和当前使用中间件是否发生故障,当监测到当前使用服务器节点故障时,在所有服务器节点中选择另一服务器节点作为当前使用服务器节点,当监测到当前使用中间件故障时,在所有中间件中选择另一中间件作为当前使用中间件;One end of the failover device is connected to all the server nodes, and the other end is connected to all the middleware, and is used to monitor whether the currently used server node and the currently used middleware fail, and when a failure of the currently used server node is detected, Select another server node among all server nodes as the currently used server node, and select another middleware among all the middleware as the currently used middleware when detecting a failure of the currently used middleware;

各所述中间件均与所有所述客户机相连;each said middleware is connected to all said clients;

所述客户机通过所述中间件和所述故障转移设备与所述分布式文件系统内所述服务器节点进行数据交互。The client performs data interaction with the server node in the distributed file system through the middleware and the failover device.

其中,所述分布式文件系统还包括存储设备,所有所述存储设备均挂载在每个所述服务器节点上,实现所述存储设备与所述服务器节点间数据交互。Wherein, the distributed file system further includes a storage device, and all the storage devices are mounted on each of the server nodes, so as to realize data interaction between the storage device and the server nodes.

其中,所述存储设备通过光纤交换机与所述服务器节点间数据交互。Wherein, the storage device exchanges data with the server node through an optical fiber switch.

一种用于Linux系统的数据高可用方法,基于上述的用于Linux系统的数据高可用系统,包括:A data high availability method for a Linux system, based on the above-mentioned high data availability system for a Linux system, comprising:

确定当前使用服务器节点和当前使用中间件;Determine the currently used server node and the currently used middleware;

监测所述当前使用服务器节点是否发生故障,若发生,则在所有服务器节点中选择另一服务器节点作为当前使用服务器节点;Monitoring whether the currently used server node fails, if so, selecting another server node among all server nodes as the currently used server node;

监测所述当前使用中间件是否发生故障,若发生,则在所有中间件中选择另一中间件作为当前使用中间件,保证客户机通过当前使用中间件和故障转移设备与分布式文件系统内当前使用服务器节点正常数据交互。Monitor whether the currently used middleware breaks down, and if so, select another middleware among all middlewares as the currently used middleware to ensure that the client computer communicates with the current middleware in the distributed file system through the currently used middleware and the failover device. Use server nodes for normal data interaction.

其中,确定当前使用服务器节点和当前使用中间件前还包括:Among them, before determining the currently used server node and the currently used middleware, it also includes:

确定分布式文件系统挂载的目录;Determine the directory where the distributed file system is mounted;

配置所有中间件,将所有所述中间件挂载在所述目录下。Configure all middleware, and mount all the middleware under the directory.

其中,确定当前使用服务器节点和当前使用中间件前还包括:Among them, before determining the currently used server node and the currently used middleware, it also includes:

为所有服务器节点配置一公共IP地址;Configure a public IP address for all server nodes;

为所有所述服务器节点配置浮动IP地址。Configure floating IP addresses for all said server nodes.

其中,根据所述浮动IP地址在所有服务器节点中选择另一服务器节点作为当前使用服务器节点。Wherein, another server node is selected among all server nodes according to the floating IP address as the currently used server node.

一种用于Linux系统的数据高可用装置,包括:确定模块、第一监测模块和第二监测模块;其中,A high data availability device for a Linux system, comprising: a determination module, a first monitoring module and a second monitoring module; wherein,

所述确定模块,用于确定当前使用服务器节点和当前使用中间件;The determining module is used to determine the currently used server node and the currently used middleware;

所述第一监测模块,用于监测所述当前使用服务器节点是否发生故障,若发生,则在所有服务器节点中选择另一服务器节点作为当前使用服务器节点;The first monitoring module is used to monitor whether the currently used server node fails, and if so, select another server node among all server nodes as the currently used server node;

所述第二监测模块,用于监测所述当前使用中间件是否发生故障,若发生,则在所有中间件中选择另一中间件作为当前使用中间件,保证客户机通过当前使用中间件和故障转移设备与分布式文件系统内当前使用服务器节点正常数据交互。The second monitoring module is used to monitor whether the currently used middleware breaks down, and if it occurs, select another middleware among all middlewares as the currently used middleware to ensure that the client passes through the currently used middleware and the failure. The transfer device interacts with the normal data of the currently used server nodes in the distributed file system.

其中,所述用于Linux系统的数据高可用装置还包括:第一配置模块,用于确定分布式文件系统挂载的目录,配置所有中间件,将所有所述中间件挂载在所述目录下。Wherein, the high data availability device for the Linux system also includes: a first configuration module, configured to determine the directory mounted by the distributed file system, configure all middleware, and mount all the middleware on the directory Down.

其中,所述用于Linux系统的数据高可用装置还包括:第二配置模块,用于为所有服务器节点配置一公共IP地址,并为所有所述服务器节点配置浮动IP地址。Wherein, the high data availability device for the Linux system further includes: a second configuration module, configured to configure a public IP address for all server nodes, and configure floating IP addresses for all the server nodes.

基于上述技术方案,本发明实施例提供的用于Linux系统的数据高可用系统、方法和装置,其中系统由分布式文件系统、故障转移设备、至少2个中间件和客户机组成,其中,分布式文件系统包括至少2个服务器节点,各服务器节点间采用网卡绑定模式,故障转移设备一端与所有服务器节点相连,另一端与所有中间件相连,用于监测当前使用服务器节点和当前使用中间件是否发生故障,当监测到当前使用服务器节点故障时,在所有服务器节点中选择另一服务器节点作为当前使用服务器节点,当监测到当前使用中间件故障时,在所有中间件中选择另一中间件作为当前使用中间件,各中间件均与所有所述客户机相连,客户机通过中间件和故障转移设备与分布式文件系统内所述服务器节点进行数据交互。采集分布式文件系统,将数据分散在各个服务器节点中,同时使用多个中间件,当故障转移设备监测当前正在使用服务器节点发生故障时,使用另一服务器节点与客户机继续进行数据交互,当故障转移设备监测当前正在使用中间件发生故障时,使用另一中间件使客户机与分布式分局系统继续进行数据交互,即只要存在一个正常服务器节点和存在一个正常中间件,客户机即可继续与分布式文件系统进行数据交互,保证了数据高可用性,进一步保证了上层业务的连续性。Based on the above technical solution, the embodiment of the present invention provides a system, method and device for high data availability of Linux systems, wherein the system is composed of a distributed file system, a failover device, at least two middleware and a client computer, wherein the distributed The file system includes at least 2 server nodes, and the network card binding mode is adopted between the server nodes. One end of the failover device is connected to all server nodes, and the other end is connected to all middleware, which is used to monitor the currently used server nodes and the currently used middleware. Whether there is a failure, when the failure of the currently used server node is detected, another server node is selected as the currently used server node among all server nodes, and another middleware is selected among all middleware when a failure of the currently used middleware is detected As the currently used middleware, each middleware is connected to all the clients, and the clients perform data interaction with the server nodes in the distributed file system through the middleware and the failover device. Collect the distributed file system, disperse the data in each server node, and use multiple middleware at the same time. When the failover device monitors that the server node currently in use fails, use another server node to continue data interaction with the client. Failover device monitoring When the currently used middleware fails, another middleware is used to enable the client to continue data interaction with the distributed branch system, that is, as long as there is a normal server node and a normal middleware, the client can continue Data interaction with the distributed file system ensures high data availability and further ensures the continuity of upper-layer business.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only It is an embodiment of the present invention, and those skilled in the art can also obtain other drawings according to the provided drawings without creative work.

图1为本发明实施例提供的用于Linux系统的数据高可用系统的系统框图;Fig. 1 is the system block diagram of the data high availability system that is used for Linux system that the embodiment of the present invention provides;

图2为本发明实施例提供的用于Linux系统的数据高可用方法的流程图;Fig. 2 is the flowchart of the data high availability method for Linux system provided by the embodiment of the present invention;

图3为本发明实施例提供的用于Linux系统的数据高可用方法中配置中间件的方法流程图;Fig. 3 is the flow chart of the method for configuring middleware in the data high availability method for Linux system provided by the embodiment of the present invention;

图4为本发明实施例提供的用于Linux系统的数据高可用方法中配置服务器节点的方法流程图;Fig. 4 is the flow chart of the method for configuring server nodes in the data high availability method for the Linux system provided by the embodiment of the present invention;

图5为本发明实施例提供的用于Linux系统的数据高可用装置的系统框图;Fig. 5 is a system block diagram of a data high availability device for a Linux system provided by an embodiment of the present invention;

图6为本发明实施例提供的用于Linux系统的数据高可用装置的另一系统框图;FIG. 6 is another system block diagram of a data high availability device for a Linux system provided by an embodiment of the present invention;

图7为本发明实施例提供的用于Linux系统的数据高可用装置的又一系统框图。FIG. 7 is another system block diagram of a data high availability device for a Linux system provided by an embodiment of the present invention.

具体实施方式detailed description

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

图1为本发明实施例提供的用于Linux系统的数据高可用系统的系统框图,采集分布式文件系统,将数据分散在各个服务器节点中,同时使用多个中间件,当故障转移设备监测当前正在使用服务器节点发生故障时,使用另一服务器节点与客户机继续进行数据交互,当故障转移设备监测当前正在使用中间件发生故障时,使用另一中间件使客户机与分布式分局系统继续进行数据交互,即只要存在一个正常服务器节点和存在一个正常中间件,客户机即可继续与分布式文件系统进行数据交互,保证了数据高可用性,进一步保证了上层业务的连续性;参照图1,该用于Linux系统的数据高可用系统可以包括:分布式文件系统10、故障转移设备20、至少2个中间件30和客户机40。其中,Fig. 1 is a system block diagram of a data high availability system for a Linux system provided by an embodiment of the present invention, which collects a distributed file system, disperses the data in each server node, and uses multiple middleware at the same time, when the failover device monitors the current When the server node in use fails, use another server node to continue data interaction with the client, and when the failover device monitors that the middleware currently in use fails, use another middleware to continue the client computer and the distributed branch system Data interaction, that is, as long as there is a normal server node and a normal middleware, the client can continue to perform data interaction with the distributed file system, ensuring high data availability and further ensuring the continuity of upper-layer business; refer to Figure 1, The data high availability system for Linux system may include: a distributed file system 10 , a failover device 20 , at least two middleware 30 and a client 40 . in,

分布式文件系统10包括至少2个服务器节点11,各服务器节点11间采用网卡绑定模式,即各服务器节点的物理网卡绑定成一个虚拟网卡,以提供负载均衡或者冗余,增加带宽,当所有服务器节点11中任一发生故障网卡不可用时,均不会影响到其他服务器节点11正常工作。The distributed file system 10 includes at least two server nodes 11, and the network card binding mode is adopted between the server nodes 11, that is, the physical network cards of each server node are bound into a virtual network card to provide load balancing or redundancy and increase bandwidth. When any faulty network card in all server nodes 11 is unavailable, it will not affect the normal operation of other server nodes 11 .

使用分布式文件系统,除了可保证了数据高可用性,进一步保证了上层业务的连续性外,相比本地文件系统,无需再故障发生切换时,重新的挂载数据磁盘,还将大大的降低在故障发生时服务器切换的时间。Using a distributed file system, in addition to ensuring high availability of data and further ensuring the continuity of upper-layer business, compared with the local file system, there is no need to remount the data disk when a failover occurs, which will greatly reduce the cost of The time for server switchover when a failure occurs.

可选的,分布式文件系统10还可以包括存储设备12,所有存储设备12均挂载在每个服务器节点11上,以实现存储设备12与服务器节点11间数据交互,也就是说,每个服务器节点11上均挂在有全部的存储设备12,保证了每个服务器节点11内数据均相同,无论客户机40与分布式文件系统10内哪个个服务器节点11进行数据交互均没有区别。Optionally, the distributed file system 10 may also include a storage device 12, and all storage devices 12 are mounted on each server node 11 to realize data interaction between the storage device 12 and the server node 11, that is, each All storage devices 12 are hung on the server nodes 11, ensuring that the data in each server node 11 is the same, no matter which server node 11 in the distributed file system 10 the client 40 performs data interaction with, there is no difference.

可选的,存储设备12可以通过光纤交换机与服务器节点间11件进行数据交互。可选的,使用的光纤交换机可以为FC光纤交换机。Optionally, the storage device 12 may perform data interaction with the server node 11 through an optical fiber switch. Optionally, the optical fiber switch used may be an FC optical fiber switch.

故障转移设备200的一端与分布式文件系统10内所有服务器节点11相连,另一端与所有中间件30相连。One end of the failover device 200 is connected to all server nodes 11 in the distributed file system 10 , and the other end is connected to all middleware 30 .

当客户机与分布式分局系统进行数据交互,例客户机40读取分布式分局系统10内的数据信息,或是客户机40向分布式分局系统10内写入数据信息时,可故障转移设备200监测当前使用服务器节点(即数据交互过程中当前正在使用的服务器节点)和当前使用中间件(即数据交互过程中当前正在使用的中间件)是否有发生故障。When the client performs data interaction with the distributed branch system, for example, the client 40 reads the data information in the distributed branch system 10, or the client 40 writes data information into the distributed branch system 10, the device can be failed over 200 monitors whether the currently used server node (that is, the server node currently being used during the data interaction process) and the currently used middleware (that is, the currently used middleware during the data interaction process) are faulty.

如果故障转移设备200监测到当前使用服务器节点故障,则在所有服务器节点中选择除该故障的服务器节点外的另一服务器节点,将该选出的服务器节点作为当前使用服务器节点,以该替换后的当前使用服务器节点继续进行数据交互。If the failover device 200 detects that the currently used server node fails, then select another server node except the failed server node among all server nodes, and use the selected server node as the currently used server node, and use the replaced The currently used server node continues data interaction.

如果故障转移设备200监测到当前使用中间件故障,则在所有中间件中选择除该故障的中间件另一中间件作为当前使用中间件,将该选出的中间件作为当前使用中间件,以该替换后的当前使用中间件继续进行数据交互。If the failover device 200 monitors the fault of the currently used middleware, select another middleware in all middlewares except the middleware of the failure as the currently used middleware, and the selected middleware as the currently used middleware, to The replaced currently used middleware continues to perform data interaction.

故障转移设备200除提供了的故障装置切换功能外,还为上层业务提供统一的接口地址,降低应用复杂度。In addition to providing the failover device switching function, the failover device 200 also provides a unified interface address for upper-layer services, reducing application complexity.

各个中间件300均与所有客户机400相连,客户机40通过中间件30和故障转移设备20与分布式文件系统10进行数据交互,具体的,客户机40通过一中间件30和一故障转移设备20与分布式文件系统10内一服务器节点11进行数据交互。Each middleware 300 is connected to all clients 400, and the clients 40 perform data interaction with the distributed file system 10 through the middleware 30 and the failover device 20. Specifically, the clients 40 pass through a middleware 30 and a failover device 20 performs data interaction with a server node 11 in the distributed file system 10 .

可选的,所有中间件300内均可包括同一数据库,当所有中间件300内均包括同一数据库时,可实现该数据库的高可用性。Optionally, all middleware 300 may include the same database, and when all middleware 300 include the same database, high availability of the database may be realized.

可选的,可以将中间件300和分布式文件系统100挂载在同一目录中Optionally, the middleware 300 and the distributed file system 100 can be mounted in the same directory

基于上述技术方案,本发明实施例提供的用于Linux系统的数据高可用系统,由分布式文件系统、故障转移设备、至少2个中间件和客户机组成,其中,分布式文件系统包括至少2个服务器节点,各服务器节点间采用网卡绑定模式,故障转移设备一端与所有服务器节点相连,另一端与所有中间件相连,用于监测当前使用服务器节点和当前使用中间件是否发生故障,当监测到当前使用服务器节点故障时,在所有服务器节点中选择另一服务器节点作为当前使用服务器节点,当监测到当前使用中间件故障时,在所有中间件中选择另一中间件作为当前使用中间件,各中间件均与所有所述客户机相连,客户机通过中间件和故障转移设备与分布式文件系统内所述服务器节点进行数据交互。采集分布式文件系统,将数据分散在各个服务器节点中,同时使用多个中间件,当故障转移设备监测当前正在使用服务器节点发生故障时,使用另一服务器节点与客户机继续进行数据交互,当故障转移设备监测当前正在使用中间件发生故障时,使用另一中间件使客户机与分布式分局系统继续进行数据交互,即只要存在一个正常服务器节点和存在一个正常中间件,客户机即可继续与分布式文件系统进行数据交互,保证了数据高可用性,进一步保证了上层业务的连续性。Based on the above technical solution, the high availability data system for Linux system provided by the embodiment of the present invention is composed of a distributed file system, a failover device, at least 2 middleware and a client computer, wherein the distributed file system includes at least 2 Each server node adopts the network card binding mode. One end of the failover device is connected to all server nodes, and the other end is connected to all middleware to monitor whether the currently used server node and the currently used middleware are faulty. When monitoring When the currently used server node fails, select another server node among all server nodes as the currently used server node, and when detecting the failure of the currently used middleware, select another middleware among all the middleware as the currently used middleware, Each middleware is connected to all the clients, and the clients perform data interaction with the server nodes in the distributed file system through the middleware and the failover device. Collect the distributed file system, disperse the data in each server node, and use multiple middleware at the same time. When the failover device monitors that the server node currently in use fails, use another server node to continue data interaction with the client. Failover device monitoring When the currently used middleware fails, another middleware is used to enable the client to continue data interaction with the distributed branch system, that is, as long as there is a normal server node and a normal middleware, the client can continue Data interaction with the distributed file system ensures high data availability and further ensures the continuity of upper-layer business.

下面对本发明实施例提供的用于Linux系统的数据高可用方法进行介绍,下文描述的用于Linux系统的数据高可用方法基于上文描述的用于Linux系统的数据高可用系统。The following is an introduction to the high data availability method for the Linux system provided by the embodiment of the present invention. The high data availability method for the Linux system described below is based on the high data availability system for the Linux system described above.

图2为本发明实施例提供的用于Linux系统的数据高可用方法的流程图,参照图2,该用于Linux系统的数据高可用方法可以包括:Fig. 2 is the flow chart of the data high availability method for Linux system that the embodiment of the present invention provides, with reference to Fig. 2, this data high availability method for Linux system can include:

步骤S100:确定当前使用服务器节点和当前使用中间件;Step S100: Determine the currently used server node and the currently used middleware;

当前使用服务器节点,是指客户机与分布式分局系统的服务器节点通过中间件和故障转移设备进行数据交互时,当前正在使用的服务器节点。The currently used server node refers to the currently used server node when the client computer and the server node of the distributed branch system perform data interaction through middleware and failover equipment.

当前使用中间件,是指客户机与分布式分局系统通过中间件和故障转移设备进行数据交互时,当前正在使用的中间件。The currently used middleware refers to the middleware currently being used when the client computer and the distributed branch system perform data interaction through middleware and failover devices.

可选的,在确定当前使用服务器节点和当前使用中间件前,还可以确定分布式文件系统挂载的目录,对所有中间件进行配置,将所有中间件均挂载在该目录下,即将中间件和分布式文件系统挂载在同一目录中。Optionally, before determining the currently used server node and currently used middleware, you can also determine the directory mounted by the distributed file system, configure all middleware, and mount all middleware under this directory, that is, the intermediate The file and the distributed file system are mounted in the same directory.

可选的,在确定当前使用服务器节点和当前使用中间件前,还可以先为所有服务器节点配置一公共IP地址,并为所有服务器节点配置一浮动IP地址,当监测当前使用服务器节点发生故障时,可根据该浮动IP地址在所有服务器节点中选择另一服务器节点作为当前使用服务器节点。Optionally, before determining the currently used server node and the currently used middleware, a public IP address can also be configured for all server nodes, and a floating IP address can be configured for all server nodes. , according to the floating IP address, another server node can be selected among all server nodes as the currently used server node.

步骤S110:监测所述当前使用服务器节点是否发生故障,若发生,则在所有服务器节点中选择另一服务器节点作为当前使用服务器节点;Step S110: Monitor whether the currently used server node fails, and if so, select another server node among all server nodes as the currently used server node;

在确定当前使用服务器节点后,可将对该确定的当前使用服务器节点进行实时监测,当监测到该当前使用服务器节点发生故障时,将会立即在所有服务器节点中选择除该故障的服务器节点外的另一服务器节点,将该选出的服务器节点作为当前使用服务器节点,以该替换后的当前使用服务器节点继续进行数据交互。After the currently used server node is determined, real-time monitoring of the determined currently used server node can be carried out. When it is detected that the currently used server node fails, it will immediately select all server nodes except the failed server node. Another server node, the selected server node is used as the currently used server node, and data exchange is continued with the replaced currently used server node.

若监测到该选出的另一服务器节点也发生故障,则将会继续在所有服务器节点中选择除已知的故障的服务器节点外的再一个服务器节点作为当前使用中间件,将该选出的再一个服务器节点作为当前使用服务器节点,继续进行数据交互。If it is detected that another selected server node also fails, it will continue to select another server node in all server nodes except the known failed server node as the currently used middleware, and the selected Another server node is used as the currently used server node to continue data interaction.

以此类推,一直只要当前使用服务器节点为故障的服务器节点,则替换该故障的服务器节点,直至当前使用服务器节点为正常的服务器节点。By analogy, as long as the currently used server node is a failed server node, the failed server node is replaced until the currently used server node is a normal server node.

步骤S120:监测所述当前使用中间件是否发生故障,若发生,则在所有中间件中选择另一中间件作为当前使用中间件。Step S120: Monitor whether the currently used middleware fails, and if so, select another middleware among all the middleware as the currently used middleware.

在确定当前使用中间件后,故障转移设备将对该确定的当前使用中间件进行实时监测,当监测到该当前使用中间件发生故障时,将会立即在所有中间件中选择除该故障的中间件另一中间件作为当前使用中间件,将该选出的中间件作为当前使用中间件,以该替换后的当前使用中间件继续进行数据交互。After determining the currently used middleware, the failover device will monitor the determined currently used middleware in real time. Another middleware is used as the currently used middleware, the selected middleware is used as the currently used middleware, and data interaction is continued with the replaced currently used middleware.

同样的,若监测到该选出的另一中间件也发生故障,则故障转移设备将会继续在所有中间件中选择除已知的故障的中间件外的再一个中间件作为当前使用中间件,将该选出的再一个中间件作为当前使用中间件,继续进行数据交互。Similarly, if it is detected that another selected middleware also fails, the failover device will continue to select another middleware as the currently used middleware among all middleware except the middleware of known failure , and use another selected middleware as the currently used middleware to continue data interaction.

以此类推,一直只要当前使用中间件为故障的中间件,则替换该故障的中间件,直至当前使用中间件为正常的中间件。By analogy, as long as the currently used middleware is a faulty middleware, the faulty middleware is replaced until the currently used middleware is a normal middleware.

其中,步骤S210和步骤S220间没有逻辑顺序关系,可先执行步骤S210再执行步骤S220,也可先执行步骤S220再执行步骤S210,在条件允许的前提下,还可同时执行步骤S210和步骤S220。Wherein, there is no logical sequence relationship between step S210 and step S220, step S210 may be executed first and then step S220 may be executed, or step S220 may be executed first and then step S210 may be executed, and if conditions permit, step S210 and step S220 may also be executed at the same time .

通过步骤S200、步骤S210和步骤S220,可随时保证当前使用服务器节点为正常的服务器节点,且当前使用中间件为正常的中间件,保证客户机通过当前使用中间件和故障转移设备与分布式文件系统内当前使用服务器节点进行正常数据交互。Through steps S200, S210, and S220, it can be guaranteed at any time that the currently used server node is a normal server node, and the currently used middleware is a normal middleware, so that the client can be connected to the distributed file through the currently used middleware and failover equipment. The system currently uses server nodes for normal data interaction.

可选的,图3示出了本发明实施例提供的用于Linux系统的数据高可用方法中配置中间件的方法流程图,参照图3,该配置中间件的方法可以包括:Optionally, FIG. 3 shows a flow chart of a method for configuring middleware in a data high availability method for a Linux system provided by an embodiment of the present invention. With reference to FIG. 3 , the method for configuring middleware may include:

S200:确定分布式文件系统挂载的目录;S200: Determine the directory mounted by the distributed file system;

若需将所有中间件与分布式文件系统挂载在同一目录下,则需要先确定分布式文件系统挂载的目录。If you need to mount all middleware and the distributed file system in the same directory, you need to determine the directory where the distributed file system is mounted.

S210:配置所有中间件,将所有所述中间件挂载在所述目录下。S210: Configure all the middleware, and mount all the middleware in the directory.

在确定分布式文件系统挂载的目录后,则可对所有中间件进行配置,将将所有中间件部署在分布式文件系统挂载的目录下。After determining the directory mounted by the distributed file system, all middleware can be configured, and all middleware will be deployed in the directory mounted by the distributed file system.

可选的,图4示出了本发明实施例提供的用于Linux系统的数据高可用方法中配置服务器节点的方法流程图,参照图4,该配置服务器节点的方法可以包括:Optionally, FIG. 4 shows a flow chart of a method for configuring a server node in a data high availability method for a Linux system provided by an embodiment of the present invention. Referring to FIG. 4, the method for configuring a server node may include:

S300:为所有服务器节点配置一公共IP地址;S300: configure a public IP address for all server nodes;

S310:为所有所述服务器节点配置浮动IP地址。S310: Configure floating IP addresses for all the server nodes.

可选的,可以通过该设置的浮动IP地址在所有服务器节点中选择另一服务器节点作为当前使用服务器节点。Optionally, another server node among all server nodes may be selected as the currently used server node through the set floating IP address.

当当前使用服务器节点为服务器节点1时,该浮动IP地址指向该服务器节点1,当该服务器节点1发生故障时,该浮动IP地址将会自动切换到另一台服务器节点,比如服务器节点2上,该浮动IP地址指向该服务器节点2,该服务器节点2将作为当前使用服务器节点。When the currently used server node is server node 1, the floating IP address points to the server node 1. When the server node 1 fails, the floating IP address will automatically switch to another server node, such as server node 2. , the floating IP address points to the server node 2, and the server node 2 will be used as the currently used server node.

可选的,当中间件使用代理服务器来与服务器节点进行通信数据交互时,可以将中间件的代理服务器的IP地址设置为该浮动IP地址,使无论当前使用服务器节点的为何,当前使用中间件均可与该当前使用服务器节点进行正常进行数据交互。Optionally, when the middleware uses a proxy server to interact with the server node for communication data, the IP address of the proxy server of the middleware can be set as the floating IP address, so that no matter what the server node is currently used, the currently used middleware Both can perform normal data interaction with the currently used server node.

本发明实施例提供的用于Linux系统的数据高可用方法,当监测当前正在使用服务器节点发生故障时,使用另一服务器节点与客户机继续进行数据交互,当故障转移设备监测当前正在使用中间件发生故障时,使用另一中间件使客户机与分布式分局系统继续进行数据交互,只要存在一个正常服务器节点和存在一个正常中间件,客户机即可继续与分布式文件系统进行数据交互,保证了数据高可用性,进一步保证了上层业务的连续性。In the high data availability method for Linux systems provided by the embodiments of the present invention, when a fault occurs in the currently used server node, another server node is used to continue data interaction with the client, and when the failover device monitors the currently used middleware When a failure occurs, another middleware is used to enable the client to continue data interaction with the distributed branch system. As long as there is a normal server node and a normal middleware, the client can continue to perform data interaction with the distributed file system, ensuring This ensures high data availability and further ensures the continuity of upper-layer services.

下面对本发明实施例提供的用于Linux系统的数据高可用装置进行介绍,下文描述的用于Linux系统的数据高可用装置与上文描述的用于Linux系统的数据高可用方法可相互对应参照。The following is an introduction to the high data availability device for the Linux system provided by the embodiment of the present invention. The high data availability device for the Linux system described below and the high data availability method for the Linux system described above can be referred to each other.

图5为本发明实施例提供的用于Linux系统的数据高可用装置的系统框图,参照图5,该用于Linux系统的数据高可用装置可以包括:确定模块100、第一监测模块200和第二监测模块300。其中,Fig. 5 is a system block diagram of a data high availability device for a Linux system provided by an embodiment of the present invention. Referring to Fig. 5, the data high availability device for a Linux system may include: a determination module 100, a first monitoring module 200 and a first monitoring module 200 Two monitoring modules 300 . in,

确定模块100,用于确定当前使用服务器节点和当前使用中间件;A determining module 100, configured to determine the currently used server node and the currently used middleware;

第一监测模块200,用于监测所述当前使用服务器节点是否发生故障,若发生,则在所有服务器节点中选择另一服务器节点作为当前使用服务器节点;The first monitoring module 200 is used to monitor whether the currently used server node fails, and if so, select another server node among all server nodes as the currently used server node;

第二监测模块300,用于监测所述当前使用中间件是否发生故障,若发生,则在所有中间件中选择另一中间件作为当前使用中间件,保证客户机通过当前使用中间件和故障转移设备与分布式文件系统内当前使用服务器节点正常数据交互。The second monitoring module 300 is used to monitor whether the currently used middleware breaks down, and if it occurs, select another middleware among all middlewares as the currently used middleware to ensure that the client passes through the currently used middleware and failover The device interacts with the normal data of the currently used server nodes in the distributed file system.

可选的,图6示出了本发明实施例提供的用于Linux系统的数据高可用装置的另一系统框图,参照图6,该用于Linux系统的数据高可用装置还可以包括:第一配置模块400。Optionally, FIG. 6 shows another system block diagram of a data high availability device for a Linux system provided by an embodiment of the present invention. Referring to FIG. 6, the data high availability device for a Linux system may also include: a first Configuration module 400 .

第一配置模块400,用于确定分布式文件系统挂载的目录,配置所有中间件,将所有所述中间件挂载在所述目录下。The first configuration module 400 is configured to determine the directory mounted by the distributed file system, configure all middleware, and mount all the middleware under the directory.

可选的,图7示出了本发明实施例提供的用于Linux系统的数据高可用装置的又一系统框图,参照图7,该用于Linux系统的数据高可用装置还可以包括:第二配置模块500。Optionally, FIG. 7 shows another system block diagram of a data high availability device for a Linux system provided by an embodiment of the present invention. Referring to FIG. 7, the data high availability device for a Linux system may also include: a second Configuration module 500 .

第二配置模块500,用于为所有服务器节点配置一公共IP地址,并为所有所述服务器节点配置浮动IP地址。The second configuration module 500 is configured to configure a public IP address for all server nodes, and configure floating IP addresses for all the server nodes.

本发明实施例提供的用于Linux系统的数据高可用装置,当监测当前正在使用服务器节点发生故障时,使用另一服务器节点与客户机继续进行数据交互,当故障转移设备监测当前正在使用中间件发生故障时,使用另一中间件使客户机与分布式分局系统继续进行数据交互,只要存在一个正常服务器节点和存在一个正常中间件,客户机即可继续与分布式文件系统进行数据交互,保证了数据高可用性,进一步保证了上层业务的连续性。The high availability device for Linux system provided by the embodiment of the present invention uses another server node to continue data interaction with the client when a fault occurs in the currently used server node. When the failover device monitors the current middleware When a failure occurs, another middleware is used to enable the client to continue data interaction with the distributed branch system. As long as there is a normal server node and a normal middleware, the client can continue to perform data interaction with the distributed file system, ensuring This ensures high data availability and further ensures the continuity of upper-layer services.

本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。Each embodiment in this specification is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other. As for the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and for the related part, please refer to the description of the method part.

对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A data high availability system for use in a Linux system, comprising: a distributed file system, a failover device, at least 2 pieces of middleware, and a client; wherein,
the distributed file system comprises at least 2 server nodes, and a network card binding mode is adopted among the server nodes;
one end of the fault transfer equipment is connected with all the server nodes, the other end of the fault transfer equipment is connected with all the middleware and is used for monitoring whether the currently used server node and the currently used middleware have faults or not, when the faults of the currently used server node are monitored, another server node is selected from all the server nodes as the currently used server node, and when the faults of the currently used middleware are monitored, another middleware is selected from all the middleware as the currently used middleware;
each middleware is connected with all the clients;
the client performs data interaction with the server nodes in the distributed file system through the middleware and the failover device.
2. The data high availability system for the Linux system of claim 1, wherein the distributed file system further comprises a storage device, all the storage devices are mounted on each of the server nodes, and data interaction between the storage devices and the server nodes is realized.
3. The data high availability system for the Linux system of claim 2, wherein the storage device interacts data with the server nodes through a fabric switch.
4. A data high availability method for Linux system, based on the data high availability system for Linux system of claim 1, comprising:
determining a currently used server node and currently used middleware;
monitoring whether the currently used server node fails or not, and if so, selecting another server node from all the server nodes as the currently used server node;
and monitoring whether the currently used middleware fails or not, if so, selecting another middleware from all the middleware as the currently used middleware, and ensuring that the client interacts with normal data of the currently used server node in the distributed file system through the currently used middleware and the failover equipment.
5. The method of claim 4, wherein determining the currently used server node and the currently used middleware further comprises:
determining a mounted directory of the distributed file system;
and configuring all the middleware, and mounting all the middleware under the directory.
6. The method of claim 4, wherein determining the currently used server node and the currently used middleware further comprises:
configuring a public IP address for all the server nodes;
and configuring floating IP addresses for all the server nodes.
7. The data high availability method for the Linux system according to claim 6, wherein another server node is selected from all server nodes as the currently used server node according to the floating IP address.
8. A data high availability apparatus for use in a Linux system, comprising: the monitoring system comprises a determining module, a first monitoring module and a second monitoring module; wherein,
the determining module is used for determining a currently used server node and currently used middleware;
the first monitoring module is used for monitoring whether the currently used server node fails or not, and if so, selecting another server node from all the server nodes as the currently used server node;
and the second monitoring module is used for monitoring whether the currently used middleware fails or not, and if so, selecting another middleware from all the middleware as the currently used middleware to ensure that the client interacts with normal data of the currently used server node in the distributed file system through the currently used middleware and the failover equipment.
9. The data high availability device for Linux system according to claim 8, further comprising: the first configuration module is used for determining a directory for mounting the distributed file system, configuring all the middleware and mounting all the middleware in the directory.
10. The data high availability device for Linux system according to claim 8, further comprising: and the second configuration module is used for configuring a public IP address for all the server nodes and configuring a floating IP address for all the server nodes.
CN201510573929.8A 2015-09-10 2015-09-10 Data high availability system, method and device for Linux system Pending CN105245361A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510573929.8A CN105245361A (en) 2015-09-10 2015-09-10 Data high availability system, method and device for Linux system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510573929.8A CN105245361A (en) 2015-09-10 2015-09-10 Data high availability system, method and device for Linux system

Publications (1)

Publication Number Publication Date
CN105245361A true CN105245361A (en) 2016-01-13

Family

ID=55042872

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510573929.8A Pending CN105245361A (en) 2015-09-10 2015-09-10 Data high availability system, method and device for Linux system

Country Status (1)

Country Link
CN (1) CN105245361A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106897175A (en) * 2017-02-19 2017-06-27 郑州云海信息技术有限公司 Heat replaces the method and device of NC nodes
CN107592215A (en) * 2017-08-31 2018-01-16 郑州云海信息技术有限公司 A kind of method for managing message-oriented middleware
CN108170545A (en) * 2018-01-08 2018-06-15 北京奇艺世纪科技有限公司 A kind of method for message transmission and device based on message-oriented middleware
CN108650297A (en) * 2018-04-09 2018-10-12 天津中兴智联科技有限公司 A kind of realization method and system of Internet of things middleware high availability

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070106745A1 (en) * 2003-09-30 2007-05-10 Sony Corporation Content acquisition method
CN101217558A (en) * 2007-12-26 2008-07-09 中国移动通信集团湖北有限公司 A business middleware service load balancing method
CN102655460A (en) * 2012-01-05 2012-09-05 中国工商银行股份有限公司 Redundancy backup method and system of production server
US20130056258A1 (en) * 2010-05-14 2013-03-07 3M Innovative Properties Company Electromagnetic shielding adhesive tape

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070106745A1 (en) * 2003-09-30 2007-05-10 Sony Corporation Content acquisition method
CN101217558A (en) * 2007-12-26 2008-07-09 中国移动通信集团湖北有限公司 A business middleware service load balancing method
US20130056258A1 (en) * 2010-05-14 2013-03-07 3M Innovative Properties Company Electromagnetic shielding adhesive tape
CN102655460A (en) * 2012-01-05 2012-09-05 中国工商银行股份有限公司 Redundancy backup method and system of production server

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106897175A (en) * 2017-02-19 2017-06-27 郑州云海信息技术有限公司 Heat replaces the method and device of NC nodes
CN107592215A (en) * 2017-08-31 2018-01-16 郑州云海信息技术有限公司 A kind of method for managing message-oriented middleware
CN108170545A (en) * 2018-01-08 2018-06-15 北京奇艺世纪科技有限公司 A kind of method for message transmission and device based on message-oriented middleware
CN108650297A (en) * 2018-04-09 2018-10-12 天津中兴智联科技有限公司 A kind of realization method and system of Internet of things middleware high availability

Similar Documents

Publication Publication Date Title
US20220131740A1 (en) Method and system of a dynamic high-availability mode based on current wide area network connectivity
EP1410229B1 (en) HIGH-AVAILABILITY CLUSTER VIRTUAL SERVER SYSTEM and method
US6535990B1 (en) Method and apparatus for providing fault-tolerant addresses for nodes in a clustered system
CN100369413C (en) Proxy-response device and method for proxy-response device
CN102006189B (en) Primary access server determination method and device for dual-machine redundancy backup
CN111130835A (en) Data center dual-active system, switching method, device, equipment and medium
GB2407887A (en) Automatically modifying fail-over configuration of back-up devices
CN111949444A (en) Data backup and recovery system and method based on distributed service cluster
CN109525411B (en) Network function component cluster, system, control method, device and storage medium
CN114840495B (en) Method, storage medium and equipment for preventing brain fracture of database cluster
CN100407646C (en) A method for realizing data service backup
CN111176888B (en) Cloud storage disaster recovery method, device and system
CN105245361A (en) Data high availability system, method and device for Linux system
CN110890933A (en) Service protection method, device, system, equipment and medium
CN102187627B (en) Method and device for load sharing, broadband access server system
US8775617B2 (en) Method for optimizing network performance after a temporary loss of connection
CN109104319B (en) Data storage device and method
US20120284274A1 (en) Method and device for service management
CN103414588B (en) VTL backup method and VTL nodes
CN111666170A (en) Fault node processing method and device based on distributed framework
CN114584462B (en) A method and device for processing network services
CN110266795A (en) One kind being based on Openstack platform courses method
CN100391169C (en) Method and device for maintaining service during dual-homing handover
CN116248581A (en) A method and system for active/standby switching of gateway cluster in cloud scene based on SDN
CN107819619A (en) A kind of continual method of access for realizing NFS

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20160113

RJ01 Rejection of invention patent application after publication