Why does my Spilo PostgreSQL cluster keep falling apart in Docker Swarm?

0
0
Asked By MellowPine42 On

I'm trying to run a basic highly available PostgreSQL cluster with Spilo images on a Docker Swarm setup, but every few days it starts failing in multiple ways: DNS resolution errors, connection timeouts, and corruption or inconsistency involving WAL data and etcd records. I can't afford a managed hosting solution right now. Has anyone experienced this kind of instability and found a reliable fix? It feels surprisingly difficult compared with setting up MariaDB with Galera, even though the goal seems fairly similar.

2 Answers

Answered By SunnyRook18 On

A PostgreSQL operator such as CloudNativePG on Kubernetes handles a lot of the discovery, failover, and recovery details for you, so it may be a more robust route if you can support that infrastructure.

MellowPine42 -

I understand the appeal, but taking on Kubernetes right now would be far more complexity than I want for this deployment. I’m specifically trying to keep it within Docker Swarm.

Answered By CopperLynx7 On

I’ve run the sample Spilo setup on a three-node cluster without seeing those failures. One important difference is that I avoided service DNS entirely and configured the nodes with fixed IP addresses through Ansible. That may be worth testing, since unstable name resolution can cause cascading problems for the cluster.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.