Home Database Mysql Tutorial 通过IBM DB2实现高可用性和灾难恢复

通过IBM DB2实现高可用性和灾难恢复

Jun 07, 2016 pm 05:54 PM
db2 ibm disaster recovery High availability

IT 系统确实会发生故障。我们要关心的不是是否出现问题,而是何时出现问题。我们必须时刻准备处理包含关键运营数据的当今企业环境中出现的这类故障。IBM DB2 for Linux, UNIX and Windows 提供了许多防止数据可用性中断的方法。本文将介绍 DB2 的高可用性灾

IT 系统确实会发生故障。我们要关心的不是“是否”出现问题,而是“何时”出现问题。我们必须时刻准备处理包含关键运营数据的当今企业环境中出现的这类故障。IBM® DB2® for Linux, UNIX and Windows 提供了许多防止数据可用性中断的方法。本文将介绍 DB2 的高可用性灾难恢复 (HADR) 功能,包括最新的 DB2 10.1 版本中的各种新功能。

建立坚实的基础

所有最新 DB2 版本均包含 HADR 特性。这项技术成熟可靠,许多企业都使用它来提高可用性级别。HADR 是工作原理是实现主(热)和备用(冷)之间的数据同步。借助 HADR,DBA 可以在出现故障或使用集群软件(比如 IBM Tivoli® System Automation 或其他故障转移集群产品)时手动切换到备用服务器,以便自动检测故障,并将连接切换到备用服务器。在 DB2 9.7.1 中,IBM 引入了从备用服务器提供读取操作的功能,提高了集群的利用率。此功能使得示例报告能够运行当前的暖备用服务器,因此主服务器不必再运行该负载。

DB2 10.1 当前支持三台备用服务器,这不仅可以提高同一数据中心内的高可用性,还可以提高跨多个站点进行灾难恢复配置的能力。

人们不再需要单独运用 HADR 来实现高可用性,同时使用另一项解决方案来进行灾难恢复,您可以使用 HADR 同时处理这两项工作,从而简化了软件堆栈。DBA 可以在与主数据库服务器相同的位置上部署主备用数据库,以便快速实现故障转移,并提高本地网络传输速率。还可以远程定位另外两台备用服务器(称为辅助服务器),防止出现影响整个站点的大型灾难。在出现影响主服务器和主要备用服务器的站点范围中断时,DBA 可以从任意一台辅助服务器发出接管命令,随后成为新的主服务器和主要备用服务器。所有备用服务器(无论是主服务器还是辅助服务器)均支持读取操作。

提供针对应用程序错误的保护

有时候,应用程序会产生一些影响数据的错误。如果将这些错误复制到备用数据库,就会使问题变得更加复杂。为避免复制错误,DB2 10.1 的 HADR 引入了延迟重播功能,帮助数据免受应用程序错误的影响。通过在备用服务器上启用 hadr_replay_delay 选项,DBA 能够延迟对数据所做的任何更改(例如,延迟 24 小时),为发现所有问题并从以前某个时间点进行恢复提供足够的时间。

延迟重播会将主服务器上生成的日志流中的时间戳与备用服务器上的当前时间进行比较。因此,主服务器和备用服务器上的时间必须始终保持同步。

事务提交将依据下面的等式在备用服务器上重播:

(current time on the standby – value of the hadr_replay_delay configuration parameter >= time stamp of the committed log record

将 hadr_replay_delay 参数设置为一个足够大的值是一个不错的主意,这样您就可以检测主服务器上的任何错误事务并及时作出反应。由于 DB2 10.1 允许包含多台备用服务器,所以现在您可以将一台备用服务器与主服务器保持同步,以实现高可用性,并获得使用延迟重播特性来防止数据错误的一台备用服务器。

利用日志假脱机防止出现吞吐量峰值

根据集群的同步配置,可能出现以下情况:主服务器不得不等待备用服务器完成其事务,然后才能继续执行处理操作。HADR 日志假脱机是 DB2 10.1 中的一项全新功能,它允许 DBA 指定额外的空间,以便在备用服务器上对日志进行假脱机处理。此功能有助于避免因为辅助服务器上的日志记录活动突然增加而导致的主服务器上的背压问题。

您可以通过使用 hadr_spool_limit 数据库配置参数来启用日志假脱机,这会上调日志接收缓冲区已满时写入磁盘的(或“假脱机”)数据量的上限。

备用服务器上的日志重播特性随后可以从磁盘读取日志数据,无需等待完成备用服务器上的日志重播即可继续处理主服务器上的事务。

日志假脱机功能不会妨碍 DB2 HADR 特性提供的高可用性和灾难恢复保护。从主数据库中传输的数据仍将采用特定的同步模式复制到备用服务器,只是需要在备用服务器上的表空间上花费一些时间,以便重播数据。

实现高可用性和业务连续性

DB2 中的 HADR 特性由来已久。它已从一个简单的复制解决方案发展成为一个成熟的高可用性和灾难恢复解决方案,能够跨多个服务器乃至远程站点提供终极数据保护。

如何运用新的 HADR 特性保持数据可用性并减少灾难影响?让我们从评论中加以了解。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to implement load balancing and high availability in FastAPI How to implement load balancing and high availability in FastAPI Jul 28, 2023 pm 02:13 PM

Introduction to how to implement load balancing and high availability in FastAPI: With the development of Internet applications, the requirements for system load balancing and high availability are getting higher and higher. FastAPI is a high-performance Python-based web framework that provides a simple and powerful way to build, deploy and scale web applications. This article will introduce how to implement load balancing and high availability in FastAPI and provide corresponding code examples. Using Nginx to achieve load balancingNginx is a popular

High availability and disaster recovery solution for Nginx load balancing solution High availability and disaster recovery solution for Nginx load balancing solution Oct 15, 2023 am 11:43 AM

High Availability and Disaster Recovery Solution of Nginx Load Balancing Solution With the rapid development of the Internet, the high availability of Web services has become a key requirement. In order to achieve high availability and disaster tolerance, Nginx has always been one of the most commonly used and reliable load balancers. In this article, we will introduce Nginx’s high availability and disaster recovery solutions and provide specific code examples. High availability of Nginx is mainly achieved through the use of multiple servers. As a load balancer, Nginx can distribute traffic to multiple backend servers to

Building a high-availability load balancing system: Best practices for Nginx Proxy Manager Building a high-availability load balancing system: Best practices for Nginx Proxy Manager Sep 27, 2023 am 08:22 AM

Building a high-availability load balancing system: Best practices for NginxProxyManager Introduction: In the development of Internet applications, the load balancing system is one of the essential components. It can achieve high concurrency and high availability services by distributing requests to multiple servers. NginxProxyManager is a commonly used load balancing software. This article will introduce how to use NginxProxyManager to build a high-availability load balancing system and provide

What is the difference between db2 and oracle syntax What is the difference between db2 and oracle syntax Jul 05, 2023 am 10:39 AM

Differences in syntax between db2 and oracle: 1. SQL syntax differences. Although db2 and oracle both use structured query language, they have some differences in syntax; 2. db2 and oracle have different data types; 3. Foreign key constraint definition, db2 can be defined when creating the table or added after using the "ALTER TABLE" statement. Oracle needs to be defined together when creating the table; 4. There are also some differences in the syntax of db2 and oracle stored procedures and functions.

Swoole and RabbitMQ integration practice: building a high-availability message queue system Swoole and RabbitMQ integration practice: building a high-availability message queue system Jun 14, 2023 pm 12:56 PM

With the advent of the Internet era, message queue systems have become more and more important. It enables asynchronous operations between different applications, reduces coupling, and improves scalability, thereby improving the performance and user experience of the entire system. In the message queuing system, RabbitMQ is a powerful open source message queuing software. It supports a variety of message protocols and is widely used in financial transactions, e-commerce, online games and other fields. In practical applications, it is often necessary to integrate RabbitMQ with other systems. This article will introduce how to use sw

Webman Configuration Guide for High Availability of Websites Webman Configuration Guide for High Availability of Websites Aug 12, 2023 pm 01:37 PM

Introduction to Webman Configuration Guide for Implementing High Availability of Websites: In today's digital era, websites have become one of the important business channels for enterprises. In order to ensure the business continuity and user experience of enterprises and ensure that the website is always available, high availability has become a core requirement. Webman is a powerful web server management tool that provides a series of configuration options and functions that can help us achieve a high-availability website architecture. This article will introduce some Webman configuration guides and code examples to help you achieve the high performance of your website.

Redis: a key technology for building high-availability database systems Redis: a key technology for building high-availability database systems Nov 07, 2023 am 09:39 AM

Redis: a key technology for building high-availability database systems. With the development of the Internet and the advent of the big data era, the need for high-availability database systems has become increasingly urgent. As an in-memory storage NoSQL database system, Redis has become one of the key technologies for building high-availability database systems with its excellent performance and flexible data model. This article will delve into the high availability technology of Redis and demonstrate it with specific code examples. 1. The high availability requirements of Redis in actual applications

Using go-zero to implement high-availability distributed cache Using go-zero to implement high-availability distributed cache Jun 23, 2023 am 08:02 AM

With the development of web applications, more and more attention is turning to how to improve application performance. The role of caching is to offset high traffic and busy loads and improve the performance and scalability of web applications. In a distributed environment, how to implement high-availability caching has become an important technology. This article will introduce how to use some tools and frameworks provided by go-zero to implement high-availability distributed cache, and briefly discuss the advantages and limitations of go-zero in practical applications. 1. What is go-

See all articles