PostgreSQL 集群/热备方案

来源:互联网 发布:淘宝上官换机是真的吗 编辑:程序博客网 时间:2024/05/21 06:56

集群解决的负载能力的问题,要求就是能增加服务器(群)的吞吐量和响应速度。

热备解决的是服务连续性(高可用性)的问题。

不是所有的模块都需要集群,也不是所有服务都需要热备。

下面是现有的基于postgreSQL的集群/热备方案列表。


1, pgpool

一个中间件,介于PostgreSQL Server和PostgresSQL database client之间。具有一下特性:* Connection Pooling(连接池管理),* Replication(备份),* Load Balance(负载均衡), * Limiting Exceeding Connection(连接数限制)* Parallel Query(并发查询)BSD licensed, 不支持windows.

一个异步的主从复制系统,基于PostgreSQL,不能用于热备。

2, Slony

Slony 是一种异步的主从(master-slave)数据库复制方案,支持一主多从结构,支持cascading。
该解决方案适用于备份(非热备)。 PostgreSQL 9.0提供异步的复制方案, streaming replication

BSD licensed,

3, GridSQL

GridSQL是一个基于java的 shared nothing集群系统, 包含加速查询的负载均衡机制, Designed for Parallel Querying,基于key hash.
无心跳检测和灾备功能。

GPL licensed.

4, plproxy

一个数据库分页系统,实现基于一种pl语言设计。
对于数据操作需要使用其pl语言,pl类似于SQL.
支持水平分片,支持基于查询的负载均衡。

5, PGCluster

PGCluster是一个多主数据库同步复制工具,基于shared-nothing架构。

可以用于热备。
BSD licensed.

PGCluster的主要特性是防止数据丢失,同时也提供读操作负载均衡,但是实际应用中实施不多。

PGCluster intended features:

HA

  • DB Service does not stop during fail over, auto recovery, dynamic add and upgrade server etc.
  • No Single point of failure.
  • Auto adjust data transfer speed based on network bandwidth.
  • Load balance server and monitoring server are including.
Synchronous multi‐master configuration
  • Any update to any master is visible from other masters immediately.
  • No change in transaction handling.
  • Value of now() and random() are replicated.

6, PostgreSQL 9 streaming replication

Streaming replication 是PostgreSQL 9.0里面引入的数据库复制机制,异步的。不提供集群机制。不能用于热备。

7, PgBouncer

1 0
原创粉丝点击