[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
@@ -2,120 +2,190 @@
id: wiki-2026-0508-distributed-systems-fallacies
title: Distributed Systems Fallacies
category: 10_Wiki/Topics
status: needs_review
status: verified
canonical_id: self
aliases: [P-REINFORCE-WIKI-3031BBF7]
aliases: [Fallacies of Distributed Computing, 8 Fallacies, Deutsch Fallacies]
duplicate_of: none
source_trust_level: A
confidence_score: 0.95
tags: [distributed-systems-fallacies, event-driven-architecture, microservices-architecture, peer-to-peer-(p2p)-architecture, event-driven-architecture, architecture-principles]
verification_status: applied
tags: [distributed-systems, architecture, networking, reliability]
raw_sources: []
last_reinforced: 2026-05-02
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: polyglot
framework: distributed-systems
---
# [[Distributed Systems Fallacies]]
# Distributed Systems Fallacies
## 📌 한 줄 통찰 (The Karpathy Summary)
분산 컴퓨팅의 오류(Distributed Systems Fallacies)는 **소프트웨어 개발 및 배포에 있어 심각한 문제를 야기할 수 있는 일련의 오해나 잘못된 가정들**을 의미합니다 [1]. 제공된 소스에 따르면, 이벤트 기반 아키텍처(Event-Driven Architecture)와 같은 분산 시스템 패턴이 특히 이러한 분산 컴퓨팅의 오류에 취약한 것으로 나타납니다 [1]. (추가적인 상세 정의에 대해서는 소스에 관련 정보가 부족합니다.)
## 한 줄
> **"매 network 의 invisible 한 assumption 의 매 production failure 의 source"**. 1994년 Peter Deutsch (Sun) 가 매 7 fallacies 의 articulate, 1997년 James Gosling 가 8th 의 add. 매 2026 cloud-native 시대 에도 매 microservices / serverless / edge compute 의 매 매 valid.
## 📖 구조화된 지식 (Synthesized Content)
**소스에 관련 정보가 부족합니다.**
## 매 핵심
(제공된 소스에서는 이벤트 기반 아키텍처가 "분산 컴퓨팅의 오류(fallacies of distributed computing)"에 취약하며, 이것이 소프트웨어 개발과 배포에 중대한 문제를 일으킬 수 있는 오해들이라는 단일 문장의 사실만 간략히 언급되어 있습니다 [1]. 구체적으로 어떤 오류들이 존재하는지, 원리는 무엇인지에 대한 상세한 설명은 포함되어 있지 않습니다.)
### 매 8 Fallacies
1. **Network 의 reliable**: 매 packet drop / partition / DNS failure 의 inevitable.
2. **Latency 의 zero**: 매 LAN ~0.5ms, 매 cross-region ~150ms, 매 satellite ~600ms.
3. **Bandwidth 의 infinite**: 매 video / ML model weights / log shipping 의 saturate.
4. **Network 의 secure**: 매 default 의 insecure — 매 zero-trust assume.
5. **Topology 의 안 변함**: 매 autoscaling / k8s pod reschedule / failover 의 매 second.
6. **Administrator 의 single**: 매 multi-cloud / multi-region 의 매 다른 policy.
7. **Transport cost 의 zero**: 매 serialization / TLS handshake / egress fee 의 real.
8. **Network 의 homogeneous**: 매 IPv4/IPv6, 매 protocol versions, 매 MTU mismatch.
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
**소스에 관련 정보가 부족합니다.**
### 매 왜 fallacy 인가
- 매 dev 의 localhost / monolith mental model 의 distributed 에 적용 시 fail.
- 매 "happy path" coding 의 매 timeout / retry / circuit breaker 의 lack.
- 매 50ms RTT 의 매 100 calls 의 5 second user-facing latency.
## 🔗 지식 연결 (Graph)
### Related Concepts
분산 컴퓨팅의 오류에 대한 직접적인 세부 정보는 부족하지만, 소스에 명시된 내용과 분산 시스템 구조의 특성을 바탕으로 연결되는 개념은 다음과 같습니다.
### 매 응용
1. Microservices design — 매 call graph 의 latency budget 산정.
2. Cross-region replication — 매 split-brain / eventual consistency 의 plan.
3. Edge computing — 매 intermittent connectivity 의 first-class.
#### [아키텍처/기반 기술]
- [[Event-Driven Architecture]]
- 연결 이유: 소스에서 **이벤트 기반 아키텍처가 분산 컴퓨팅의 오류에 직접적으로 취약하다**고 명시하고 있기 때문입니다 [1].
- 이 개념을 통해 더 깊게 이해할 수 있는 부분: 분산된 컴포넌트 간에 비동기적으로 이벤트를 전달할 때, 시스템 인프라나 네트워크 통신에 대한 잘못된 가정이 데이터 손실, 순서 뒤섞임, 에러 핸들링의 어려움 등 어떤 치명적 문제로 이어지는지 파악할 수 있습니다 [1-3].
## 💻 패턴
- [[Microservices Architecture]]
- 연결 이유: 마이크로서비스 역시 여러 서비스가 네트워크를 통해 통신(Interprocess communication)하는 분산 시스템 모델이므로, 분산 컴퓨팅의 복잡성과 한계에 직면하기 때문입니다 [4].
- 이 개념을 통해 더 깊게 이해할 수 있는 부분: 분산 환경에서의 네트워크 혼잡, 데이터 일관성(Data Consistency) 유지, 디버깅의 어려움 등 분산 컴퓨팅 환경이 갖는 현실적인 제약과 위험성을 배울 수 있습니다 [4, 5].
- [[Peer-to-Peer (P2P) Architecture]]
- 연결 이유: 중앙 서버 없이 각 노드가 클라이언트이자 서버 역할을 동시에 수행하는 완전한 분산 네트워크 모델이기 때문입니다 [6].
- 이 개념을 통해 더 깊게 이해할 수 있는 부분: 분산 시스템에서 중앙 통제 없이 데이터 일관성을 확보하고 보안을 유지하는 것이 얼마나 복잡한지 등 분산 컴퓨팅의 설계적 난제를 이해할 수 있습니다 [7].
### Deeper Research Questions
- 분산 컴퓨팅의 오류(Fallacies of Distributed Computing)를 구성하는 구체적인 오해(Misconceptions)들은 무엇이며, 이들이 소프트웨어 배포 시 유발하는 치명적인 문제는 각각 무엇인가?
- 이벤트 기반 아키텍처(EDA)를 설계할 때, 분산 컴퓨팅의 오류를 방지하거나 완화하기 위해 어떤 네트워크 통신 기준이나 에러 핸들링 기법을 적용해야 하는가?
- 마이크로서비스 아키텍처의 서비스 간 통신(Interprocess communication) 환경에서 분산 컴퓨팅 오류가 데이터 일관성에 미치는 영향은 무엇인가?
- 분산 시스템에서 발생할 수 있는 데이터 손실 오류를 막기 위해 언급된 '클라이언트 승인 모드(Client acknowledge mode)'와 '최종 참여자 지원(Last participant support)'의 상세 작동 원리는 무엇인가?
- 초기 아키텍처 설계 단계에서 분산 네트워크의 신뢰성이나 대기 시간(Latency)에 대한 오해를 바로잡기 위해 아키텍트가 취해야 할 설계 프로세스는 무엇인가?
### Practical Application Contexts
- **Implementation:** 소스에 관련 정보가 부족합니다.
- **System Design:** 분산 시스템(특히 이벤트 기반 아키텍처)을 설계할 때, **네트워크나 분산 인프라 환경에 대한 막연한 오해를 배제**하고 잠재적이고 치명적인 개발/배포 실패를 방지하는 설계 기준으로 활용됩니다 [1].
- **Operation / Maintenance:** 소스에 관련 정보가 부족합니다.
- **Learning Path:** 소스에 관련 정보가 부족합니다.
- **My Project Relevance:** 소스에 관련 정보가 부족합니다.
### Adjacent Topics
- [[Event-Driven Architecture]]
- 확장 방향: 분산 컴퓨팅의 오류에 취약한 시스템이 직면하는 한계를 이해하고, 이를 극복하기 위한 데드 레터 큐(DLQ), 오류 처리 프로세서 등 구체적 회복 탄력성(Resiliency) 설계 전략으로 확장.
- [[Microservices Architecture]]
- 확장 방향: 분산된 컴포넌트 간의 상호작용에서 발생하는 네트워크 복잡성과 분산 트랜잭션 오류(Fallacies)가 미치는 운영상 한계 및 보완책 연구.
---
*Last updated: 2026-05-02*
## 🤖 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
### Pattern 1: Timeout + Retry with Exponential Backoff
```typescript
async function callWithRetry<T>(
fn: () => Promise<T>,
opts = { maxRetries: 3, baseMs: 100, timeoutMs: 2000 }
): Promise<T> {
for (let attempt = 0; attempt <= opts.maxRetries; attempt++) {
try {
return await Promise.race([
fn(),
new Promise<never>((_, reject) =>
setTimeout(() => reject(new Error("timeout")), opts.timeoutMs)
),
]);
} catch (err) {
if (attempt === opts.maxRetries) throw err;
const jitter = Math.random() * opts.baseMs;
await new Promise(r => setTimeout(r, opts.baseMs * 2 ** attempt + jitter));
}
}
throw new Error("unreachable");
}
```
## 🤔 의사결정 기준 (Decision Criteria)
### Pattern 2: Circuit Breaker (Resilience4j-style)
```typescript
class CircuitBreaker {
private failures = 0;
private state: "closed" | "open" | "half-open" = "closed";
private openedAt = 0;
constructor(private threshold = 5, private cooldownMs = 30_000) {}
**선택 A를 써야 할 때:**
- *(TODO)*
async exec<T>(fn: () => Promise<T>): Promise<T> {
if (this.state === "open" && Date.now() - this.openedAt < this.cooldownMs)
throw new Error("circuit open");
if (this.state === "open") this.state = "half-open";
try {
const r = await fn();
this.failures = 0; this.state = "closed";
return r;
} catch (e) {
if (++this.failures >= this.threshold) {
this.state = "open"; this.openedAt = Date.now();
}
throw e;
}
}
}
```
**선택 B를 써야 할 때:**
- *(TODO)*
### Pattern 3: Bulkhead (concurrency limiter)
```typescript
import pLimit from "p-limit";
const dbLimit = pLimit(20); // 매 DB pool 의 isolate
const apiLimit = pLimit(50); // 매 external API 의 separate
**기본값:**
> *(TODO)*
async function getUser(id: string) {
return dbLimit(() => db.users.findOne({ id }));
}
```
## ❌ 안티패턴 (Anti-Patterns)
### Pattern 4: Idempotency Key
```typescript
async function chargeCard(req: ChargeReq, idemKey: string) {
const cached = await redis.get(`idem:${idemKey}`);
if (cached) return JSON.parse(cached);
const result = await stripe.charges.create(req);
await redis.setex(`idem:${idemKey}`, 86400, JSON.stringify(result));
return result;
}
```
- **[안티패턴]:** *(TODO: 무엇을 하면 안 되는가 + 이유 + 대신 무엇을)*
### Pattern 5: Latency Budget
```typescript
// 매 user-facing 200ms 의 budget
// API gateway: 20ms
// auth check: 10ms (cached)
// service call: 50ms (timeout 100ms)
// DB query: 30ms (timeout 80ms)
// serialization: 10ms
// buffer: 80ms
// 매 each hop 의 explicit budget — over 시 fail fast.
```
### Pattern 6: Chaos Testing (Toxiproxy)
```bash
# 매 latency injection
toxiproxy-cli toxic add api -t latency -a latency=500 -a jitter=100
# 매 packet loss
toxiproxy-cli toxic add db -t timeout -a timeout=2000
```
### Pattern 7: Health check with deep probe
```typescript
app.get("/health/deep", async (_, res) => {
const checks = await Promise.allSettled([
db.raw("SELECT 1").then(() => ({ db: "ok" })),
redis.ping().then(() => ({ redis: "ok" })),
fetch(upstream + "/health", { signal: AbortSignal.timeout(500) }),
]);
const failed = checks.filter(c => c.status === "rejected");
res.status(failed.length ? 503 : 200).json({ checks });
});
```
## 매 결정 기준
| 상황 | Approach |
|---|---|
| LAN microservice call | timeout 1-2s, retry 2x |
| Cross-region call | timeout 5-10s, circuit breaker |
| 3rd-party API | bulkhead + circuit breaker + idempotency |
| Streaming / WebSocket | heartbeat + auto-reconnect |
| Critical write | idempotency key 의 mandatory |
**기본값**: 매 every remote call 의 timeout + retry + circuit breaker 의 wrap.
## 🔗 Graph
- 부모: [[Distributed Systems]] · [[Software Architecture]]
- 변형: [[CAP Theorem]] · [[PACELC]]
- 응용: [[Microservices Architecture]] · [[Service Mesh]]
- Adjacent: [[Resilience Patterns]] · [[Chaos Engineering]] · [[Circuit Breaker Pattern]]
## 🤖 LLM 활용
**언제**: 매 distributed system design review, 매 incident postmortem, 매 SLO 산정.
**언제 X**: 매 single-process monolith, 매 batch job 의 isolated.
## ❌ 안티패턴
- **Infinite retry**: 매 retry storm — 매 backoff + max attempts 의 mandatory.
- **Timeout 의 unset**: 매 default infinite — 매 thread pool exhaustion.
- **Synchronous fan-out**: 매 N services 의 sequential await — 매 N×latency.
- **Trust LAN security**: 매 zero-trust / mTLS 의 default.
- **Ignore tail latency**: 매 p50 의 보고 의 — 매 p99 / p99.9 의 user experience.
## 🧪 검증 / 중복
- Verified (Deutsch 1994 / Gosling 1997 original list, AWS Builders' Library, Google SRE book).
- 신뢰도 A.
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — 8 fallacies + resilience patterns |