Database Reference
In-Depth Information
11.2.1. Neo4j clustering overview
A Neo4j HA cluster involves a set of Neo4j Enterprise instances that have all been con-
figuredtobelongtoasinglelogicalunit(cluster).Atanygiventime,it'sexpectedthatthere
will always be a single master present, with zero or more slaves configured as required.
Neo4j'sHAarchitecturehasrecentlyundergoneabitofanoverhaulinanefforttosimplify
the setup and operational running requirements. Prior to Neo4 1.9, Neo4j used Apache
ZooKeeper ( http://zookeeper.apache.org ) to provide the cluster coordination functionality.
AlthoughZooKeeperisafineproduct,itsusewithintheNeo4jarchitectureposedanumber
of problems, including having to deal with the additional operational overhead, setup, and
integration of a separate coordinator component. It also had restrictions in terms of being
able to dynamically reconfigure itself; for some cloud-based setups, this proved somewhat
restrictive.
For these, as well as some other reasons, Neo Technology decided to roll its own cluster-
coordination mechanism, and from Neo4j version 1.9 onward, including Neo4j 2.0,
ZooKeeper is no longer used. The Neo4j implementation is based on the Paxos protocol,
which primarily handles master election, but Neo4j also takes responsibility for the hand-
ling of all general cluster-based management tasks. It's not necessary to understand the
finer details of the Paxos protocol (that's well beyond the scope of this topic), but if
you'reinterested,LeslieLamport'sarticle,“PaxosMadeSimple”(2001),providesasimple
introduction to the subject: www.cs.utexas.edu/users/lorenzo/corsi/cs380d/past/03F/notes/
paxos-simple.pdf .
Figure 11.5 shows the key workings of the new Neo4j cluster coordination mechanism
based on the Paxos protocol.
Search WWH ::




Custom Search