You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
andwidth. Local-Disk is faster when recovering because the replica forest is ready to<br />
go at failover. Shared-Disk behaves like a host restart and must replay the journal before<br />
becoming available.<br />
When configuring failover, don't forget to configure it for the auxiliary databases as well:<br />
Security, Modules, Triggers, Meters, and Schemas.<br />
LOCAL-DISK FAILOVER<br />
1<br />
NORMAL OPERATION<br />
2 FAILURE<br />
3 RECOVERY<br />
E-NODE<br />
E-NODE<br />
E-NODE<br />
D-NODE 1 D-NODE 2<br />
D-NODE 3<br />
D-NODE 1 D-NODE 2<br />
D-NODE 3<br />
D-NODE 1 D-NODE 2<br />
D-NODE 3<br />
FOREST<br />
FOREST-R1<br />
FOREST-R2<br />
FOREST<br />
FOREST-R1<br />
FOREST-R2<br />
FOREST<br />
FOREST-R1<br />
FOREST-R2<br />
Active<br />
Replica<br />
Replica<br />
Failed<br />
Active<br />
Replica<br />
Replica<br />
Active<br />
Replica<br />
Figure 21: With Local-Disk Failover, forest data is automatically replicated to other D-nodes (1). In the<br />
case of failure of one D-node, a replica can take over duties as the primary host (2). When the failed<br />
D-node comes back online, it can be resynchronized from the replica (3).<br />
DATABASE REPLICATION<br />
What about when the whole cluster fails, such as with a data center power outage?<br />
Or, what if you just want multiple clusters geographically separated for efficiency? To<br />
enable inter-cluster replication like this, MarkLogic offers Database Replication.<br />
Database Replication acts in many ways like Local-Disk Failover, except with the<br />
replica forests hosted in another cluster. In the administration screens or via the APIs,<br />
you first "couple" two clusters together. Each cluster offers one or more "bootstrap"<br />
hosts to initiate communication. Communication runs over the same XDQP protocol<br />
that is used for intra-cluster communication, but it runs on port 7998 instead of 7999.<br />
Database Replication is configured at the database level but, despite the name, actually<br />
happens on a per-forest basis. Normally, forests in the primary and replica database<br />
match up by name, but this can be manually overridden if necessary. The physical<br />
replication activity uses the same techniques discussed in Local-Disk Failover: bulk<br />
synchronization at first and then a continual sending of journal frames.<br />
A few notable differences: First, with Local-Disk Failover, the primary and replica<br />
forests are kept in lock-step with each other. In Database Replication, there's a<br />
configurable lag time, by default 15 seconds, indicating how far behind a replica is<br />
allowed to be before the primary stalls new transaction commits. That's needed because<br />
between clusters there's usually a significant latency and often a less-reliable network. If<br />
the replica cluster goes fully down, the primary keeps going. (The idea is to not double<br />
the points of failure.)<br />
107