Skip to main content
2 of 3
Each cluster should run in one container.
guettli
  • 1.6k
  • 5
  • 24
  • 51

Many PG Clusters on more than one machine

I want to run many PostgreSQL clusters (more than 10k).

Each cluster will be quite small with moderate traffic.

I have will have roughly 100 virtual machines. Each VM should run roughly 100 clusters. Each cluster should run in one container.

Features which are not available from PG out-of-the-box:

  • If I create a new cluster I need to check: Which VM has room for a new cluster?
  • I want to be able to move a cluster to a different VM

Before I re-invent the wheel: Is there already a PostgreSQL-way to handle such a scenario?

Does it make sense to use a Kubernetes Postgres-Operator or Patroni?

Background: It will be some kind of open source learning/teaching environment. Each user should get full database superuser permissions. That's why it is not enough to give each user a database. Each user needs a cluster. At least that's my current impression. Please leave a comment if you have an idea for a different architecture.

guettli
  • 1.6k
  • 5
  • 24
  • 51