Multi Data Center Replication: Architecture
来源:互联网 发布:mac如何修改磁盘名称 编辑:程序博客网 时间:2024/05/18 17:23
Multi Data Center Replication: Architecture
Contents
- How Replication Works
- Concepts
- Fullsync Replication
- Realtime Replication
How Replication Works
When Multi-Datacenter Replication is implemented, one Riak cluster acts asaprimary cluster. The primary cluster handles replication requests from one or more secondaryclusters (generally located in datacenters in other regions or countries). If thedatacenter with the primary cluster goes down, a secondary cluster can take over as the primary cluster. In this sense, Riak's multi-datacenter capabilities areindeedmasterless.
With Multi-Datacenter Replication, there are two primary modes of operation:fullsync and realtime. In fullsync mode, a complete synchronization occurs between primary and secondary cluster(s). In realtime mode, continual, incremental synchronization occurs,i.e.replication is triggered by new updates.Fullsync is performed upon initial connection of a secondary cluster, and then periodically (every 360 minutes by default).Fullsync is also triggered if the TCP connection between primary and secondary cluster is severed and then recovered.
Both fullsync and realtime modeare described in detail below. But first, a few key concepts.
Concepts
Listener Nodes
Listeners (also called servers)areRiaknodeson the primary cluster that listen on an external IP address for replication requests. Any node in a Riak cluster can participate as a listener. Adding more nodes will increase the fault tolerance of the replication process in the event of individual node failures. If a listener node goes down, another node can take its place.
Site Nodes
Site nodes (also called clients),areRiaknodeson a secondary cluster that connect to listener nodes and send replication initiation requests. Site nodes are paired with a listener node when started.
Leadership
Only one node in each cluster will serve as the lead site (client) or listener (server) node.Riak replication uses a leadership-election protocol to determine which node in the cluster will participate in replication. If a site connects to a node in the primary cluster that is not the leader, it will be redirected to the listener node that is currently the leader.
Fullsync Replication
Riak Enterprise performs the following stepsduringfullsync replication, as illustrated in the Figure below.
- A TCP connection is established between the primary and secondary clusters.
- The site node in the secondary cluster initiates fullsync replication with the primary node by sending a message to the listener node in the primary cluster.
- The site and listener nodes iterate through each vnode in their respective clusters and compute a hash for eachkey's object value. The site node on the secondary cluster sends its complete list of key/hash pairs to the listener node in the primary cluster. The listenernode then sequentially compares its key/hash pairs with the primary cluster's pairs, identifying any missing objects or updates needed on the secondary.
- The listener node streams the missing objects/updates to the secondary cluster.
- The secondary cluster replicates the updates within the cluster to achieve the new object values, completing thefullsync cycle.
Realtime Replication
Riak Enterprise performs the following steps duringrealtime replication, as illustrated in the Figure below.
- The secondary cluster establishes a TCP connection to the primary.
- Realtime replication of a key/object is initiated when an update is sent from a client to the primary cluster.
- The primary cluster replicates the object locally.
- The listener node on the primary cluster streams an update to the secondary cluster.
- The site node within the secondary cluster receives and replicates the update.
These May Also Interest You
- JMX Monitoring
- Multi Data Center Replication: Cascading Realtime Writes
- Multi Data Center Replication: Comparison
- Multi Data Center Replication: Architecture
- cassandra (2)Understanding the Architecture【Data distribution and replication】
- High Speed Data Center (HSDC) Architecture of Afmobi Group
- Data center
- Multi-process Architecture
- chromium Multi-process Architecture
- 自己动手实现Multi-Master Replication
- Vertically Center Multi-Lined Text
- Data replication 同步技术
- Amazon data center
- Data Center TCP (DCTCP)
- Google Data Center
- Data Center TCP(DCTCP)
- Data Center笔试
- IDC,Internet Data Center
- Multi-Master Replication Manager for MySQL 安装
- Multi-Master Replication Manager for MySQL
- Multi-Master Replication Manager for MySQL
- linux下的静态库和动态库的编译和应用
- 【蓝桥杯】基础练习 十六进制转八进制
- unix高级环境编程 例子 代码实现练习 第六章:系统数据文件和信息
- 苹果手机游戏天天酷跑如何充值
- jqueryui 1.8.19引用顺序(及var basePrototype = new base()错误)
- Multi Data Center Replication: Architecture
- ArcGIS Runtime SDK for iOS开发系列教程(3)——Objective-C语法基础
- 一些图像处理函数用法
- 银行柜台业务调度系统
- HDU 2149 Public Sale(巴士博弈)
- 封装a.64p成.x64p达芬奇工具链的建立(工程编译步骤)g
- CareerCup How to find medium of 1 billion numbers across N distributed machines efficiently?
- 初识UML
- Regional_2011_H Holiday's Accommodation