Book Image

PostgreSQL 13 Cookbook

By : Vallarapu Naga Avinash Kumar
Book Image

PostgreSQL 13 Cookbook

By: Vallarapu Naga Avinash Kumar

Overview of this book

PostgreSQL has become the most advanced open source database on the market. This book follows a step-by-step approach, guiding you effectively in deploying PostgreSQL in production environments. The book starts with an introduction to PostgreSQL and its architecture. You’ll cover common and not-so-common challenges faced while designing and managing the database. Next, the book focuses on backup and recovery strategies to ensure your database is steady and achieves optimal performance. Throughout the book, you’ll address key challenges such as maintaining reliability, data integrity, a fault-tolerant environment, a robust feature set, extensibility, consistency, and authentication. Moving ahead, you’ll learn how to manage a PostgreSQL cluster and explore replication features for high availability. Later chapters will assist you in building a secure PostgreSQL server, along with covering recipes for encrypting data in motion and data at rest. Finally, you’ll not only discover how to tune your database for optimal performance but also understand ways to monitor and manage maintenance activities, before learning how to perform PostgreSQL upgrades during downtime. By the end of this book, you’ll be well-versed with the essential PostgreSQL 13 features to build enterprise relational databases.
Table of Contents (14 chapters)
12
About Packt

Installing HAProxy on Linux servers

HaProxy is one of the widely implemented lightweight load balancers. It can be used to load balance reads using round-robin or least connection count algorithms between multiple database servers. In this recipe, we shall see the steps involved in installing HAProxy on a Linux server.

Getting ready...

HAProxy is generally available through the default repositories of both Red Hat/Centos or Ubuntu/Debian operating systems. All it needs is internet connectivity to download the packages from a remote repository.

How to do it...

HAProxy can be installed on RedHat/CentOS and Ubuntu/Debian using the following steps:

  1. We can use the following command to install HAProxy on Red Hat/Centos:
$ sudo yum install haproxy -y
  1. We can use the following command to install HAProxy on Ubuntu/Debian:
$ sudo apt-get install haproxy -y

How it works...

Installing HaProxy is a simple one-line command as seen in the preceding section. It can be installed using YUM on the Red...