PostgreSQL High Availability Cookbook - Second Edition
暫譯: PostgreSQL 高可用性食譜 - 第二版

Shaun M. Thomas

買這商品的人也買了...

相關主題

商品描述

Key Features

  • Create a PostgreSQL cluster that stays online even when disaster strikes
  • Avoid costly downtime and data loss that can ruin your business
  • Updated to include the newest features introduced in PostgreSQL 9.6 with hands-on industry-driven recipes

Book Description

Databases are nothing without the data they store. In the event of a failure - catastrophic or otherwise - immediate recovery is essential. By carefully combining multiple servers, it s even possible to hide the fact a failure occurred at all.

From hardware selection to software stacks and horizontal scalability, this book will help you build a versatile PostgreSQL cluster that will survive crashes, resist data corruption, and grow smoothly with customer demand. It all begins with hardware selection for the skeleton of an efficient PostgreSQL database cluster. Then it s on to preventing downtime as well as troubleshooting some real life problems that administrators commonly face. Next, we add database monitoring to the stack, using collectd, Nagios, and Graphite. And no stack is complete without replication using multiple internal and external tools, including the newly released pglogical extension. Pacemaker or Raft consensus tools are the final piece to grant the cluster the ability to heal itself. We even round off by tackling the complex problem of data scalability.

This book exploits many new features introduced in PostgreSQL 9.6 to make the database more efficient and adaptive, and most importantly, keep it running.

What you will learn

  • Protect your data with PostgreSQL replication and management tools such as Slony, Bucardo, pglogical, and WAL-E
  • Hardware planning to help your database run efficiently
  • Prepare for catastrophes and prevent them before they happen
  • Reduce database resource contention with connection pooling using pgpool and PgBouncer
  • Automate monitoring and alerts to visualize cluster activity using Nagios and collected
  • Construct a robust software stack that can detect and fix outages
  • Learn simple PostgreSQL High Availability with Patroni, or dive into the full power of Pacemaker.

About the Author

Shaun M. Thomas has been working with PostgreSQL since late 2000. He is a frequent contributor to the PostgreSQL Performance and General mailing lists, assisting other DBAs with the knowledge he's gained over the years. In 2011 and 2012, he gave presentations at the Postgres Open conference on topics such as handling extreme throughput, high availability, server redundancy, and failover techniques. Most recently, he has contributed the Shard Manager extension and the walctl WAL management suite. Currently, he serves as the database architect at PEAK6 Investments, where he develops standard operating procedure (SOP) guidelines to facilitate reliable server architecture among many other tasks. Many of the techniques used in this book were developed specifically for this extreme environment. He believes that PostgreSQL has a stupendous future ahead, and he can't wait to see the advancements subsequent versions will bring.

Table of Contents

  1. Hardware Planning
  2. Handling and Avoiding Downtime
  3. Pooling Resources
  4. Troubleshooting
  5. Monitoring
  6. Replication
  7. Replication Management Tools
  8. Simple Stack
  9. Advanced Stack
  10. Cluster Control
  11. Data Distribution

商品描述(中文翻譯)

**主要特點**

- 建立一個即使在災難發生時也能保持在線的 PostgreSQL 叢集
- 避免昂貴的停機時間和可能毀掉您業務的數據損失
- 更新以包含 PostgreSQL 9.6 中引入的最新功能,並提供實務導向的實作範例

**書籍描述**

數據庫沒有存儲的數據就毫無意義。在發生故障時——無論是災難性還是其他情況——立即恢復至關重要。通過仔細結合多台伺服器,甚至可以隱藏故障發生的事實。

從硬體選擇到軟體堆疊和橫向擴展,本書將幫助您建立一個多功能的 PostgreSQL 叢集,能夠抵禦崩潰、抵抗數據損壞,並隨著客戶需求的增長而平穩擴展。一切從高效 PostgreSQL 數據庫叢集的硬體選擇開始。接著,我們將重點放在防止停機以及排除管理員常見的實際問題。然後,我們將數據庫監控添加到堆疊中,使用 collectd、Nagios 和 Graphite。沒有使用多個內部和外部工具進行複製的堆疊是不完整的,包括新發布的 pglogical 擴展。Pacemaker 或 Raft 共識工具是賦予叢集自我修復能力的最後一塊拼圖。我們甚至會解決數據可擴展性的複雜問題。

本書利用 PostgreSQL 9.6 中引入的許多新功能,使數據庫更高效、更具適應性,最重要的是,保持其運行。

**您將學到的內容**

- 使用 PostgreSQL 複製和管理工具(如 Slony、Bucardo、pglogical 和 WAL-E)來保護您的數據
- 硬體規劃以幫助您的數據庫高效運行
- 為災難做好準備並在其發生之前防止它們
- 使用 pgpool 和 PgBouncer 進行連接池化以減少數據庫資源競爭
- 自動化監控和警報,使用 Nagios 和 collectd 可視化叢集活動
- 構建一個能夠檢測和修復故障的穩健軟體堆疊
- 學習簡單的 PostgreSQL 高可用性解決方案 Patroni,或深入了解 Pacemaker 的全部功能。

**關於作者**

**Shaun M. Thomas** 自 2000 年底以來一直在使用 PostgreSQL。他是 PostgreSQL 性能和一般郵件列表的頻繁貢獻者,幫助其他數據庫管理員分享他多年來獲得的知識。在 2011 年和 2012 年,他在 Postgres Open 會議上就處理極端吞吐量、高可用性、伺服器冗餘和故障轉移技術等主題進行了演講。最近,他貢獻了 Shard Manager 擴展和 walctl WAL 管理套件。目前,他擔任 PEAK6 Investments 的數據庫架構師,負責制定標準作業程序(SOP)指導方針,以促進可靠的伺服器架構以及其他多項任務。本書中使用的許多技術是專門為這種極端環境開發的。他相信 PostgreSQL 擁有輝煌的未來,並迫不及待想看到後續版本將帶來的進步。

**目錄**

1. 硬體規劃
2. 處理和避免停機
3. 資源池化
4. 故障排除
5. 監控
6. 複製
7. 複製管理工具
8. 簡單堆疊
9. 進階堆疊
10. 叢集控制
11. 數據分配