Files
obsidian/history/2026-04-05-supabase-to-patroni.md
kappa 2356b86d36 obsidian: 정본 문서에서 히스토리/인시던트 분리 완료
15개 정본 문서에서 날짜별 변경이력, 인시던트 기록, 폐기된 구현 상세를
history/ 디렉토리로 분리. 정본은 현재 상태만 기술하는 백서 형태로 정리.
각 정본에 history 위키링크 추가.

분리된 history 파일 12건:
- apisix git push 500, k3s postgresql migration, apisix→traefik 전환
- netbis DDoS 공격, gitea 이전/분리, usb 2.5g hang + NFS hard mount
- supabase→patroni, apisix etcd 통합/분리, anomaly-detect 재설계
- patroni failover incident, zlambda nixos migration, ops-agents setup

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 12:09:21 +09:00

1.2 KiB

date, topic, areas, tags
date topic areas tags
2026-04-05 K3s 데이터스토어 Supabase → 로컬 Patroni PostgreSQL HA 이전
infra/postgresql-ha.md
infra/infra-hosts.md
history
k3s
postgresql
patroni
supabase
migration

K3s kine 데이터스토어를 Supabase Free tier에서 로컬 Patroni PostgreSQL 3노드 HA 클러스터로 이전.

배경

Supabase Free tier max_connections=60 제한, 싱가포르 리전 ~70ms 레이턴시. 로컬 PostgreSQL HA로 전환하여 성능/안정성 개선.

변경 사항

  • Patroni 3노드 구성: postgres-1(hp2), postgres-2(kr1), postgres-3(kr2)
  • etcd DCS 클러스터: etcd-nas(NAS Docker), etcd-hp2(hp2 Incus), etcd-jp1(jp1 Incus)
  • OpenWrt HAProxy에 PostgreSQL frontend/backend 추가 (Patroni REST API /primary로 Leader 자동 감지)
  • K3s config: datastore-endpoint: "postgres://kine:kine@192.168.9.1:5432/kine"
  • hp2가 control-plane에서 worker(k3s-agent)로 전환

영향 / 검증

  • K3s API 정상 동작 확인
  • failover 시 HAProxy가 ~3초 내 새 Leader 감지

참조

  • infra/postgresql-ha.md — 현재 Patroni HA 구성
  • history/2026-03-24-k3s-postgresql-migration.md — 이전 단계 (외부 etcd → Supabase)