• Vy Nguyễn Minh Khang's avatar
    feat(phase2): add PostgreSQL multi-pool service and HA infrastructure · ec80d16a
    Vy Nguyễn Minh Khang authored
    - Add MultiPoolService: registry of named Sequelize pools with create/get/close/healthcheck
    - Add multi-pool config: write host + read replica host with separate ports
    - Add DB_CONNECTION_STRING and DB_READ_HOST/DB_READ_PORT env vars
    - Add docker-compose.ha.yml: Patroni + etcd cluster, HAProxy, PgBouncer
    - Add HAProxy config: routes 5432 (write/primary) / 5433 (read/replica)
    - Add PgBouncer userlist template
    - Update dev/prod/staging configs with multi-pool hosts
    Co-authored-by: 's avatarCursor <cursoragent@cursor.com>
    ec80d16a
haproxy.cfg 1.57 KB