Postgres cluster with beefier primary?

I’ve got a very write-intensive job that hogs up CPU time in the primary. Otherwise my app has very low demands, and replicas sit at <1% cpu usage.

Currently I have all 3 nodes with performance-2x vms, so that if a replica needs to become primary, it can do so without issues. But it seems kind of silly provisioning 2 huge vms that sit unused basically all of the time.

Anything wrong with keeping a larger, say performance-4x primary, while having much simpler shared replicas?

Hi Leo,

The cluster is composed of plain Fly machines, and so they can be scaled as needed using individual fly machine update commands, and the number of units can be changed with simple fly machine clone or fly machine destroy operations.

While it is possible to have different machine sizes for each machine in the cluster (for example, to obtain more primary capacity, while keeping the replicas smaller to save on resources), we recommend keeping them homogeneous, due to potential impacts after a cluster leadership change.

Leadership in the cluster can change at any time (e.g. hardware failure, temporary loss of connectivity), and that can shift leadership to a smaller and possibly inadequate machine. We recommend monitoring to ensure the primary’s size is as expected, and being ready to update machines via fly machine update manually, so that each node has the desired size, in case of a leadership change.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.