Data Replication

Data replication создает несколько копий данных в различных локациях для повышения availability, durability и fault tolerance, используя synchronous или asynchronous методы с различными consistency guarantees.

Data replication распределяет данные по нескольким локациям для снижения single points of failure и улучшения read throughput и disaster recovery. Он поддерживает synchronous replication (обновляет все копии атомарно в реальном времени, обеспечивая strong consistency, но более высокую latency), asynchronous replication (обновляет копии после commit, снижая write latency, но допуская lag) и semi-synchronous replication (подтверждение от подмножества реплик для балансировки latency и consistency). Распространенные топологии включают master-slave (primary-secondary), multi-master (active-active) и peer-to-peer. Ключевые проблемы включают поддержание data consistency между репликами, разрешение конфликтов в multi-master установках, обработку network latency, clock skew и schema evolution, а также data drift во время обновлений. Методы управления consistency включают consensus protocols (например, Paxos, Raft), write-ahead logs, version vectors и CRDTs для конкретных типов данных. При выборе стратегии replication следует учитывать RPO/RTO targets, latency budgets, bandwidth, data locality и регуляторные требования, связанные с data replication, auditing и retention.

        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;

      

🧒 Простыми словами

Generated ELI5 content

🤓 Expert Deep Dive

Generated expert content

❓ Частые вопросы

What is the purpose of data replication?

To increase availability, reliability, and fault tolerance by maintaining multiple copies of data in separate locations, enabling failover, disaster recovery, load distribution, and durability.

What are the main types of replication?

Synchronous (updates all replicas atomically), semi-synchronous (acknowledgment from some replicas), and asynchronous (updates copied later).

What is conflict resolution in replication?

In multi-master setups, concurrent writes may conflict; use last-writer-wins, version vectors, CRDTs, or application-specific strategies.

What is replication lag?

The delay between a write and its propagation to replicas, affecting read freshness.

What are common replication topologies?

Master-slave/primary-secondary, multi-master/active-active, and peer-to-peer.

Are CRDTs always suitable?

CRDTs help with certain data types and operations; not all data models benefit; require careful data design.

📚 Источники