Deploying Postgres
Deploying Postgres
Deploying
Postgres
Databases in
Containers
GETTING STARTED
EnterpriseDB | www.enterprisedb.com
STNETNOC
03 Introduction
14 Conclusion
In this white paper, we explore at some depth what is driving the growth of containers, as
well as the opportunities and challenges of a specific container use case: databases.
encapsulation of its DBMS server software, usual container lifespans often detract
with access to a physical database file from the key container benefit of reduced
Each DBMS is encased in its own container Databases typically have numerous
One indication that containerized databases are trending is that Postgres, a well-
known open-source relational database, is currently the third most popular technology
being run on Docker.
Source: Datadog
1. Monitoring and Administration: Each Postgres server is monitored by an agent that reports its tracked data to an
administration tool.
2. High Availability: EDB Postgres streams incremental changes from the master to any number of read-only standby
replicas. A high-availability agent watches for failures and automatically triggers failover protocols according to the
nature of the detected failure.
3. Disaster Recovery: EDB Postgres maintains a backup data store and automatically orchestrates enterprise-grade
disaster recovery procedures as required.
4. Scalability: EDB is one of the major contributors to the pgPool proxy, which helps applications scale by load
balancing read transactions to the replicas while directing write requests to the master. There is also a redundant
pgPool proxy to which the application is automatically connected by the high-availability agent in a failover situation.
EDB Postgres is delivered as four containers, all of which are managed by Kubernetes:
1. Database Administration: Postgres Enterprise Manager® (PEM), packaged in this container, monitors the database,
collecting performance and status data that's displayed within dashboards and analyzed for alert conditions. These
alerts can be relayed to operators or to other enterprise-level management systems.
2. High Availability and Data Management: This container includes EDB Postgres Advanced Server along with EDB
Postgres Failover Manager (EFM). Users can have Kubernetes spin up several replicas of a master container so if the
master fails, one of the replicas can take over automatically.
3. Disaster Recovery: This container includes the EDB Postgres Backup and Recovery Tool (BART), which can back up
databases in multiple different containers. This enables BART to oversee multiple deployments.
4. Read Scalability: This container delivers query routing and connection pooling using pgPool. The benefit of this
container is scaling read activity where pgPool acts as a load balancer routing queries to replica databases. It sits in
front of the other containers and can be scaled independently of the database container.
EDB Postgres is platform agnostic and can failover. Replica pods are a way to
be deployed on any Kubernetes platform manage a deployment so that redundant
such as Red Hat OpenShift, Google database servers can be on separate
Kubernetes Engine, Pivotal Cloud Foundry, physical hardware.
Docker, IBM Cloud, or Amazon Web
Services (AWS). Management and monitoring is done
through PEM, with shared storage being
The following schematic shows a typical the preferable data storage practice in
configuration of EDB Postgres in a production for the database itself, as well
production environment, with a master and as for backup and recovery.
two replica pods for high availability and
Through its Architectural Roadmap and Solution Blueprint Service, EDB solution
architects help their customers design a customized container roadmap for
getting from where they are today (struggling with large and cumbersome
databases), to a new world of small nimble deployments that are fully aligned
with their strategic business objectives. Leveraging a reference library of proven
blueprints, full-stack tool sets, and API integration designs, EDB customers can
accelerate their digital transformation initiatives, model a robust open-source-
based data architecture, and deploy rapidly across complex environments.
In addition to containerized
applications, containerized databases
have emerged as part of the paradigm
shift from large monolithic applications Please visit the EDB website to
to applications composed of download and try out EDB containers
(click the Access Repository button).
microservices. Rather than a large
You can also learn more about the
centralized database that serves
supported options and platforms as
multiple applications, containerized well as view the documentation.
databases have become an on-demand www.enterprisedb.com/containers
utility that is an integral part of the
application itself. That being said,