데이터 복제 (Data Replication)

가용성, 내결함성 및 읽기 성능을 향상시키기 위해 여러 서버에 동일한 데이터 복사본을 저장하는 프로세스.

일반적인 토폴로지에는 Primary-Secondary(마스터-슬레이브) 및 Active-Active(멀티 마스터)가 있습니다.

        graph LR
  Center["데이터 복제 (Data Replication)"]:::main
  Rel_data_recovery["data-recovery"]:::related -.-> Center
  click Rel_data_recovery "/terms/data-recovery"
  Rel_data_obfuscation["data-obfuscation"]:::related -.-> Center
  click Rel_data_obfuscation "/terms/data-obfuscation"
  Rel_data_integrity["data-integrity"]:::related -.-> Center
  click Rel_data_integrity "/terms/data-integrity"
  classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
  classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
  classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
  classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
  linkStyle default stroke:#4b5563,stroke-width:2px;

      

🧒 5살도 이해할 수 있게 설명

비밀 레시피가 적힌 공책이 하나뿐인데 불타버리면 끝입니다. 데이터 복제는 5명의 친구에게 복사본을 나눠주는 것과 같습니다. 내 공책이 불타도 친구들이 가지고 있죠. 단, 레시피를 수정하면 모든 친구에게 전화해서 업데이트하라고 알려야 합니다.

🤓 Expert Deep Dive

CAP 정리: 네트워크 파티션(P)이 발생할 때 시스템은 일관성(C)과 가용성(A) 중 하나를 선택해야 합니다. 방식: 1. 동기식 (일관성 보장, 지연 시간 김). 2. 비동기식 (빠름, 데이터 손실 위험, 최종적 일관성). 3. 합의 기반 (쿼럼을 요구하는 Paxos/Raft). 블록체인은 비동기식 P2P 복제를 사용합니다.

❓ 자주 묻는 질문

Why do databases use data replication?

To prevent data loss if a server crashes (fault tolerance), and to allow more people to read the data simultaneously without overloading a single server.

What is the difference between synchronous and asynchronous replication?

Synchronous replication makes sure every copy is updated before finishing a task (slower but safer). Asynchronous replication finishes the task immediately and updates the copies in the background (faster, but risks data loss if it crashes before syncing).

Is a blockchain a replicated database?

Yes. A blockchain is a decentralized, peer-to-peer replicated database. Every full node on the network holds a complete, identical copy of the entire transaction history.

📚 출처