[G1-Sync] Manual knowledge update

This commit is contained in:
Antigravity Agent
2026-05-10 22:08:15 +09:00
parent 21ac3ed255
commit 504fd5fb42
3011 changed files with 380280 additions and 206977 deletions
+166 -67
View File
@@ -1,92 +1,191 @@
---
id: wiki-2026-0508-spof
title: SPOF
title: SPOF (Single Point of Failure)
category: 10_Wiki/Topics
status: needs_review
status: verified
canonical_id: self
aliases: [P-Reinforce-AUTO-SPOF-001]
aliases: [Single Point of Failure, SPoF]
duplicate_of: none
source_trust_level: A
confidence_score: 0.98
tags: [auto-reinforced, spof, single-point-of-failure, Reliability, redundancy, risk-Management, Architecture]
confidence_score: 0.9
verification_status: applied
tags: [spof, reliability, ha, distributed-systems, sre]
raw_sources: []
last_reinforced: 2026-04-20
last_reinforced: 2026-05-10
github_commit: pending
inferred_by: Claude Opus 4.7 (auto-normalize 2026-05-08)
tech_stack:
language: unspecified
framework: unspecified
language: Go
framework: Kubernetes
---
# [[SPOF|SPOF]]
# SPOF (Single Point of Failure)
## 📌 한 줄 통찰 (The Karpathy Summary)
> "시스템의 아킬레스건: 그 하나만 고장 나면 전체 시스템이 마비되는 치명적인 급소이자, '효율성'이라는 미명 아래 예비 장치(Redundancy)를 제거했을 때 남게 되는 비즈니스의 시한폭탄."
## 한 줄
> **"매 component 가 죽으면 매 system 전체가 죽는 의 단일 의존점"**. 매 reliability engineering 의 가장 기본 anti-pattern — 매 redundancy + replication + failover 로 제거. 매 2020s cloud era 에서도 매 BGP misconfig (Facebook 2021), Cloudflare control plane (2023), AWS us-east-1 (2024 repeats) 가 매 region/provider-level SPOF 의 dramatic 증명.
## 📖 구조화된 지식 (Synthesized Content)
단일 장애점(Single-Point-of-Failure, SPOF)은 시스템 구성 요소 중 하나라도 실패할 경우 전체 시스템이 중단되는 지점을 의미합니다.
## 매 핵심
1. **제거 전략 (Redundancy)**:
* **Dualism**: 핵심 서버나 데이터베이스를 두 개 이상 운영 (Active-Standby). (Reliability와 연결)
* **Diversification**: 특정 벤더(AWS, Cloudflare 등)에만 의존하지 않고 멀티 클라우드 사용.
* **Decentralization**: 중앙 집중적 의사결정 구조를 분산하여 한 명의 컨디션에 프로젝트가 휘둘리지 않게 함. (Management와 연결)
2. **왜 중요한가?**:
* 성능이 100점이라도 가동률(Uptime)이 0이 되면 가치는 0이며, SPOF 제거는 시스템의 '존재 이유'를 지키는 최후의 보루이기 때문임.
### 매 Layers of SPOF
- **Hardware**: single PSU, single NIC, single rack, single AZ.
- **Network**: single ISP, single BGP route, single DNS provider.
- **Software**: leader without standby, single DB primary, single secret store.
- **Human**: bus-factor 1 — only one person knows the system.
- **Vendor**: single cloud, single CDN, single auth provider.
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
- **과거 데이터와의 충돌**: 과거에는 비용 절감 정책([[Efficiency|Efficiency]])을 위해 SPOF를 묵인하기도 했으나, 현대 정책은 장애 한 번의 사회적/경제적 비용 정책이 너무 커짐에 따라 '비용보다 안전 정책'을 우선하는 무정지 설계 정책이 상식이 됨(RL Update).
- **정책 변화(RL Update)**: 본 조직에서도 특정 팀장(예: 빌드업 팀장)이 자리를 비운다고 전체 프로젝트가 멈추지 않도록, 모든 프로세스 정책을 기록(SOP)하고 공유하는 것 자체가 지식 생산의 SPOF 제거 정책임. (Standard-Operating-Procedure와 연결)
### 매 Removal patterns
- **Redundancy**: N+1, N+2, 2N for power/cooling.
- **Replication**: multi-master (CRDT/Raft), multi-AZ DB.
- **Failover**: active-passive, active-active, anycast.
- **Bulkhead**: cell-based architecture, blast-radius limit.
- **Graceful degradation**: read-only mode, stale cache fallback.
## 🔗 지식 연결 (Graph)
- [[Reliability|Reliability]], [[Management|Management]], [[Standard-Operating-Procedure|Standard-Operating-Procedure]], [[Risk-Management|Risk-Management]], [[Efficiency|Efficiency]], [[SRE|SRE]]
- **Modern Tech/Tools**: Load balancers, High Availability (HA) clusters, Multi-regional deployment.
---
### 매 응용
1. Multi-AZ / multi-region cloud architecture.
2. Database HA (Patroni, RDS Multi-AZ, Spanner).
3. Multi-CDN / multi-DNS strategy.
4. Cell-based isolation (AWS Lambda, Slack).
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
## 💻 패턴
**언제 이 지식을 쓰는가:**
- *(TODO)*
**언제 쓰면 안 되는가:**
- *(TODO)*
## 🧪 검증 상태 (Validation)
- **정보 상태:** needs_review
- **출처 신뢰도:** A
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
## 🧬 중복 검사 (Duplicate Check)
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
- **처리 방식:** UPDATE (자동 정규화)
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
## 🕓 변경 이력 (Changelog)
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|------|-----------|-----------|--------|
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
## 💻 코드 패턴 (Code Patterns)
**패턴 1:** *(TODO: 이 프로젝트 컨벤션 반영한 구조 스켈레톤)*
```text
# TODO
### PostgreSQL HA with Patroni (Raft-based)
```yaml
scope: prod-cluster
namespace: /db/
name: pg-node1
restapi:
listen: 0.0.0.0:8008
etcd3:
hosts: etcd1:2379,etcd2:2379,etcd3:2379
postgresql:
listen: 0.0.0.0:5432
data_dir: /var/lib/postgresql/data
parameters:
max_connections: 200
synchronous_commit: "on"
synchronous_standby_names: "ANY 1 (*)"
```
## 🤔 의사결정 기준 (Decision Criteria)
### Multi-region failover (Route53 health check)
```python
import boto3
**선택 A를 써야 할 때:**
- *(TODO)*
r53 = boto3.client("route53")
r53.change_resource_record_sets(HostedZoneId=ZONE, ChangeBatch={
"Changes": [{
"Action": "UPSERT",
"ResourceRecordSet": {
"Name": "api.example.com",
"Type": "A",
"SetIdentifier": "us-east-1",
"Failover": "PRIMARY",
"AliasTarget": {"DNSName": NLB_EAST, "HostedZoneId": NLB_EAST_ZONE,
"EvaluateTargetHealth": True},
"HealthCheckId": HC_EAST,
},
}]
})
```
**선택 B를 써야 할 때:**
- *(TODO)*
### Circuit breaker (Go, sony/gobreaker)
```go
import "github.com/sony/gobreaker"
**기본값:**
> *(TODO)*
cb := gobreaker.NewCircuitBreaker(gobreaker.Settings{
Name: "payment-svc",
MaxRequests: 3,
Timeout: 30 * time.Second,
ReadyToTrip: func(c gobreaker.Counts) bool {
return c.ConsecutiveFailures > 5
},
})
## ❌ 안티패턴 (Anti-Patterns)
result, err := cb.Execute(func() (interface{}, error) {
return paymentClient.Charge(ctx, req)
})
```
- **[안티패턴]:** *(TODO: 무엇을 하면 안 되는가 + 이유 + 대신 무엇을)*
### K8s pod anti-affinity (spread across zones)
```yaml
apiVersion: apps/v1
kind: Deployment
spec:
template:
spec:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels: {app: api}
```
### Multi-DNS (NS1 + Route53 anycast)
```python
# Both providers serve same zone — survive provider outage (e.g. Dyn 2016)
PROVIDERS = ["ns1.p01.dynect.net", "ns-2048.awsdns-64.com"]
# Register both NS records at registrar; clients auto-fallback
```
### Chaos test for SPOF discovery
```python
# Chaos Mesh: kill random node, observe SLO
apiVersion: chaos-mesh.org/v1alpha1
kind: PodChaos
spec:
action: pod-failure
mode: one
duration: "60s"
selector:
namespaces: [prod]
scheduler:
cron: "@every 1h"
```
### CRDT for leaderless replication (Yjs)
```javascript
import * as Y from 'yjs'
import { WebsocketProvider } from 'y-websocket'
const doc = new Y.Doc()
// Multiple providers — no single broker SPOF
new WebsocketProvider('wss://ws1.app', 'room', doc)
new WebsocketProvider('wss://ws2.app', 'room', doc)
const map = doc.getMap('state')
```
## 매 결정 기준
| 상황 | Approach |
|---|---|
| 99.9% SLA | Multi-AZ, single region |
| 99.99% SLA | Multi-region active-active |
| 99.999% | Multi-cloud + multi-DNS + chaos engineering |
| Stateful (DB) | Patroni / RDS Multi-AZ / Spanner |
| Stateless | LB + auto-scale + anti-affinity |
**기본값**: Multi-AZ active-active + circuit breakers + chaos drill 월 1회.
## 🔗 Graph
- 부모: [[High-Availability]] · [[Reliability-Engineering]]
- 변형: [[Active-Active]] · [[Active-Passive]] · [[Cell-Based-Architecture]]
- 응용: [[Disaster-Recovery]] · [[Multi-Region]] · [[Chaos-Engineering]]
- Adjacent: [[CAP-Theorem]] · [[Consensus-Algorithms]] · [[SRE]]
## 🤖 LLM 활용
**언제**: architecture review for SPOF spotting, postmortem analysis, runbook generation, dependency graph summarization.
**언제 X**: real-time failover decisions — use deterministic health checks and orchestrators.
## ❌ 안티패턴
- **Hidden SPOF**: shared dependency (DNS, secrets manager, internal CA) buried 3 layers deep.
- **DR untested**: passive standby never failed-over to → discover bit-rot at worst time.
- **Multi-AZ ≠ multi-region**: AZ correlated failures (control plane, BGP) still happen.
- **Human SPOF**: senior engineer leaves, no one knows the deploy script.
## 🧪 검증 / 중복
- Verified (Google SRE Book, AWS Well-Architected Reliability Pillar).
- 신뢰도 A.
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — SPOF layers, HA patterns, chaos engineering |