Production simulations
Exit

INC-3501 · P1

Enrolments cannot be recorded: the “high availability” PostgreSQL database no longer has a primary

Chicago · MasterLinux head office server room · ml-bastion · Monday 07:52

The MasterLinux platform (Chicago) manages 210,000 student accounts. Enrolments are made on espace.masterlinux.lab. The PostgreSQL 16 database runs in high availability with Patroni on ml-pg-01 and ml-pg-02; the “leader” lock is stored in a three-member etcd cluster. HAProxy sends writes (port 5000) to the node that answers 200 on /primary, and reads (port 5001) to the replicas.

Since 02:14, browsing works but every write fails. The night on-call engineer saw the alert “ml-pg-01: PostgreSQL demoted” and suggests “promoting ml-pg-02 by hand”. The back-to-school enrolment campaign opens at 09:00.

You are a level-3 database engineer, on the ml-bastion bastion (root SSH to every server). Mission: understand why Patroni refuses to elect a primary and restore it without any risk of a double primary (split-brain) or data loss.

This simulation is part of a production simulation pack.

Unlock every production simulation

AWS, Azure, Google Cloud, on-premise and multi-cloud, from Beginner to Extreme: the real incidents of IT service companies and large IT organisations, available for a year.

Try the free demo simulation first

Already enrolled? Log in.