Database Reference
In-Depth Information
Scaling write throughputs
As we discussed earlier, Neo4j provides a master-slave architecture, where all writes are
served by the master and then eventually they are replicated to the slave nodes in an asyn-
chronous mode. Although we can perform writes on slave nodes too, slave nodes eventu-
ally will contact the master node before returning the success response to the master node.
It is always advisable that all writes are directly written to the master nodes for better per-
formance, though it also means that write throughput is limited to a single machine. Des-
pite this limitation of a single machine, write throughput can still be very high by introdu-
cing the upcoming strategies.
Introducing queues for write operations
We need to realize that the master node plays a very important role in the cluster setup, and
at any point of time, we may not expose our master node directly to our clients for any kind
of operations, be it read or write.
Especially in cases where we need high throughput from our write operations, it is recom-
mended to introduce a queuing solution so that the cluster can service a steady and man-
ageable stream of write operations. It will also rescue us from losing any write transactions,
which may occur in extreme situations where our master node abruptly goes down.
Search WWH ::




Custom Search