Over a million developers have joined DZone.

Introducing Neo4j 3.1: Clustering, Load Balancing, and Causal Consistency

DZone's Guide to

Introducing Neo4j 3.1: Clustering, Load Balancing, and Causal Consistency

Neo4j 3.1 is now in beta! Come check out what's new with this release, including some major changes and additions, and see how you can get your hands on it!

· Database Zone ·
Free Resource

Download the Altoros NoSQL Performance Benchmark 2018. Compare top NoSQL solutions – Couchbase Server v5.5, MongoDB v3.6, and DataStax Enterprise v6 (Cassandra).

We are excited to introduce our landmark new release of Neo4j 3.1, now in beta.

Neo4j 3.1 adds a new state-of-the-art clustering architecture and new security architecture to meet enterprise requirements for scale and security. This new release extends the comprehensive set of graph functionality for which Neo4j is best known and builds upon the new official language drivers introduced in Neo4j 3.0.

Disclaimer: Neo4j 3.1 is in beta release and is for development and experimentation only. Click here if you’re looking for the most fully stable version of Neo4j (3.0.6).

Let’s take a closer look at what’s new in Neo4j 3.1.

Causal Clustering: New State-of-the-Art Cluster Architecture

Neo4j 3.1 introduces Causal Clustering – a brand-new architecture using the state-of-the-art Raft protocol – that enables support for ultra-large clusters and a wider range of cluster topologies for data center and cloud. Causal Clustering is safer, more intelligent, more scalable and built for the future.

Learn about the beta release of Neo4j 3.1 with Causal Clustering architecture & security features

Built-in Load Balancing

Load balancing is now fully handled by Neo4j Bolt drivers, which operate in concert with the Causal Cluster to spread the workload. New cluster-aware sessions, managed on the client-side by the Bolt drivers, alleviate complex infrastructure concerns for developers.

The Causal Clustering architecture with the Bolt protocol

Causal Consistency Explained

Similarly, Neo4j drivers work together with the Causal Cluster to offer one of the industry’s most comprehensive ACID-compliant tunable clustering consistency models. Newly introduced causal consistency enables support of a wider variety of applications where eventual consistency is unacceptable.

Causal consistency allows you to specify guarantees around query ordering, including the ability to read your own writes, view the last data you read, and later on, committed writes from other users. The Bolt drivers collaborate with the core servers to ensure that all transactions are applied in the same order using a concept of a bookmark.

The cluster returns a bookmark when it commits an update transaction, so then the driver links a bookmark to the user’s next transaction. The server that received query starts this new bookmarked transaction only when its internal state reached the desired bookmark. This ensures that the view of related data is always consistent, that all servers are eventually updated, and that users reading and re-reading data always see the same — and the latest — data.

A Stronger Security Foundation

As an increasing number of our customers find value in using Neo4j across different departments, providing enterprise-class security and conforming with compliance requirements became top priority. Neo4j 3.1 raises the bar for safeguarding data and meeting compliance requirements by introducing concept of multiple users, role-based access control, query and security event logging, list and terminate running queries, and fine-grained access control.

Multiple Users and Role-Based Access Control

Neo4j 3.1 offers you a choice of managing multiple users:

  • Built-in internal users repository (enabled by default).
  • LDAP connector to Active Directory or openLDAP.

Built-in internal authentication means that user names and their passwords are managed inside Neo4j. We call this built-in functionality native users. Another option is to use LDAP connector to integrate Neo4j with Active Directory, OpenLDAP or other LDAP-compatible authentication services.

The new role-based access control (RBAC) framework introduces four predefined graph-global data-access roles: reader, publisher, architect, and admin. Each role includes a set of authorized actions (read, write, etc.) permitted on the Neo4j data graph and its schema.

Role Privileges
reader Read-only access to the data graph (all nodes, relationships, properties)
publisher Read-write access to the data graph
architect Read-write access to data graph and set/delete access to indexes and any other future schema constructs
admin Read-write access to data graph and set/delete access to indexes and any other future schema constructs and view/terminate queries

List and Terminate Running Queries

Neo4j 3.1 introduces the ability to list and terminate all currently executing queries visible to the user. In particular, admin can see and terminate any currently running query.

To simplify cluster topology management, Neo4j 3.1 introduces the Neo4j Browser widget, which is invoked with :qs command and lists all currently running queries in the cluster.

Image title

New Query Management Capabilities

Database Kernel and Operational Advancements

Neo4j 3.1 also introduces long-requested improvements in the database kernel, including more efficient space management. Node and relationship ID are now reallocated from deleted records while the cluster is online.

Another feature called Execution Guard enables administrators to specify max query duration per instance. Any query running longer than specified time is terminated and its transaction is rolled back.

Neo4j 3.1 introduces the new command-line Cypher interface called cypher-shell and command-line admin tool called neo4j-admin. The cypher-shell is based on Bolt, enables ad-hoc querying and scripting, extends Neo4j Browser development to the command line, and can run remotely with encrypted communication by default.

The neo4j-admin combines various different tools like backup and consistency checker under one roof and introduces some new functionality like set-initial-password and dump and load of a database.

Schema Viewer

New Neo4j Schema Viewer feature displays the graph model at the current point in time, uses exact database statistics for instant responsiveness, and helps developers, admins and users understand and communicate the database contents.

Image title

The Schema Viewer is built into the Neo4j Browser

Ultra-High Scalability With IBM POWER8 and CAPI Flash

Finally, Neo4j 3.1 introduces an official support for IBM POWER8 with CAPI Flash, supporting more than double the I/O throughput of the fastest Intel-based Flash solution. Neo4j on POWER8 with CAPI Flash enables in-memory and near-memory graph processing on an ultra-large scale, setting a new and higher bar for the scale of graph problems that can be addressed with other technologies.

Image title


We encourage you to try out all the new features of 3.1 on our beta download page.

As we prepare for the GA release of Neo4j 3.1, in December of 2016, we hope you can already find new use cases for its increased scalability and security.

On behalf of the entire Neo4j team, we hope you enjoy this beta release, and we’re looking forward to your feedback.

Download the whitepaper, Moving From Relational to NoSQL: How to Get Started. We’ll take you step by step through your first NoSQL project.

neo4j ,clustering ,graph database ,database

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}