Skip to content

Commit b785e04

Browse files
Update README.md
1 parent ec9d8f5 commit b785e04

File tree

1 file changed

+64
-12
lines changed

1 file changed

+64
-12
lines changed

README.md

Lines changed: 64 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,85 @@
11
# PostgreSQL Database Replication
22

3-
Basic ready-to-use PostgreSQL cluster, which implements asynchronous primary-secondary data replication within a pair of preconfigured database containers.
3+
Basic ready-to-use PostgreSQL cluster, which implements asynchronous Primary-Secondary data replication within a pair of preconfigured database containers and load balancing.
44

55
## Package Implementation Specifics
66

7-
The presented PostgreSQL Replication solution is built upon Jelastic certified stack template for **PostgreSQL**. It operates two database containers (primary and secondary, one per role) and makes data from primary DB server to be asynchronously replicated to a standby one.
7+
The presented PostgreSQL Replication solution is based on Virtuozzo Application Platform(VAP) certified stack templates which built:
8+
- for **[PostgreSQL](https://www.postgresql.org/)** database
9+
- for **[Pgpool-II](https://www.pgpool.net/mediawiki/index.php/Main_Page)** load balancer
10+
11+
By default, package operates two database containers (Primary and Secondary, one per role) and makes data from Primary DB server to be asynchronously replicated to a standby one.
12+
In front of the cluster a scalable load balancer layer of Pgpool-II node can be added which provides load-balancing, monitoring and management of database cluster.
813

914
<p align="left">
10-
<img src="images/postgresql-replication-topology.svg" width="350">
15+
<img src="images/pgpool-postgres-single-region-big-tip-black-font.svg" width="450">
1116
</p>
1217

13-
Within the package, each database container receives the [vertical scaling](https://docs.jelastic.com/automatic-vertical-scaling) up to **32 dynamic cloudlets** (or 4 GiB of RAM and 12.8 GHz of CPU) that are provided dynamically based on the incoming load. Subsequently, you can change the resource allocation limit by following the above-linked guide.
18+
Within the package, each database container receives the [vertical scaling](https://www.virtuozzo.com/application-platform-docs/automatic-vertical-scaling/) up to **32 dynamic cloudlets** (or 4 GiB of RAM and 12.8 GHz of CPU) that are provided dynamically based on the incoming load. And for the load balancer node the **6 dynamic cloudlets** provided by default. Subsequently, you can change the resource allocation limit by following the above-linked guide.
1419

1520
## How to Install PostgreSQL Database Replication Package
1621

17-
In order to get PostgreSQL Database Replication solution instantly deployed, click the **Deploy to Jelastic** button below and specify your email address within the opened widget. Then choose one of the [Jelastic Public Cloud](https://jelastic.cloud) providers (in case you don’t have an account at the appropriate platform, it will be created automatically) and press **Install**.
22+
In order to get PostgreSQL Database Replication solution instantly deployed, click the **Deploy to Cloud** button below and specify your email address within the opened widget. Then choose one of the [Virtuozzo Public Cloud](https://www.virtuozzo.com/application-platform-partners/) providers (in case you don’t have an account at the appropriate platform, it will be created automatically) and press **Install**.
1823

19-
[![Deploy](images/deploy-to-jelastic.png)](https://jelastic.com/install-application/?manifest=https://raw.githubusercontent.com/jelastic-jps/postgres/master/manifest.yaml)
24+
[![Deploy](images/deploy-to-cloud.png)](https://jelastic.com/install-application/?manifest=https://raw.githubusercontent.com/jelastic-jps/postgres/v2.0.0/manifest.yaml)
2025

21-
To install the package manually, log in to the Jelastic dashboard with your credentials and [import](https://docs.jelastic.com/environment-import) link to the [**_manifest.yaml_**](https://github.com/jelastic-jps/postgres/blob/master/manifest.yaml) file (alternatively, you can locate this package via [Jelastic Marketplace](https://docs.jelastic.com/marketplace), *Clusters* section)
26+
To install the package manually, log in to the Virtuozzo Application Platform dashboard with your credentials and [import](https://www.virtuozzo.com/application-platform-docs/environment-import/) link to the [**_manifest.yaml_**](https://github.com/jelastic-jps/postgres/blob/master/manifest.yaml) file (alternatively, you can locate this package via [VAP Marketplace](https://www.virtuozzo.com/application-platform-docs/marketplace/), *Clusters* section)
2227

23-
![postgresql-replication-installation](images/postgresql-replication-installation.png)
28+
<p align="left">
29+
<img src="images/postgresql-replication-installation.png" width="550">
30+
</p>
2431

25-
Within the opened installation window, type *Environment* name and optional *Display Name* ([environment alias](https://docs.jelastic.com/environment-aliases)). Also, select the preferable [*Region*](https://docs.jelastic.com/environment-regions) (if several ones are available) and click **Install**.
2632

27-
Wait a few minutes for Jelastic to prepare your environment and set up the required replication configurations. When finished, you’ll be shown the appropriate notification with data for PostgreSQL administration interface access.
33+
Within the opened installation window, choose the PostgreSQL database version among available ones, type *Environment* name and optional *Display Name* ([environment alias](https://www.virtuozzo.com/application-platform-docs/environment-aliases/). Also, select the preferable [*Region*](https://www.virtuozzo.com/application-platform-docs/environment-regions/) (if several ones are available) and click **Install**.
34+
If required you may disable Pgpool-II load balancer layer with respective toggle.
35+
36+
Wait a few minutes for VAP to prepare your environment and set up the required replication configurations. When finished, you’ll be shown the appropriate notification with data for PostgreSQL administration interface access.
37+
38+
<p align="left">
39+
<img src="images/postgresql-replication-success-message.png" width="400">
40+
</p>
2841

29-
![postgresql-replication-success-message](images/postgresql-replication-success-message.png)
3042

3143
This information will be also duplicated to you via email.
3244

33-
To find more details on PostgreSQL Replication package installation and use, refer to the [article](http://blog.jelastic.com/2017/05/25/master-slave-postgresql-replication-automatic-installation/).
45+
### Cluster Entry Point
46+
47+
In case of no Pgpool-II nodes were added to cluster topology, use Primary node to access the cluster. And if the load balancing layer was deployed in front of the db cluster you may use any of Pgpool-II nodes as the entry point.
48+
49+
### Cluster Management
50+
51+
In VAP the PostgreSQL cluster components can be managed either via [CLI](https://www.virtuozzo.com/application-platform-docs/ssh-access/) or UI.
52+
53+
#### Database Management
54+
55+
Database nodes have a built-in management administration panel phpPgAdmin. Use the only one on Primary node.
56+
57+
<p align="left">
58+
<img src="images/phppgadmin.png" width="600">
59+
</p>
60+
61+
If required, the separate node can be installed with more advanced PostgreSQL database management software [pgAdmin4](https://www.pgadmin.org/) via importing [manifest](https://github.com/jelastic-jps/pgadmin/blob/master/manifest.yaml) from VAP collection.
62+
63+
<p align="left">
64+
<img src="images/pgadmin.png" width="600">
65+
</p>
66+
67+
#### Pgpool-II Management
68+
69+
Pgpool-II nodes can be also managed via user-friendly built-in Administration Panel [pgpoolAdmin](https://www.pgpool.net/docs/pgpoolAdmin/index_en.html).
70+
71+
<p align="left">
72+
<img src="images/pgpool-admin.png" width="600">
73+
</p>
74+
75+
Pgpool-II admin panel provides an ability to tune:
76+
- load balancing and even at database level. It means that you can specify how the requests to every database should be processed and balanced
77+
- connection pools
78+
- logging
79+
- replication
80+
- debugging
81+
- failover and failback
82+
- etc.
83+
84+
85+
To find more details on PostgreSQL Replication package installation and use, refer to the [article](https://www.virtuozzo.com/company/blog/postgresql-auto-clustering-master-slave-replication/).

0 commit comments

Comments
 (0)