Giter Site home page Giter Site logo

ha-psql's Introduction

HA PostgreSQL cluster configuration

HA PostgreSQL cluster configuration example (PostgreSQL, Patroni, etcd and HAProxy with Keepalived).

Description

The configuration example consists of 8 servers in total:

  1. server50 (192.168.6.50) - MASTER HAProxy server

  2. server51 (192.168.6.51) - BACKUP HAProxy server

*Keepalived is configured on both HAProxy servers and the virtual ip address 192.168.6.60 is used as the frontend listening on port 5432.

  1. server10 (192.168.6.10) - PostgreSQL and Patroni

  2. server11 (192.168.6.11) - PostgreSQL and Patroni

  3. server12 (192.168.6.12) - PostgreSQL and Patroni

*The replication is configured using Postgres' asynchronous streaming replication and Patronis API listens on port 8008 (https) using basic username/password authentication.

  1. server40 (192.168.6.40) - etcd

  2. server41 (192.168.6.41) - etcd

  3. server42 (192.168.6.42) - etcd

*etcd is used as the distributed key-value store and listens on port 2379 for client connections and port 2380 for peer connections. Both ports are configured using Two-way SSL (Mutual Authentication).

Since this is only a test/demo example, all certificates (including private keys) are available for download.

Supported Systems

Tested on CentOS 7.6.1810 on the following versions:

PostgreSQL 10.7

Patroni 1.5.6

etcd 3.3.11

HAProxy 1.5.18

Keepalived 1.3.5

ha-psql's People

Contributors

zsostaric avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.