pgpool-II PoC (n8n 전용 전환) + postgresql-ha.md 섹션 추가
This commit is contained in:
@@ -173,6 +173,30 @@ tcp_keepalives_count = 3
|
||||
|
||||
Patroni failover 인시던트 이력: [[../history/2026-04-08-patroni-failover-incident|2026-04-08 pgcat/nocodb/outline read-only 사고]] · [[../history/2026-04-15-pgcat-ha-promotion|2026-04-15 pgcat HA 승격 Step 0]]
|
||||
|
||||
## pgpool-II PoC (n8n 전용)
|
||||
|
||||
2026-04-16 기준 **n8n 만** pgpool 경유 (NocoDB·Outline 은 pgcat 유지). 1주 관측 후 확대 여부 판단.
|
||||
|
||||
### 구조
|
||||
|
||||
```
|
||||
n8n → pgpool.db.svc.cluster.local:9999 → Patroni 3노드 직결 (HAProxy 미경유)
|
||||
```
|
||||
|
||||
- 이미지: `pgpool/pgpool:4.4.3` (공식). `pgpool/pgpool` 태그 최신. 4.5/4.6 은 Bitnami 쪽 `bitnamilegacy/pgpool` 에만 있으나 env 래퍼 복잡도로 포기
|
||||
- replicas=2 on kr1 + kr2 (`podAntiAffinity` topologyKey hostname), PDB `minAvailable: 1`
|
||||
- 인증: `allow_clear_text_frontend_auth=on` + `pool_hba.conf` 메소드 `password`. 클라이언트가 plaintext 전송 → pgpool 이 그대로 backend scram-sha-256 challenge-response 에 사용. `pool_passwd` 미사용 (pgpool 이 plaintext 엔트리를 자동으로 md5 로 해시하는데 postgres 가 md5 거절 → 인증 실패)
|
||||
- sr_check/health_check: `sr_check_user=sr_check` (REPLICATION + pg_monitor), plaintext password 를 entrypoint sed 로 주입
|
||||
- `backend_clustering_mode = streaming_replication` (Patroni 연동). `failover_on_backend_error = off` — Patroni 가 promotion 수행, pgpool 은 role 변경 탐지 후 라우팅만 갱신
|
||||
- `load_balance_mode = off` — 모든 쿼리 primary 로 (n8n read-your-write 일관성)
|
||||
|
||||
### 검증 결과 (2026-04-16)
|
||||
|
||||
- **Patroni switchover** (postgres-3→postgres-2, TL9→10): n8n 에러 창 ~2초 / 1건 `failed to create a backend 2 connection` → 즉시 `Database connection recovered`. pgpool `SHOW POOL_NODES` 에서 `last_status_change` 가 switchover 시점에 갱신되어 primary 자동 재탐지 확인
|
||||
- **mbp etcd 60s down**: n8n 에러 **0건**, n8n.inouter.com 200 유지. pgcat 에서는 동일 시나리오에서 n8n 풀 좀비 → 503 / pod restart 필요했음
|
||||
|
||||
자세한 구성·검증 로그: [[../history/2026-04-16-pgpool-n8n-poc|history]]
|
||||
|
||||
## APISIX etcd 사용 현황
|
||||
|
||||
| 사이트 | etcd | prefix | 비고 |
|
||||
|
||||
Reference in New Issue
Block a user