Veri Replikasyonu (Data Replication)

Kullanılabilirliği, hata toleransını ve okuma performansını artırmak için aynı veri kopyalarının birden fazla sunucuda saklanması işlemi.

Topolojiler: Primary-Secondary (Master-Slave) ve Active-Active (Multi-master).

        graph LR
  Center["Veri Replikasyonu (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 yaşındaki gibi açıkla

Gizli bir tarifinizi tek bir defterde tutarsanız ve o defter yanarsa tarif gider. Replikasyon, 5 arkadaşınıza fotokopi vermektir. Defteriniz yansa bile tarif kurtulur. Ancak tarifte bir değişiklik yaparsanız, herkesi arayıp kopyalarını güncellemelerini söylemeniz gerekir.

🤓 Expert Deep Dive

CAP Teoremi: Ağ bölünmesi (P) durumunda sistem, Tutarlılık (C) veya Kullanılabilirlik (A) arasında seçim yapmalıdır. Yöntemler: 1. Senkron (güçlü tutarlılık, yüksek gecikme). 2. Asenkron (hızlı, veri kaybı riski, nihai tutarlılık). 3. Konsensüs tabanlı (Raft/Paxos). Blokzincirleri asenkron P2P replikasyon kullanır.

❓ Sık sorulan sorular

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.

📚 Kaynaklar