CN110046064A - 一种基于故障漂移的云服务器容灾实现方法 - Google Patents

一种基于故障漂移的云服务器容灾实现方法 Download PDF

Info

Publication number
CN110046064A
CN110046064A CN201810067909.7A CN201810067909A CN110046064A CN 110046064 A CN110046064 A CN 110046064A CN 201810067909 A CN201810067909 A CN 201810067909A CN 110046064 A CN110046064 A CN 110046064A
Authority
CN
China
Prior art keywords
host
failure
machine
implementation method
detection
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.)
Granted
Application number
CN201810067909.7A
Other languages
English (en)
Other versions
CN110046064B (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.)
Fujian Reliable Cloud Computing Technology Co.,Ltd.
Original Assignee
Cloud Ltd By Share Ltd In Xiamen
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 Cloud Ltd By Share Ltd In Xiamen filed Critical Cloud Ltd By Share Ltd In Xiamen
Priority to CN201810067909.7A priority Critical patent/CN110046064B/zh
Publication of CN110046064A publication Critical patent/CN110046064A/zh
Application granted granted Critical
Publication of CN110046064B publication Critical patent/CN110046064B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/202Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant
    • G06F11/2023Failover techniques
    • G06F11/2033Failover techniques switching over of hardware resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/301Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is a virtual computing platform, e.g. logically partitioned systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Hardware Redundancy (AREA)
  • Debugging And Monitoring (AREA)

Abstract

一种基于故障漂移的云服务器容灾实现方法,包括宿主异常状态检测,宿主动态选择,虚拟机自动迁移三个部分,所述的宿主异常状态检测为基于etcd,存储网络,管理网络三者综合判断,确认宿主是否是异常宕机,所述的宿主动态选择为宿主动态选择:基于宿主的状态,内存以及CPU利用率,选举出最佳的目标宿主,所述的虚拟机自动迁移为基于ceph和libvirt的迁移接口,通过添加后台任务,实现宕机宿主上的虚机自动迁移,对多部服务器进行统一的算法管理,使得当某一台服务器发生故障时,该故障服务器能够自动将服务转移到另一台正常的服务器上继续提供服务,不会中断服务,出现故障时进行实时(分钟级响应)自动迁移保障业务的稳定性。

Description

一种基于故障漂移的云服务器容灾实现方法
技术领域
本发明涉及数据处理技术领域,具体地说就是一种基于故障漂移的云服务器容灾实现方法。
背景技术
随着信息技术的迅猛发展,数据中心的建设已经经历了几十年的历程。实际上目前使用的服务器架构已经沿用了几十年了,存在的问题已经浮出水面。刀片服务器的出现使服务器的架构设计向前迈进了一步;但也带来了分散的存储资源利用问题。数据中心众多的网络设备、存储设备等,虽然通过网络连接起来,但实际上仍是一个个独立的群体。数据中心设备的整合、优化,进行集约化、集成设计已经提到了日程。提高服务器的效率和整个数据中心的效能,进行节能、降耗降低整体的拥有成本(TCO),同时要提高数据中心对外提高服务的响应速度和运行效率,要求数据中心和服务器的体系架构设计必须变革,云计算技术的发展很好满足了这一变革的需要。
当前,云计算技术的飞速发展,让硬件资源充分利用、动态调整业务规模以及保障业务可靠性具有重要意义。云计算带来的这些好处依赖于底层虚拟化技术将服务器资源虚拟出多份可供用户使用的计算资源,从而方便为企业用户提供高效、弹性、高可靠和可维护的底层IT基础架构,但在机器发生故障或进行负载均衡时虚拟机需要进行快速迁移,如何能够快速找到相应虚拟机进行迁移,并保障服务的稳定性,不会因迁移产生服务的蝴蝶效应,从而带来稳定的云服务。
发明内容
为了解决上述技术问题,本发明的目的在于提供一种基于故障漂移的云服务器容灾实现方法。
本发明解决其技术问题所采取的技术方案是:一种基于故障漂移的云服务器容灾实现方法,包括宿主异常状态检测,宿主动态选择,虚拟机自动迁移三个部分,所述的宿主异常状态检测为基于etcd,存储网络,管理网络三者综合判断,确认宿主是否是异常宕机,所述的宿主动态选择为宿主动态选择:基于宿主的状态,内存以及CPU利用率,选举出最佳的目标宿主,所述的虚拟机自动迁移为基于ceph和libvirt的迁移接口,通过添加后台任务,实现宕机宿主上的虚机自动迁移。
作为优化,所述的宿主异常检测步骤为:a、通过宿主上的watch进程,设置该宿主的带ttl属性的key(名称alive),如果该key超时消失,则触发检测流程;
b、第一轮检测,通过libvirt接口测试服务是否存活,检测失败则继续通过ceph的rest api接口检测宿主上虚机挂载的rbd块是否存在活跃链接;
c、步骤检测失败,则在etcd中设置带ttl属性的key(名称death,ttl=300秒),如果此时宿主恢复正常,则终止流程;
d、death key超时消失,触发第二轮检测,检测开始前先设置带ttl属性的key(名称lock,ttl=30秒),然后重复步骤b,如果在lock超时时间内宿主恢复正常,则终止流程,否则设置lock为永久key,该宿主后续状态变化被忽略,宿主故障被确认。
作为优化,所述的宿主动态选择步骤为:a、从数据库中选出所有在线状态的宿主,依次计算CPU内核利用以及内存利用情况,生成排行榜数据;
b、从排行榜中选出当前资源利用率最低的宿主。
作为优化,所述的虚拟机自动迁移步骤为:a、服务端选择异常宿主上处于开机状态的所有虚机,通过rq任务队列发送批量迁移指令;
b、后台worker获得任务,通过libvirt接口迁移虚机到第3步中选出的宿主中,成功后开启虚机。
本发明的有益效果是:与现有技术相比,本发明的一种云服务器容灾方法,对多部服务器进行统一的算法管理,使得当某一台服务器发生故障时,该故障服务器能够自动将服务转移到另一台正常的服务器上继续提供服务,不会中断服务,出现故障时进行实时(分钟级响应)自动迁移保障业务的稳定性。
具体实施方式
实施例1
一种基于故障漂移的云服务器容灾实现方法,包括宿主异常状态检测,宿主动态选择,虚拟机自动迁移三个部分,所述的宿主异常状态检测为基于etcd,存储网络,管理网络三者综合判断,确认宿主是否是异常宕机,所述的宿主动态选择为宿主动态选择:基于宿主的状态,内存以及CPU利用率,选举出最佳的目标宿主,所述的虚拟机自动迁移为基于ceph和libvirt的迁移接口,通过添加后台任务,实现宕机宿主上的虚机自动迁移。
实施例2
作为优化,所述的宿主异常检测步骤为:a、通过宿主上的watch进程,设置该宿主的带ttl属性的key(名称alive),如果该key超时消失,则触发检测流程;
b、第一轮检测,通过libvirt接口测试服务是否存活,检测失败则继续通过ceph的rest api接口检测宿主上虚机挂载的rbd块是否存在活跃链接;
c、步骤检测失败,则在etcd中设置带ttl属性的key(名称death,ttl=300秒),如果此时宿主恢复正常,则终止流程;
d、death key超时消失,触发第二轮检测,检测开始前先设置带ttl属性的key(名称lock,ttl=30秒),然后重复步骤b,如果在lock超时时间内宿主恢复正常,则终止流程,否则设置lock为永久key,该宿主后续状态变化被忽略,宿主故障被确认。
实施例3
作为优化,所述的宿主动态选择步骤为:a、从数据库中选出所有在线状态的宿主,依次计算CPU内核利用以及内存利用情况,生成排行榜数据;
b、从排行榜中选出当前资源利用率最低的宿主。
实施例4
作为优化,所述的虚拟机自动迁移步骤为:a、服务端选择异常宿主上处于开机状态的所有虚机,通过rq任务队列发送批量迁移指令;
b、后台worker获得任务,通过libvirt接口迁移虚机到第3步中选出的宿主中,成功后开启虚机。
本发明的有益效果是:与现有技术相比,本发明的一种云服务器容灾方法,对多部服务器进行统一的算法管理,使得当某一台服务器发生故障时,该故障服务器能够自动将服务转移到另一台正常的服务器上继续提供服务,不会中断服务,出现故障时进行实时(分钟级响应)自动迁移保障业务的稳定性。
上述具体实施方式仅是本发明的具体个案,本发明的专利保护范围包括但不限于上述具体实施方式的产品形态和式样,任何符合本发明且任何所属技术领域的普通技术人员对其所做的适当变化或修饰,皆应落入本发明的专利保护范围。

Claims (4)

1.一种基于故障漂移的云服务器容灾实现方法,其特征在于:包括宿主异常状态检测,宿主动态选择,虚拟机自动迁移三个部分,所述的宿主异常状态检测为基于etcd,存储网络,管理网络三者综合判断,确认宿主是否是异常宕机,所述的宿主动态选择为宿主动态选择:基于宿主的状态,内存以及CPU利用率,选举出最佳的目标宿主,所述的虚拟机自动迁移为基于ceph和libvirt的迁移接口,通过添加后台任务,实现宕机宿主上的虚机自动迁移。
2.根据权利要求1所述的一种基于故障漂移的云服务器容灾实现方法,其特征在于:所述的宿主异常检测步骤为:a、通过宿主上的watch进程,设置该宿主的带ttl属性的key(名称alive),如果该key超时消失,则触发检测流程;
b、第一轮检测,通过libvirt接口测试服务是否存活,检测失败则继续通过ceph的restapi接口检测宿主上虚机挂载的rbd块是否存在活跃链接;
c、步骤检测失败,则在etcd中设置带ttl属性的key,如果此时宿主恢复正常,则终止流程;
d、death key超时消失,触发第二轮检测,检测开始前先设置带ttl属性的key,然后重复步骤b,如果在lock超时时间内宿主恢复正常,则终止流程,否则设置lock为永久key,该宿主后续状态变化被忽略,宿主故障被确认。
3.根据权利要求1所述的一种基于故障漂移的云服务器容灾实现方法,其特征在于:所述的宿主动态选择步骤为:a、从数据库中选出所有在线状态的宿主,依次计算CPU内核利用以及内存利用情况,生成排行榜数据;
b、从排行榜中选出当前资源利用率最低的宿主。
4.根据权利要求1所述的一种基于故障漂移的云服务器容灾实现方法,其特征在于:所述的虚拟机自动迁移步骤为:a、服务端选择异常宿主上处于开机状态的所有虚机,通过rq任务队列发送批量迁移指令;
b、后台worker获得任务,通过libvirt接口迁移虚机到第3步中选出的宿主中,成功后开启虚机。
CN201810067909.7A 2018-01-15 2018-01-15 一种基于故障漂移的云服务器容灾实现方法 Active CN110046064B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810067909.7A CN110046064B (zh) 2018-01-15 2018-01-15 一种基于故障漂移的云服务器容灾实现方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810067909.7A CN110046064B (zh) 2018-01-15 2018-01-15 一种基于故障漂移的云服务器容灾实现方法

Publications (2)

Publication Number Publication Date
CN110046064A true CN110046064A (zh) 2019-07-23
CN110046064B CN110046064B (zh) 2020-08-04

Family

ID=67273606

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810067909.7A Active CN110046064B (zh) 2018-01-15 2018-01-15 一种基于故障漂移的云服务器容灾实现方法

Country Status (1)

Country Link
CN (1) CN110046064B (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111865682A (zh) * 2020-07-16 2020-10-30 北京百度网讯科技有限公司 用于处理故障的方法和装置
CN114584458A (zh) * 2022-03-03 2022-06-03 平安科技(深圳)有限公司 一种基于etcd的集群容灾管理方法、系统、设备及存储介质
CN116737396A (zh) * 2023-08-14 2023-09-12 苏州浪潮智能科技有限公司 服务器可维护性配置方法、装置、电子设备和存储介质

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080189468A1 (en) * 2007-02-02 2008-08-07 Vmware, Inc. High Availability Virtual Machine Cluster
CN102819465A (zh) * 2012-06-29 2012-12-12 华中科技大学 一种虚拟化环境中故障恢复的方法
CN103152419A (zh) * 2013-03-08 2013-06-12 中标软件有限公司 一种云计算平台的高可用集群管理方法
US20140201732A1 (en) * 2013-01-14 2014-07-17 Cisco Technology, Inc. Detection of Unauthorized Use of Virtual Resources
CN104852814A (zh) * 2015-04-09 2015-08-19 云聪智能科技(上海)有限公司 智能一体化应急系统及其应急方法
CN106547607A (zh) * 2015-09-17 2017-03-29 中国移动通信集团公司 一种虚拟机动态迁移方法和装置
CN106874136A (zh) * 2017-02-22 2017-06-20 郑州云海信息技术有限公司 一种存储系统的故障处理方法及装置
CN106909440A (zh) * 2017-02-27 2017-06-30 郑州云海信息技术有限公司 一种虚拟机调度方法及系统
CN107203440A (zh) * 2017-05-27 2017-09-26 郑州云海信息技术有限公司 一种一体化实时备份容灾系统及搭建方法
CN107491344A (zh) * 2017-09-26 2017-12-19 北京思特奇信息技术股份有限公司 一种实现虚拟机高可用性的方法及装置
US10579409B2 (en) * 2014-06-28 2020-03-03 Vmware, Inc. Live migration of virtual machines with memory state sharing

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080189468A1 (en) * 2007-02-02 2008-08-07 Vmware, Inc. High Availability Virtual Machine Cluster
CN102819465A (zh) * 2012-06-29 2012-12-12 华中科技大学 一种虚拟化环境中故障恢复的方法
US20140201732A1 (en) * 2013-01-14 2014-07-17 Cisco Technology, Inc. Detection of Unauthorized Use of Virtual Resources
CN103152419A (zh) * 2013-03-08 2013-06-12 中标软件有限公司 一种云计算平台的高可用集群管理方法
US10579409B2 (en) * 2014-06-28 2020-03-03 Vmware, Inc. Live migration of virtual machines with memory state sharing
CN104852814A (zh) * 2015-04-09 2015-08-19 云聪智能科技(上海)有限公司 智能一体化应急系统及其应急方法
CN106547607A (zh) * 2015-09-17 2017-03-29 中国移动通信集团公司 一种虚拟机动态迁移方法和装置
CN106874136A (zh) * 2017-02-22 2017-06-20 郑州云海信息技术有限公司 一种存储系统的故障处理方法及装置
CN106909440A (zh) * 2017-02-27 2017-06-30 郑州云海信息技术有限公司 一种虚拟机调度方法及系统
CN107203440A (zh) * 2017-05-27 2017-09-26 郑州云海信息技术有限公司 一种一体化实时备份容灾系统及搭建方法
CN107491344A (zh) * 2017-09-26 2017-12-19 北京思特奇信息技术股份有限公司 一种实现虚拟机高可用性的方法及装置

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111865682A (zh) * 2020-07-16 2020-10-30 北京百度网讯科技有限公司 用于处理故障的方法和装置
CN111865682B (zh) * 2020-07-16 2023-08-08 北京百度网讯科技有限公司 用于处理故障的方法和装置
CN114584458A (zh) * 2022-03-03 2022-06-03 平安科技(深圳)有限公司 一种基于etcd的集群容灾管理方法、系统、设备及存储介质
CN116737396A (zh) * 2023-08-14 2023-09-12 苏州浪潮智能科技有限公司 服务器可维护性配置方法、装置、电子设备和存储介质
CN116737396B (zh) * 2023-08-14 2023-11-03 苏州浪潮智能科技有限公司 服务器可维护性配置方法、装置、电子设备和存储介质

Also Published As

Publication number Publication date
CN110046064B (zh) 2020-08-04

Similar Documents

Publication Publication Date Title
CN103957231B (zh) 一种云计算平台下的虚拟机分布式任务调度方法
CN103442049B (zh) 一种面向构件的混合型云操作系统体系结构及其通信方法
CN108712464A (zh) 一种面向集群微服务高可用的实现方法
CN202565304U (zh) 分布式计算任务调度及执行系统
CN103049332B (zh) 一种虚拟cpu调度方法
WO2014210501A1 (en) Asynchronous message passing for large graph clustering
CN110046064A (zh) 一种基于故障漂移的云服务器容灾实现方法
CN104463492A (zh) 一种电力系统云仿真平台的运营管理方法
CN103139302A (zh) 考虑负载均衡的实时副本调度方法
CN104539716A (zh) 云桌面管理系统桌面虚拟机调度控制系统及方法
CN104123183B (zh) 集群作业调度方法和装置
CN103634167B (zh) 云环境中对目标主机进行安全配置检查的方法和系统
Rui et al. Analysis of cascade fault optimization based on regional fault and traffic reallocation in complex networks
WO2022093713A1 (en) Techniques for generating a configuration for electrically isolating fault domains in a data center
CN106412094A (zh) 一种以公有云方式组织管理分散资源的方法
CN108306912A (zh) 虚拟网络功能管理方法及其装置、网络功能虚拟化系统
Leu et al. Improving reliability of a heterogeneous grid-based intrusion detection platform using levels of redundancies
CN109753782A (zh) 一种云安全资源池的适配处理方法及装置
Lin et al. A workload-driven approach to dynamic data balancing in MongoDB
Liang et al. A heuristic virtual machine scheduling algorithm in cloud data center
Jun-Feng et al. Date hierarchical storage strategy for data disaster recovery
Fang et al. A parallel computing framework for cloud services
CN201532634U (zh) 基于不可信服务器节点的云计算基础架构系统
Yang et al. QoS‐aware indiscriminate volume storage cloud
CaoLei et al. The thinking of Cloud computing in the digital construction of the oil companies

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: An implementation method of cloud server disaster recovery based on fault drift

Effective date of registration: 20210316

Granted publication date: 20200804

Pledgee: Xiamen finance Company limited by guarantee

Pledgor: Xiamen Biebeyun Co.,Ltd.

Registration number: Y2021980001726

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20220325

Granted publication date: 20200804

Pledgee: Xiamen finance Company limited by guarantee

Pledgor: Xiamen Biebeyun Co.,Ltd.

Registration number: Y2021980001726

PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: An implementation method of cloud server disaster recovery based on fault drift

Effective date of registration: 20220328

Granted publication date: 20200804

Pledgee: Xiamen SME Financing Guarantee Co.,Ltd.

Pledgor: Xiamen Biebeyun Co.,Ltd.

Registration number: Y2022980003345

CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 361000 3F-A317, Zone C, Innovation Building, Software Park, Torch High tech Zone, Xiamen City, Fujian Province

Patentee after: Fujian Reliable Cloud Computing Technology Co.,Ltd.

Country or region after: China

Address before: 361001 unit 116, 104 Datong Road, Siming District, Xiamen City, Fujian Province

Patentee before: Xiamen Biebeyun Co.,Ltd.

Country or region before: China