-
.Net
-
Backup
-
Data Storage Containers
-
Docker Containers
-
Environment Management
- Swap-Domains
- Clone Environment
- Create Environment
- Environment Aliases
- Environment Aliases
- Environment Migration between Regions
- Environment Regions
- Environment Transferring
- Environment Variable
- Environment Variables
- Environment Variables(Apache meaven, Memcached)
- Environment Variables(Go)
- Environment Variables(JAVA)
- Environment Variables(Load Balancer)
- Environment Variables(Node.js)
- Environment Variables(PHP)
- Environment Variables(Ruby)
- How to Migrate a WordPress Site to BitssCloud PaaS
- How to migrate my environments from another Jelastic provider?
- HTTP Headers
- Java VCS Deployment with Maven
- Setting Up Environment
- Share Environment
- Why is my environment in sleeping mode?
- Show all articles (9) Collapse Articles
-
Java
- Environment Variables - Java custom Environment Variables
- Java App server Configuration
- Java Options and Arguments
- Multiple Domains on Tomcat server
- Secure Java Encryption and Decryption
- Spring Boot Standalone and Clustered Java Applications with BitssCloud
- Timezone Data for Java/PHP App Server
- Tomcat HTTP to HTTPS redirect
- WildFly server
-
LiteSpeed Web Server
-
OOM Killer
-
Python
-
Reseller SetUp
-
Secure Socket Layer (SSL)
-
Troubleshooting
-
Account Management
-
CDN
-
Databases
- Database Configuration
- Database Connection Strings
- Database Hosting in BitssCloud
- Environment Variables(Database)
- Galera Cluster not working
- How to export/Import Database via Command line
- How to install MSSQL server on Linux (2017)
- MariaDB/MySQL Auto-Сlustering
- MongoDB Database Backups
- PostgreSQL Database Backups
- PostgreSQL Database Replication
- PostgreSQL Master-Slave Cluster
- Remote Access to PostgreSQL
- Schedule Backups for MySQL and MariaDB Databases
- Scheduling Databases Backups
-
Domain Name Management
- Container Redeploy
- Custom Domain Name
- DNS Hostnames for Direct Connection to Containers
- How to Bind Custom Domain via A Record
- How to Bind Custom Domain via CNAME
- Multiple Custom Domains on an Nginx Web Server
- Multiple Domains with Public IP
- Multiple Public IP Addresses for a Single Container
- Setup WordPress Multisite Network with Domain Mapping and CDN
-
Jenkins
-
Load Balancing
-
PHP
- Creating Environment for PHP
- Deploy PHP Project Via GIT SVN
- How to Check Change PHP Version in BitssCloud
- How to create environment for AngularJs/ReactJs
- How to Enable PHP Extensions
- How to Install Custom PHP Application
- Ion cube Loader
- MariaDB PHP connection
- MySQL PHP Connection
- NGINX PHP
- PHP App Server Configuration
- PHP Connection to MongoDB
- PHP security settings
- PHP Session Clustering
- PostgreSQL PHP Connection
- Running Multiple Domain Names on Apache Server
- Security configuration for Apache
- Zero Downtime (ZDT) Deployment for PHP
- Show all articles (3) Collapse Articles
-
Release Notes
-
Ruby
-
SSH
-
Wordpress
-
Application Management
-
Cluster
-
Deploying Projects
-
Elastic VPS
- CentOS VPS
- Elastic VPS configuratation
- Elastic VPS with full root access
- Installation of cPanel in BitssCloud
- Java Console Application with CentOS VPS
- Linux VPS Access via Public IP
- Linux VPS Access via SSH Gate
- Setting Mail Server Inside CentOS VPS
- Setting Mail Server Inside CentOS VPS
- SSH Access to VPS Gate
- Ubuntu VPS
- Ubuntu with CSF Firewall
-
High Availability
-
Jitsi
-
Node.js
-
Pricing System
-
Request Handling
-
Scaling
- Application Server with horizontal scaling
- Automatic Horizontal Scaling
- Automatic Horizontal Scaling: Multi Nodes
- Automatic Vertical Scaling
- Database Horizontal Scaling
- Docker Containers Horizontal Scaling
- Horizontal Scaling
- Load Balancer with horizontal scaling
- Memcached horizontal scaling
- Storage Container
- VPS Horizontal Scaling
-
Traffic Distributor
-
General
- Apache & NGINX Modules
- BitssCloud Dashboard Guide
- Build and Deploy Hooks
- Cron Job scheduler
- FFMPEG Setup
- File Synchronization
- FTP Overview
- FTP/FTPS Support in BitssCloud
- How to Deploy Magento into BitssCloud PHP Cloud
- How to Enable Expert Mode in JCA
- How to open a support ticket to BitssCloud
- Installation of FTP
- Kubernetes Cluster
- MarketPlace
- Reduce Cloud Waste with Automatically Scheduled Hibernation
- Run Configuration
- SFTP Protocols for Accessing BitssCloud Containers.
- Supported OS Distributions for Docker Containers
- Timezone Addon
- Two-Factor Authentication
- Types of Accounts
- Varnish
- Websockets Support
- What is Cloudlet
- What is PaaS & CaaS
- WordPress AddOn
- Zero Code Change Deploy with No Vendor Lock-In for Smooth Migration across Cloud Platforms
- Show all articles (12) Collapse Articles
-
Go lang
-
Wordpress category
-
Data Storage Container
-
Memcached
-
Account & Pricing
PostgreSQL Master-Slave Cluster
As a critical component for most applications, data has to be available for end users in a dynamically changing environment. Storing data in one location is a subject to risk in case of a system failure. Therefore, you need to come up with a strategy on how to ensure high availability and one of the solutions is to maintain the data on multiple synchronized servers.
Having your data replicated from one database to another allows to alleviate system failures, improve productivity, run backup services, and analyze data with no performance degrade.
Among numerous database clustering solutions, BitssCloud provides PostgreSQL with master-slave asynchronous replication based on the certified templates. By default, it deploys two database containers (one per role – master and slave).
The primary (master) server runs an active instance of the database and accepts read-write operations, whilst the standby (slave) server runs a copy of the active database and handles read-only operations. Therefore, if the primary database fails due to container failure or database corruption, the slave server (running in a separate container) has to be promoted to the master retaining the writes to ensure database availability.
Within the cluster topology, each database container has a default vertical scaling from 2 reserved to 32 dynamic cloudlets (up to 4 GiB of RAM and 12.8 GHz of CPU) that are allocated dynamically based on the incoming load. Subsequently, you can change the resource allocation limit by following the above-linked guide.
Database Cluster can be installed automatically:
- As a Marketplace application
- Via embedded Auto-Clustering feature at the Dashboard
Within this tutorial, we will cover both.
PostgreSQL Cluster Installation from Marketplace
PostgreSQL Master-Slave Cluster package can be easily found in the Marketplace.
If required change database Version, Environment name and destination Region in the installation window.
PostgreSQL Auto-Clustering Mode
In BitssCloud, auto-clustering is enabled by a specially designed switch that makes clustering easier than ever before. To do this just invoke the topology wizard at the dashboard, pick the software stack(e.g. PostgreSQL 12.3) and slide the Auto-Clustering switch to the right.
Change the destination region if necessary.
Tip: The PostgreSQL Replication package sources are available within BitssCloud JPS Collection alongside with other useful solutions, any of which can be integrated through importing a manifest.yaml or manifest.jps file from the appropriate repository.
Cluster Topology
Database cluster topology obtained upon both deployments looks like as follows:
When the database cluster installation is completed, you’ll see a confirmation message with master node URL and database access credentials. All this information is duplicated via email.
Note: If the cluster was installed with auto-clustering functionality the credentials are sent via email only.
Now, let’s put the master database into action to check that data is successfully replicated to the slave.
Testing PostgreSQL Database Replication
To ensure that data is replicated properly, we’ll create a new DB instance in the master container and check its presence inside the slave.
Create a New Database
- Click Open in Browser next to the PostgreSQL Master node to launch the phpPgAdmin web interface.
- Under Servers, click PostgreSQL and log in with credentials you’ve obtained upon cluster installation.
- Click Create database.
- Fill in the Name box (e.g. BitssCloud), and click Create.
Now, when the database is created in the master node, let’s check the replicated data within the slave one.
Check the Replication
To make sure that data replication from the master to the slave database node works as intended, perform the following steps.
- Click Open in Browser next to the PostgreSQL Slave node to launch the phpPgAdmin web interface.
- Access admin interface with the same username and password that you’ve used to access the master node.
Once logged in, you can see the replicated database (BitssCloud, in our example).
That’s it! The PostgreSQL environment with master-slave asynchronous replication is up and ready for data processing.
As a next step, you can connect this PostgreSQL replicated database to your project. The process depends on application specifics, so follow the instructions below for:
- Java application
- PHP application
- PostgreSQL Replication Configuration
Try out by yourself how easy it can be to handle multiple copies of essential data within replicated PostgreSQL databases with no need to make manual configurations. Register at one of BitssCloud hosting providers and get a free account for testing.