This document discusses building a production-grade PostgreSQL service on Cloud Foundry. Key points include:
- Dedicated PostgreSQL instances per service are recommended over shared instances to avoid single points of failure.
- On-demand provisioning of instances is essential for scalability and ease of deployment. Bosh is well-suited for automating infrastructure management.
- Any necessary PostgreSQL replication and clustering must be automated to support scalability and high availability of the service.
- The architecture involves a service broker implementing the Cloud Foundry API, with PostgreSQL-specific logic encapsulated separately for configuration, credentials, and catalog data. Deployments are managed by a Bosh deployer.
16. • Single VM or single
cluster of VMs
• Single PostgreSQL
server or single
PostgreSQL cluster
• Isola8on limited to
PostreSQL mul8-
tenancy capabili8es
Shared PostgreSQL Cluster > Bad idea
3 VMs
Postgresql
VM#1
Postgresql
VM#2
Postgresql
VM#3
1 VM
Postgresql
VM#1
PostgreSQL Cluster
Single PostgreSQL Server
Service Instance
Service Instance 2
Service Instance 3
Service Instance 1
Service Instance 2
Service Instance 3
Service Instance 1
Service Instance 2
Service Instance 3
Service Instance 1
Service Instance 2
Service Instance 3
Service Instance 1
OR
1x
1x
24. • Service instance =
dedicated VM or
dedicated cluster of
VMs
• Uses infrastructure
isola8on to enable
mul8-tenancy support
Dedicated PostgreSQL instances > Good idea
my-3node-postgres-cluster-2
Postgresql
VM#1
Postgresql
VM#2
Postgresql
VM#3
my-single-postgres-1
Postgresql
VM#1
Service Instance
Service Instance
n x
m x
and / or
72. • Finding a PostgreSQL replica.on &
clustering toolset that allows automa.on
• Itera.vely learn how to configure and
automate common and edge-case
scenarios.